238 lines
11 KiB
Swift
238 lines
11 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_UI_Xaml {
|
|
public enum IDataTemplateExtensionBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIDataTemplateExtension
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.IDataTemplateExtension
|
|
public typealias SwiftProjection = AnyIDataTemplateExtension
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IDataTemplateExtensionImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Xaml.IDataTemplateExtensionVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IDataTemplateExtensionImpl: IDataTemplateExtension, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IDataTemplateExtensionBridge
|
|
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.ui.xaml.idatatemplateextension.resettemplate)
|
|
fileprivate func resetTemplate() throws {
|
|
try _default.ResetTemplateImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.idatatemplateextension.processbinding)
|
|
fileprivate func processBinding(_ phase: UInt32) throws -> Bool {
|
|
try _default.ProcessBindingImpl(phase)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.idatatemplateextension.processbindings)
|
|
fileprivate func processBindings(_ arg: WinUI.ContainerContentChangingEventArgs!) throws -> Int32 {
|
|
try _default.ProcessBindingsImpl(arg)
|
|
}
|
|
|
|
}
|
|
|
|
public enum IElementFactoryBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIElementFactory
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.IElementFactory
|
|
public typealias SwiftProjection = AnyIElementFactory
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IElementFactoryImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Xaml.IElementFactoryVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IElementFactoryImpl: IElementFactory, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IElementFactoryBridge
|
|
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.ui.xaml.ielementfactory.getelement)
|
|
fileprivate func getElement(_ args: ElementFactoryGetArgs!) throws -> UIElement! {
|
|
try _default.GetElementImpl(args)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.ielementfactory.recycleelement)
|
|
fileprivate func recycleElement(_ args: ElementFactoryRecycleArgs!) throws {
|
|
try _default.RecycleElementImpl(args)
|
|
}
|
|
|
|
}
|
|
|
|
public class ApplicationInitializationCallbackBridge : WinRTDelegateBridge {
|
|
public typealias Handler = ApplicationInitializationCallback
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIApplicationInitializationCallback
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.ApplicationInitializationCallback
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (p) in
|
|
try! _default.InvokeImpl(p)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class BindingFailedEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = BindingFailedEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIBindingFailedEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.BindingFailedEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class CreateDefaultValueCallbackBridge : WinRTDelegateBridge {
|
|
public typealias Handler = CreateDefaultValueCallback
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CICreateDefaultValueCallback
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.CreateDefaultValueCallback
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { () in
|
|
try! _default.InvokeImpl()
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class DependencyPropertyChangedCallbackBridge : WinRTDelegateBridge {
|
|
public typealias Handler = DependencyPropertyChangedCallback
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIDependencyPropertyChangedCallback
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.DependencyPropertyChangedCallback
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, dp) in
|
|
try! _default.InvokeImpl(sender, dp)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class DependencyPropertyChangedEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = DependencyPropertyChangedEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIDependencyPropertyChangedEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.DependencyPropertyChangedEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class DragEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = DragEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIDragEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.DragEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class ExceptionRoutedEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = ExceptionRoutedEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIExceptionRoutedEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.ExceptionRoutedEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class PropertyChangedCallbackBridge : WinRTDelegateBridge {
|
|
public typealias Handler = PropertyChangedCallback
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIPropertyChangedCallback
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.PropertyChangedCallback
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (d, e) in
|
|
try! _default.InvokeImpl(d, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class RoutedEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = RoutedEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIRoutedEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.RoutedEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class SizeChangedEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = SizeChangedEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CISizeChangedEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.SizeChangedEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
public class UnhandledExceptionEventHandlerBridge : WinRTDelegateBridge {
|
|
public typealias Handler = UnhandledExceptionEventHandler
|
|
public typealias CABI = __x_ABI_CMicrosoft_CUI_CXaml_CIUnhandledExceptionEventHandler
|
|
public typealias SwiftABI = __ABI_Microsoft_UI_Xaml.UnhandledExceptionEventHandler
|
|
|
|
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
|
guard let abi = abi else { return nil }
|
|
let _default = SwiftABI(abi)
|
|
let handler: Handler = { (sender, e) in
|
|
try! _default.InvokeImpl(sender, e)
|
|
}
|
|
return handler
|
|
}
|
|
}
|
|
}
|