// 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_CUI_CDispatching_CIDispatcherExitDeferral: WindowsFoundation.IID { .init(Data1: 0x910B5AAC, Data2: 0x3310, Data3: 0x563E, Data4: ( 0x84,0x18,0xF3,0x00,0x55,0x79,0x72,0x9E ))// 910B5AAC-3310-563E-8418-F3005579729E } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue: WindowsFoundation.IID { .init(Data1: 0xF6EBF8FA, Data2: 0xBE1C, Data3: 0x5BF6, Data4: ( 0xA4,0x67,0x73,0xDA,0x28,0x73,0x8A,0xE8 ))// F6EBF8FA-BE1C-5BF6-A467-73DA28738AE8 } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue2: WindowsFoundation.IID { .init(Data1: 0x0CF48751, Data2: 0xF1AC, Data3: 0x59B8, Data4: ( 0xBA,0x52,0x6C,0xE7,0xA1,0x44,0x4D,0x6F ))// 0CF48751-F1AC-59B8-BA52-6CE7A1444D6F } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3: WindowsFoundation.IID { .init(Data1: 0x14A7A175, Data2: 0x5C27, Data3: 0x5A35, Data4: ( 0xB0,0x79,0x21,0x96,0x0C,0xF7,0x64,0xA8 ))// 14A7A175-5C27-5A35-B079-21960CF764A8 } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController: WindowsFoundation.IID { .init(Data1: 0xBCE8178D, Data2: 0x2183, Data3: 0x584C, Data4: ( 0x9E,0x5B,0xF9,0x36,0x6F,0x6A,0xE4,0x84 ))// BCE8178D-2183-584C-9E5B-F9366F6AE484 } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController2: WindowsFoundation.IID { .init(Data1: 0x4C68EE2A, Data2: 0x1CB1, Data3: 0x5591, Data4: ( 0xA3,0xA2,0x9B,0x59,0x0B,0x8F,0x8B,0x9A ))// 4C68EE2A-1CB1-5591-A3A2-9B590B8F8B9A } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics: WindowsFoundation.IID { .init(Data1: 0xF18D6145, Data2: 0x722B, Data3: 0x593D, Data4: ( 0xBC,0xF2,0xA6,0x1E,0x71,0x3F,0x00,0x37 ))// F18D6145-722B-593D-BCF2-A61E713F0037 } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs: WindowsFoundation.IID { .init(Data1: 0x32519BE5, Data2: 0x072B, Data3: 0x5660, Data4: ( 0xA7,0x0E,0x88,0x35,0xC9,0xB8,0x15,0x7D ))// 32519BE5-072B-5660-A70E-8835C9B8157D } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueStatics: WindowsFoundation.IID { .init(Data1: 0xCD3382EA, Data2: 0xA455, Data3: 0x5124, Data4: ( 0xB6,0x3A,0xCA,0x40,0xD3,0x4C,0xA2,0x3C ))// CD3382EA-A455-5124-B63A-CA40D34CA23C } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer: WindowsFoundation.IID { .init(Data1: 0xAD4D63FD, Data2: 0x88FE, Data3: 0x541F, Data4: ( 0xAC,0x11,0xBF,0x2D,0xC1,0xED,0x2C,0xE5 ))// AD4D63FD-88FE-541F-AC11-BF2DC1ED2CE5 } private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler: WindowsFoundation.IID { .init(Data1: 0x2E0872A9, Data2: 0x4E29, Data3: 0x5F14, Data4: ( 0xB6,0x88,0xFB,0x96,0xD5,0xF9,0xD5,0xF8 ))// 2E0872A9-4E29-5F14-B688-FB96D5F9D5F8 } public enum __ABI_Microsoft_UI_Dispatching { public class IDispatcherExitDeferral: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral } internal func CompleteImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Complete(pThis)) } } } public class IDispatcherQueue: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue } internal func CreateTimerImpl() throws -> WinAppSDK.DispatcherQueueTimer? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateTimer(pThis, &resultAbi)) } } return .from(abi: result) } internal func TryEnqueueImpl(_ callback: WinAppSDK.DispatcherQueueHandler?) throws -> Bool { var result: boolean = 0 let callbackWrapper = __ABI_Microsoft_UI_Dispatching.DispatcherQueueHandlerWrapper(callback) let _callback = try! callbackWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryEnqueue(pThis, _callback, &result)) } return .init(from: result) } internal func TryEnqueueWithPriorityImpl(_ priority: WinAppSDK.DispatcherQueuePriority, _ callback: WinAppSDK.DispatcherQueueHandler?) throws -> Bool { var result: boolean = 0 let callbackWrapper = __ABI_Microsoft_UI_Dispatching.DispatcherQueueHandlerWrapper(callback) let _callback = try! callbackWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryEnqueueWithPriority(pThis, priority, _callback, &result)) } return .init(from: result) } internal func add_ShutdownStartingImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueueShutdownStartingEventArgsWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_ShutdownStarting(pThis, _handler, &token)) } return token } internal func remove_ShutdownStartingImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ShutdownStarting(pThis, token)) } } internal func add_ShutdownCompletedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_ShutdownCompleted(pThis, _handler, &token)) } return token } internal func remove_ShutdownCompletedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ShutdownCompleted(pThis, token)) } } } public class IDispatcherQueue2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue2 } internal func get_HasThreadAccessImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasThreadAccess(pThis, &value)) } return .init(from: value) } } public class IDispatcherQueue3: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3 } internal func EnqueueEventLoopExitImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.EnqueueEventLoopExit(pThis)) } } internal func EnsureSystemDispatcherQueueImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.EnsureSystemDispatcherQueue(pThis)) } } internal func RunEventLoopImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.RunEventLoop(pThis)) } } internal func RunEventLoopWithOptionsImpl(_ options: WinAppSDK.DispatcherRunOptions, _ deferral: WinAppSDK.DispatcherExitDeferral?) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.RunEventLoopWithOptions(pThis, options, RawPointer(deferral))) } } internal func add_FrameworkShutdownStartingImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueueShutdownStartingEventArgsWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_FrameworkShutdownStarting(pThis, _handler, &token)) } return token } internal func remove_FrameworkShutdownStartingImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_FrameworkShutdownStarting(pThis, token)) } } internal func add_FrameworkShutdownCompletedImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_FrameworkShutdownCompleted(pThis, _handler, &token)) } return token } internal func remove_FrameworkShutdownCompletedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_FrameworkShutdownCompleted(pThis, token)) } } } public class IDispatcherQueueController: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController } internal func get_DispatcherQueueImpl() throws -> WinAppSDK.DispatcherQueue? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_DispatcherQueue(pThis, &valueAbi)) } } return .from(abi: value) } internal func ShutdownQueueAsyncImpl() throws -> WindowsFoundation.AnyIAsyncAction? { let (operation) = try ComPtrs.initialize { operationAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.ShutdownQueueAsync(pThis, &operationAbi)) } } return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation) } } public class IDispatcherQueueController2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController2 } internal func ShutdownQueueImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController2.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.ShutdownQueue(pThis)) } } } public class IDispatcherQueueControllerStatics: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics } internal func CreateOnDedicatedThreadImpl() throws -> WinAppSDK.DispatcherQueueController? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateOnDedicatedThread(pThis, &resultAbi)) } } return .from(abi: result) } internal func CreateOnCurrentThreadImpl() throws -> WinAppSDK.DispatcherQueueController? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateOnCurrentThread(pThis, &resultAbi)) } } return .from(abi: result) } } public class IDispatcherQueueShutdownStartingEventArgs: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs } internal func GetDeferralImpl() throws -> WindowsFoundation.Deferral? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetDeferral(pThis, &resultAbi)) } } return .from(abi: result) } } public class IDispatcherQueueStatics: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueStatics } internal func GetForCurrentThreadImpl() throws -> WinAppSDK.DispatcherQueue? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueStatics.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetForCurrentThread(pThis, &resultAbi)) } } return .from(abi: result) } } public class IDispatcherQueueTimer: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer } internal func get_IntervalImpl() throws -> WindowsFoundation.TimeSpan { var value: __x_ABI_CWindows_CFoundation_CTimeSpan = .init() _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Interval(pThis, &value)) } return .from(abi: value) } internal func put_IntervalImpl(_ value: WindowsFoundation.TimeSpan) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_Interval(pThis, .from(swift: value))) } } internal func get_IsRunningImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsRunning(pThis, &value)) } return .init(from: value) } internal func get_IsRepeatingImpl() throws -> Bool { var value: boolean = 0 _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsRepeating(pThis, &value)) } return .init(from: value) } internal func put_IsRepeatingImpl(_ value: Bool) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsRepeating(pThis, .init(from: value))) } } internal func StartImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Start(pThis)) } } internal func StopImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Stop(pThis)) } } internal func add_TickImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueueTimer_IInspectableWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_Tick(pThis, _handler, &token)) } return token } internal func remove_TickImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Tick(pThis, token)) } } } } // MARK - DispatcherQueueHandler extension __ABI_Microsoft_UI_Dispatching { public class DispatcherQueueHandler: WindowsFoundation.IUnknown { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler } open func InvokeImpl() throws { _ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis)) } } } typealias DispatcherQueueHandlerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Dispatching.DispatcherQueueHandlerBridge> internal static var DispatcherQueueHandlerVTable: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandlerVtbl = .init( QueryInterface: { DispatcherQueueHandlerWrapper.queryInterface($0, $1, $2) }, AddRef: { DispatcherQueueHandlerWrapper.addRef($0) }, Release: { DispatcherQueueHandlerWrapper.release($0) }, Invoke: { guard let __unwrapped__instance = DispatcherQueueHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } __unwrapped__instance() return S_OK } ) } public extension WinRTDelegateBridge where CABI == __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler { static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Dispatching.DispatcherQueueHandlerVTable) { $0 } return .init(lpVtbl:vtblPtr) } }