127 lines
5.7 KiB
Swift
127 lines
5.7 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_Windows_ApplicationModel_Core {
|
|
public enum ICoreApplicationUnhandledErrorBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CWindows_CApplicationModel_CCore_CICoreApplicationUnhandledError
|
|
public typealias SwiftABI = __ABI_Windows_ApplicationModel_Core.ICoreApplicationUnhandledError
|
|
public typealias SwiftProjection = AnyICoreApplicationUnhandledError
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return ICoreApplicationUnhandledErrorImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_ApplicationModel_Core.ICoreApplicationUnhandledErrorVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class ICoreApplicationUnhandledErrorImpl: ICoreApplicationUnhandledError, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = ICoreApplicationUnhandledErrorBridge
|
|
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/uwp/api/windows.applicationmodel.core.icoreapplicationunhandlederror.unhandlederrordetected)
|
|
fileprivate lazy var unhandledErrorDetected : Event<EventHandler<UnhandledErrorDetectedEventArgs?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_UnhandledErrorDetectedImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_UnhandledErrorDetectedImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
}
|
|
|
|
public enum IFrameworkViewBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CWindows_CApplicationModel_CCore_CIFrameworkView
|
|
public typealias SwiftABI = __ABI_Windows_ApplicationModel_Core.IFrameworkView
|
|
public typealias SwiftProjection = AnyIFrameworkView
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IFrameworkViewImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_ApplicationModel_Core.IFrameworkViewVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IFrameworkViewImpl: IFrameworkView, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IFrameworkViewBridge
|
|
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/uwp/api/windows.applicationmodel.core.iframeworkview.initialize)
|
|
fileprivate func initialize(_ applicationView: CoreApplicationView!) throws {
|
|
try _default.InitializeImpl(applicationView)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.applicationmodel.core.iframeworkview.setwindow)
|
|
fileprivate func setWindow(_ window: UWP.CoreWindow!) throws {
|
|
try _default.SetWindowImpl(window)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.applicationmodel.core.iframeworkview.load)
|
|
fileprivate func load(_ entryPoint: String) throws {
|
|
try _default.LoadImpl(entryPoint)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.applicationmodel.core.iframeworkview.run)
|
|
fileprivate func run() throws {
|
|
try _default.RunImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.applicationmodel.core.iframeworkview.uninitialize)
|
|
fileprivate func uninitialize() throws {
|
|
try _default.UninitializeImpl()
|
|
}
|
|
|
|
}
|
|
|
|
public enum IFrameworkViewSourceBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CWindows_CApplicationModel_CCore_CIFrameworkViewSource
|
|
public typealias SwiftABI = __ABI_Windows_ApplicationModel_Core.IFrameworkViewSource
|
|
public typealias SwiftProjection = AnyIFrameworkViewSource
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IFrameworkViewSourceImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_ApplicationModel_Core.IFrameworkViewSourceVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IFrameworkViewSourceImpl: IFrameworkViewSource, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IFrameworkViewSourceBridge
|
|
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/uwp/api/windows.applicationmodel.core.iframeworkviewsource.createview)
|
|
fileprivate func createView() throws -> AnyIFrameworkView! {
|
|
try _default.CreateViewImpl()
|
|
}
|
|
|
|
}
|
|
|
|
}
|