1880 lines
96 KiB
Swift
1880 lines
96 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
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0xFF1C4C4A, Data2: 0x9287, Data3: 0x470B, Data4: ( 0x83,0x6E,0x90,0x86,0xE3,0x12,0x6A,0xDE ))// FF1C4C4A-9287-470B-836E-9086E3126ADE
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs2: WindowsFoundation.IID {
|
|
.init(Data1: 0xD300A9F6, Data2: 0x2F7E, Data3: 0x4873, Data4: ( 0xA5,0x55,0x16,0x6E,0x59,0x6E,0xE1,0xC5 ))// D300A9F6-2F7E-4873-A555-166E596EE1C5
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIAutomationProviderRequestedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x961FF258, Data2: 0x21BF, Data3: 0x4B42, Data4: ( 0xA2,0x98,0xFA,0x47,0x9D,0x4C,0x52,0xE2 ))// 961FF258-21BF-4B42-A298-FA479D4C52E2
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICharacterReceivedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0xC584659F, Data2: 0x99B2, Data3: 0x4BCC, Data4: ( 0xBD,0x33,0x04,0xE6,0x3F,0x42,0x90,0x2E ))// C584659F-99B2-4BCC-BD33-04E63F42902E
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIClosestInteractiveBoundsRequestedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x347C11D7, Data2: 0xF6F8, Data3: 0x40E3, Data4: ( 0xB2,0x9F,0xAE,0x50,0xD3,0xE8,0x64,0x86 ))// 347C11D7-F6F8-40E3-B29F-AE50D3E86486
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreAcceleratorKeys: WindowsFoundation.IID {
|
|
.init(Data1: 0x9FFDF7F5, Data2: 0xB8C9, Data3: 0x4EF0, Data4: ( 0xB7,0xD2,0x1D,0xE6,0x26,0x56,0x1F,0xC8 ))// 9FFDF7F5-B8C9-4EF0-B7D2-1DE626561FC8
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreCursor: WindowsFoundation.IID {
|
|
.init(Data1: 0x96893ACF, Data2: 0x111D, Data3: 0x442C, Data4: ( 0x8A,0x77,0xB8,0x79,0x92,0xF8,0xE2,0xD6 ))// 96893ACF-111D-442C-8A77-B87992F8E2D6
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreCursorFactory: WindowsFoundation.IID {
|
|
.init(Data1: 0xF6359621, Data2: 0xA79D, Data3: 0x4ED3, Data4: ( 0x8C,0x32,0xA9,0xEF,0x9D,0x6B,0x76,0xA4 ))// F6359621-A79D-4ED3-8C32-A9EF9D6B76A4
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreDispatcher: WindowsFoundation.IID {
|
|
.init(Data1: 0x60DB2FA8, Data2: 0xB705, Data3: 0x4FDE, Data4: ( 0xA7,0xD6,0xEB,0xBB,0x18,0x91,0xD3,0x9E ))// 60DB2FA8-B705-4FDE-A7D6-EBBB1891D39E
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreDispatcher2: WindowsFoundation.IID {
|
|
.init(Data1: 0x6F5E63C7, Data2: 0xE3AA, Data3: 0x4EAE, Data4: ( 0xB0,0xE0,0xDC,0xF3,0x21,0xCA,0x4B,0x2F ))// 6F5E63C7-E3AA-4EAE-B0E0-DCF321CA4B2F
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority: WindowsFoundation.IID {
|
|
.init(Data1: 0xBAFAECAD, Data2: 0x484D, Data3: 0x41BE, Data4: ( 0xBA,0x80,0x1D,0x58,0xC6,0x52,0x63,0xEA ))// BAFAECAD-484D-41BE-BA80-1D58C65263EA
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICorePointerRedirector: WindowsFoundation.IID {
|
|
.init(Data1: 0x8F9D0C94, Data2: 0x5688, Data3: 0x4B0C, Data4: ( 0xA9,0xF1,0xF9,0x31,0xF7,0xFA,0x3D,0xC3 ))// 8F9D0C94-5688-4B0C-A9F1-F931F7FA3DC3
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindow: WindowsFoundation.IID {
|
|
.init(Data1: 0x79B9D5F2, Data2: 0x879E, Data3: 0x4B89, Data4: ( 0xB7,0x98,0x79,0xE4,0x75,0x98,0x03,0x0C ))// 79B9D5F2-879E-4B89-B798-79E47598030C
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindow2: WindowsFoundation.IID {
|
|
.init(Data1: 0x7C2B1B85, Data2: 0x6917, Data3: 0x4361, Data4: ( 0x9C,0x02,0x0D,0x9E,0x3A,0x42,0x0B,0x95 ))// 7C2B1B85-6917-4361-9C02-0D9E3A420B95
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindow3: WindowsFoundation.IID {
|
|
.init(Data1: 0x32C20DD8, Data2: 0xFAEF, Data3: 0x4375, Data4: ( 0xA2,0xAB,0x32,0x64,0x0E,0x48,0x15,0xC7 ))// 32C20DD8-FAEF-4375-A2AB-32640E4815C7
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindow4: WindowsFoundation.IID {
|
|
.init(Data1: 0x35CAF0D0, Data2: 0x47F0, Data3: 0x436C, Data4: ( 0xAF,0x97,0x0D,0xD8,0x8F,0x6F,0x5F,0x02 ))// 35CAF0D0-47F0-436C-AF97-0DD88F6F5F02
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindow5: WindowsFoundation.IID {
|
|
.init(Data1: 0x4B4AE1E1, Data2: 0x2E6D, Data3: 0x4EAA, Data4: ( 0xBD,0xA1,0x1C,0x5C,0xC1,0xBE,0xE1,0x41 ))// 4B4AE1E1-2E6D-4EAA-BDA1-1C5CC1BEE141
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindowEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x272B1EF3, Data2: 0xC633, Data3: 0x4DA5, Data4: ( 0xA2,0x6C,0xC6,0xD0,0xF5,0x6B,0x29,0xDA ))// 272B1EF3-C633-4DA5-A26C-C6D0F56B29DA
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindowStatic: WindowsFoundation.IID {
|
|
.init(Data1: 0x4D239005, Data2: 0x3C2A, Data3: 0x41B1, Data4: ( 0x90,0x22,0x53,0x6B,0xB9,0xCF,0x93,0xB1 ))// 4D239005-3C2A-41B1-9022-536BB9CF93B1
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CICoreWindowWithContext: WindowsFoundation.IID {
|
|
.init(Data1: 0x9AC40241, Data2: 0x3575, Data3: 0x4C3B, Data4: ( 0xAF,0x66,0xE8,0xC5,0x29,0xD4,0xD0,0x6C ))// 9AC40241-3575-4C3B-AF66-E8C529D4D06C
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandlerArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x98BB6A24, Data2: 0xDC1C, Data3: 0x43CB, Data4: ( 0xB4,0xED,0xD1,0xC0,0xEB,0x23,0x91,0xF3 ))// 98BB6A24-DC1C-43CB-B4ED-D1C0EB2391F3
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIInputEnabledEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x80371D4F, Data2: 0x2FD8, Data3: 0x4C24, Data4: ( 0xAA,0x86,0x31,0x63,0xA8,0x7B,0x4E,0x5A ))// 80371D4F-2FD8-4C24-AA86-3163A87B4E5A
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIKeyEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x5FF5E930, Data2: 0x2544, Data3: 0x4A17, Data4: ( 0xBD,0x78,0x1F,0x2F,0xDE,0xBB,0x10,0x6B ))// 5FF5E930-2544-4A17-BD78-1F2FDEBB106B
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIKeyEventArgs2: WindowsFoundation.IID {
|
|
.init(Data1: 0x583ADD98, Data2: 0x0790, Data3: 0x4571, Data4: ( 0x9B,0x12,0x64,0x5E,0xF9,0xD7,0x9E,0x42 ))// 583ADD98-0790-4571-9B12-645EF9D79E42
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIPointerEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x920D9CB1, Data2: 0xA5FC, Data3: 0x4A21, Data4: ( 0x8C,0x09,0x49,0xDF,0xE6,0xFF,0xE2,0x5F ))// 920D9CB1-A5FC-4A21-8C09-49DFE6FFE25F
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x22F3B823, Data2: 0x0B7C, Data3: 0x424E, Data4: ( 0x9D,0xF7,0x33,0xD4,0xF9,0x62,0x93,0x1B ))// 22F3B823-0B7C-424E-9DF7-33D4F962931B
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIVisibilityChangedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0xBF9918EA, Data2: 0xD801, Data3: 0x4564, Data4: ( 0xA4,0x95,0xB1,0xE8,0x4F,0x8A,0xD0,0x85 ))// BF9918EA-D801-4564-A495-B1E84F8AD085
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIWindowActivatedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x179D65E7, Data2: 0x4658, Data3: 0x4CB6, Data4: ( 0xAA,0x13,0x41,0xD0,0x94,0xEA,0x25,0x5E ))// 179D65E7-4658-4CB6-AA13-41D094EA255E
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIWindowSizeChangedEventArgs: WindowsFoundation.IID {
|
|
.init(Data1: 0x5A200EC7, Data2: 0x0426, Data3: 0x47DC, Data4: ( 0xB8,0x6C,0x6F,0x47,0x59,0x15,0xE4,0x51 ))// 5A200EC7-0426-47DC-B86C-6F475915E451
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIDispatchedHandler: WindowsFoundation.IID {
|
|
.init(Data1: 0xD1F276C4, Data2: 0x98D8, Data3: 0x4636, Data4: ( 0xBF,0x49,0xEB,0x79,0x50,0x75,0x48,0xE9 ))// D1F276C4-98D8-4636-BF49-EB79507548E9
|
|
}
|
|
|
|
private var IID___x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandler: WindowsFoundation.IID {
|
|
.init(Data1: 0xA42B0C24, Data2: 0x7F21, Data3: 0x4ABC, Data4: ( 0x99,0xC1,0x8F,0x01,0x00,0x7F,0x08,0x80 ))// A42B0C24-7F21-4ABC-99C1-8F01007F0880
|
|
}
|
|
|
|
public enum __ABI_Windows_UI_Core {
|
|
public class IAcceleratorKeyEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs }
|
|
|
|
internal func get_EventTypeImpl() throws -> UWP.CoreAcceleratorKeyEventType {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreAcceleratorKeyEventType = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_EventType(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_VirtualKeyImpl() throws -> UWP.VirtualKey {
|
|
var value: __x_ABI_CWindows_CSystem_CVirtualKey = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_VirtualKey(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_KeyStatusImpl() throws -> UWP.CorePhysicalKeyStatus {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCorePhysicalKeyStatus = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_KeyStatus(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IAcceleratorKeyEventArgs2: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs2 }
|
|
|
|
internal func get_DeviceIdImpl() throws -> String {
|
|
var value: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIAcceleratorKeyEventArgs2.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DeviceId(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IAutomationProviderRequestedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIAutomationProviderRequestedEventArgs }
|
|
|
|
internal func get_AutomationProviderImpl() throws -> Any? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIAutomationProviderRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AutomationProvider(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_.AnyWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
internal func put_AutomationProviderImpl(_ value: Any?) throws {
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
let _value = try! valueWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIAutomationProviderRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_AutomationProvider(pThis, _value))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class ICharacterReceivedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICharacterReceivedEventArgs }
|
|
|
|
internal func get_KeyCodeImpl() throws -> UInt32 {
|
|
var value: UINT32 = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICharacterReceivedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_KeyCode(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_KeyStatusImpl() throws -> UWP.CorePhysicalKeyStatus {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCorePhysicalKeyStatus = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICharacterReceivedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_KeyStatus(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IClosestInteractiveBoundsRequestedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIClosestInteractiveBoundsRequestedEventArgs }
|
|
|
|
internal func get_PointerPositionImpl() throws -> WindowsFoundation.Point {
|
|
var value: __x_ABI_CWindows_CFoundation_CPoint = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIClosestInteractiveBoundsRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_PointerPosition(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func get_SearchBoundsImpl() throws -> WindowsFoundation.Rect {
|
|
var value: __x_ABI_CWindows_CFoundation_CRect = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIClosestInteractiveBoundsRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_SearchBounds(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func get_ClosestInteractiveBoundsImpl() throws -> WindowsFoundation.Rect {
|
|
var value: __x_ABI_CWindows_CFoundation_CRect = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIClosestInteractiveBoundsRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ClosestInteractiveBounds(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func put_ClosestInteractiveBoundsImpl(_ value: WindowsFoundation.Rect) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIClosestInteractiveBoundsRequestedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_ClosestInteractiveBounds(pThis, .from(swift: value)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreAcceleratorKeys: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreAcceleratorKeys }
|
|
|
|
open func add_AcceleratorKeyActivatedImpl(_ handler: TypedEventHandler<UWP.CoreDispatcher?, UWP.AcceleratorKeyEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreDispatcher___x_ABI_CWindows__CUI__CCore__CAcceleratorKeyEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreAcceleratorKeys.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_AcceleratorKeyActivated(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_AcceleratorKeyActivatedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreAcceleratorKeys.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_AcceleratorKeyActivated(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
internal static var ICoreAcceleratorKeysVTable: __x_ABI_CWindows_CUI_CCore_CICoreAcceleratorKeysVtbl = .init(
|
|
QueryInterface: { ICoreAcceleratorKeysWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { ICoreAcceleratorKeysWrapper.addRef($0) },
|
|
Release: { ICoreAcceleratorKeysWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Windows_UI_Core.ICoreAcceleratorKeysWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Windows.UI.Core.ICoreAcceleratorKeys").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
add_AcceleratorKeyActivated: {
|
|
guard let __unwrapped__instance = ICoreAcceleratorKeysWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreDispatcher___x_ABI_CWindows__CUI__CCore__CAcceleratorKeyEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.acceleratorKeyActivated.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_AcceleratorKeyActivated: {
|
|
guard let __unwrapped__instance = ICoreAcceleratorKeysWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.acceleratorKeyActivated.removeHandler(cookie)
|
|
return S_OK
|
|
}
|
|
)
|
|
|
|
public typealias ICoreAcceleratorKeysWrapper = InterfaceWrapperBase<__IMPL_Windows_UI_Core.ICoreAcceleratorKeysBridge>
|
|
public class ICoreCursor: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreCursor }
|
|
|
|
internal func get_IdImpl() throws -> UInt32 {
|
|
var value: UINT32 = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreCursor.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_TypeImpl() throws -> UWP.CoreCursorType {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreCursorType = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreCursor.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Type(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreCursorFactory: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreCursorFactory }
|
|
|
|
internal func CreateCursorImpl(_ type: UWP.CoreCursorType, _ id: UInt32) throws -> ICoreCursor {
|
|
let (cursor) = try ComPtrs.initialize { cursorAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreCursorFactory.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateCursor(pThis, type, id, &cursorAbi))
|
|
}
|
|
}
|
|
return ICoreCursor(cursor!)
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreDispatcher: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreDispatcher }
|
|
|
|
internal func get_HasThreadAccessImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcher.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasThreadAccess(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
internal func ProcessEventsImpl(_ options: UWP.CoreProcessEventsOption) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcher.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.ProcessEvents(pThis, options))
|
|
}
|
|
}
|
|
|
|
internal func RunAsyncImpl(_ priority: UWP.CoreDispatcherPriority, _ agileCallback: UWP.DispatchedHandler?) throws -> WindowsFoundation.AnyIAsyncAction? {
|
|
let (asyncAction) = try ComPtrs.initialize { asyncActionAbi in
|
|
let agileCallbackWrapper = __ABI_Windows_UI_Core.DispatchedHandlerWrapper(agileCallback)
|
|
let _agileCallback = try! agileCallbackWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcher.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.RunAsync(pThis, priority, _agileCallback, &asyncActionAbi))
|
|
}
|
|
}
|
|
return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: asyncAction)
|
|
}
|
|
|
|
internal func RunIdleAsyncImpl(_ agileCallback: UWP.IdleDispatchedHandler?) throws -> WindowsFoundation.AnyIAsyncAction? {
|
|
let (asyncAction) = try ComPtrs.initialize { asyncActionAbi in
|
|
let agileCallbackWrapper = __ABI_Windows_UI_Core.IdleDispatchedHandlerWrapper(agileCallback)
|
|
let _agileCallback = try! agileCallbackWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcher.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.RunIdleAsync(pThis, _agileCallback, &asyncActionAbi))
|
|
}
|
|
}
|
|
return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: asyncAction)
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreDispatcher2: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreDispatcher2 }
|
|
|
|
internal func TryRunAsyncImpl(_ priority: UWP.CoreDispatcherPriority, _ agileCallback: UWP.DispatchedHandler?) throws -> WindowsFoundation.AnyIAsyncOperation<Bool>? {
|
|
let (asyncOperation) = try ComPtrs.initialize { asyncOperationAbi in
|
|
let agileCallbackWrapper = __ABI_Windows_UI_Core.DispatchedHandlerWrapper(agileCallback)
|
|
let _agileCallback = try! agileCallbackWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcher2.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.TryRunAsync(pThis, priority, _agileCallback, &asyncOperationAbi))
|
|
}
|
|
}
|
|
return UWP.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.unwrapFrom(abi: asyncOperation)
|
|
}
|
|
|
|
internal func TryRunIdleAsyncImpl(_ agileCallback: UWP.IdleDispatchedHandler?) throws -> WindowsFoundation.AnyIAsyncOperation<Bool>? {
|
|
let (asyncOperation) = try ComPtrs.initialize { asyncOperationAbi in
|
|
let agileCallbackWrapper = __ABI_Windows_UI_Core.IdleDispatchedHandlerWrapper(agileCallback)
|
|
let _agileCallback = try! agileCallbackWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcher2.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.TryRunIdleAsync(pThis, _agileCallback, &asyncOperationAbi))
|
|
}
|
|
}
|
|
return UWP.__x_ABI_C__FIAsyncOperation_1_booleanWrapper.unwrapFrom(abi: asyncOperation)
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreDispatcherWithTaskPriority: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority }
|
|
|
|
internal func get_CurrentPriorityImpl() throws -> UWP.CoreDispatcherPriority {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreDispatcherPriority = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_CurrentPriority(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func put_CurrentPriorityImpl(_ value: UWP.CoreDispatcherPriority) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_CurrentPriority(pThis, value))
|
|
}
|
|
}
|
|
|
|
internal func ShouldYieldImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.ShouldYield(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
internal func ShouldYieldToPriorityImpl(_ priority: UWP.CoreDispatcherPriority) throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.ShouldYieldToPriority(pThis, priority, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
internal func StopProcessEventsImpl() throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreDispatcherWithTaskPriority.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.StopProcessEvents(pThis))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class ICorePointerRedirector: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICorePointerRedirector }
|
|
|
|
open func add_PointerRoutedAwayImpl(_ handler: TypedEventHandler<UWP.AnyICorePointerRedirector?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CICorePointerRedirector___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerRoutedAway(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerRoutedAwayImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerRoutedAway(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerRoutedToImpl(_ handler: TypedEventHandler<UWP.AnyICorePointerRedirector?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CICorePointerRedirector___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerRoutedTo(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerRoutedToImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerRoutedTo(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerRoutedReleasedImpl(_ handler: TypedEventHandler<UWP.AnyICorePointerRedirector?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CICorePointerRedirector___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerRoutedReleased(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerRoutedReleasedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirector.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerRoutedReleased(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
internal static var ICorePointerRedirectorVTable: __x_ABI_CWindows_CUI_CCore_CICorePointerRedirectorVtbl = .init(
|
|
QueryInterface: { ICorePointerRedirectorWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { ICorePointerRedirectorWrapper.addRef($0) },
|
|
Release: { ICorePointerRedirectorWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Windows_UI_Core.ICorePointerRedirectorWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Windows.UI.Core.ICorePointerRedirector").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerRoutedAway: {
|
|
guard let __unwrapped__instance = ICorePointerRedirectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CICorePointerRedirector___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerRoutedAway.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerRoutedAway: {
|
|
guard let __unwrapped__instance = ICorePointerRedirectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerRoutedAway.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerRoutedTo: {
|
|
guard let __unwrapped__instance = ICorePointerRedirectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CICorePointerRedirector___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerRoutedTo.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerRoutedTo: {
|
|
guard let __unwrapped__instance = ICorePointerRedirectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerRoutedTo.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerRoutedReleased: {
|
|
guard let __unwrapped__instance = ICorePointerRedirectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CICorePointerRedirector___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerRoutedReleased.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerRoutedReleased: {
|
|
guard let __unwrapped__instance = ICorePointerRedirectorWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerRoutedReleased.removeHandler(cookie)
|
|
return S_OK
|
|
}
|
|
)
|
|
|
|
public typealias ICorePointerRedirectorWrapper = InterfaceWrapperBase<__IMPL_Windows_UI_Core.ICorePointerRedirectorBridge>
|
|
public class ICoreWindow: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindow }
|
|
|
|
open func get_AutomationHostProviderImpl() throws -> Any? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AutomationHostProvider(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_.AnyWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
open func get_BoundsImpl() throws -> WindowsFoundation.Rect {
|
|
var value: __x_ABI_CWindows_CFoundation_CRect = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Bounds(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
open func get_CustomPropertiesImpl() throws -> WindowsFoundation.AnyIPropertySet? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_CustomProperties(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return __ABI_Windows_Foundation_Collections.IPropertySetWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
open func get_DispatcherImpl() throws -> UWP.CoreDispatcher? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Dispatcher(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
open func get_FlowDirectionImpl() throws -> UWP.CoreWindowFlowDirection {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreWindowFlowDirection = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_FlowDirection(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
open func put_FlowDirectionImpl(_ value: UWP.CoreWindowFlowDirection) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_FlowDirection(pThis, value))
|
|
}
|
|
}
|
|
|
|
open func get_IsInputEnabledImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsInputEnabled(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
open func put_IsInputEnabledImpl(_ value: Bool) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsInputEnabled(pThis, .init(from: value)))
|
|
}
|
|
}
|
|
|
|
open func get_PointerCursorImpl() throws -> UWP.CoreCursor? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_PointerCursor(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
open func put_PointerCursorImpl(_ value: UWP.CoreCursor?) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_PointerCursor(pThis, RawPointer(value)))
|
|
}
|
|
}
|
|
|
|
open func get_PointerPositionImpl() throws -> WindowsFoundation.Point {
|
|
var value: __x_ABI_CWindows_CFoundation_CPoint = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_PointerPosition(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
open func get_VisibleImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Visible(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
open func ActivateImpl() throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Activate(pThis))
|
|
}
|
|
}
|
|
|
|
open func CloseImpl() throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Close(pThis))
|
|
}
|
|
}
|
|
|
|
open func GetAsyncKeyStateImpl(_ virtualKey: UWP.VirtualKey) throws -> UWP.CoreVirtualKeyStates {
|
|
var KeyState: __x_ABI_CWindows_CUI_CCore_CCoreVirtualKeyStates = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetAsyncKeyState(pThis, virtualKey, &KeyState))
|
|
}
|
|
return KeyState
|
|
}
|
|
|
|
open func GetKeyStateImpl(_ virtualKey: UWP.VirtualKey) throws -> UWP.CoreVirtualKeyStates {
|
|
var KeyState: __x_ABI_CWindows_CUI_CCore_CCoreVirtualKeyStates = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetKeyState(pThis, virtualKey, &KeyState))
|
|
}
|
|
return KeyState
|
|
}
|
|
|
|
open func ReleasePointerCaptureImpl() throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.ReleasePointerCapture(pThis))
|
|
}
|
|
}
|
|
|
|
open func SetPointerCaptureImpl() throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.SetPointerCapture(pThis))
|
|
}
|
|
}
|
|
|
|
open func add_ActivatedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.WindowActivatedEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CWindowActivatedEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_Activated(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_ActivatedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Activated(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_AutomationProviderRequestedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.AutomationProviderRequestedEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CAutomationProviderRequestedEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_AutomationProviderRequested(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_AutomationProviderRequestedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_AutomationProviderRequested(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_CharacterReceivedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.CharacterReceivedEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CCharacterReceivedEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_CharacterReceived(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_CharacterReceivedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_CharacterReceived(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_ClosedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.CoreWindowEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CCoreWindowEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_Closed(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_ClosedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Closed(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_InputEnabledImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.InputEnabledEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CInputEnabledEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_InputEnabled(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_InputEnabledImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_InputEnabled(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_KeyDownImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.KeyEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CKeyEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_KeyDown(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_KeyDownImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_KeyDown(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_KeyUpImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.KeyEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CKeyEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_KeyUp(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_KeyUpImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_KeyUp(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerCaptureLostImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerCaptureLost(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerCaptureLostImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerCaptureLost(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerEnteredImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerEntered(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerEnteredImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerEntered(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerExitedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerExited(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerExitedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerExited(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerMovedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerMoved(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerMovedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerMoved(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerPressedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerPressed(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerPressedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerPressed(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerReleasedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerReleased(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerReleasedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerReleased(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_TouchHitTestingImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.TouchHitTestingEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CTouchHitTestingEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_TouchHitTesting(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_TouchHitTestingImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_TouchHitTesting(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_PointerWheelChangedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.PointerEventArgs?>?) throws -> EventRegistrationToken {
|
|
var cookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_PointerWheelChanged(pThis, _handler, &cookie))
|
|
}
|
|
return cookie
|
|
}
|
|
|
|
open func remove_PointerWheelChangedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_PointerWheelChanged(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_SizeChangedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.WindowSizeChangedEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CWindowSizeChangedEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_SizeChanged(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_SizeChangedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_SizeChanged(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
open func add_VisibilityChangedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.VisibilityChangedEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CVisibilityChangedEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_VisibilityChanged(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
open func remove_VisibilityChangedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_VisibilityChanged(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
internal static var ICoreWindowVTable: __x_ABI_CWindows_CUI_CCore_CICoreWindowVtbl = .init(
|
|
QueryInterface: { ICoreWindowWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { ICoreWindowWrapper.addRef($0) },
|
|
Release: { ICoreWindowWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Windows_UI_Core.ICoreWindowWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Windows.UI.Core.ICoreWindow").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
get_AutomationHostProvider: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.automationHostProvider
|
|
let valueWrapper = __ABI_.AnyWrapper(value)
|
|
valueWrapper?.copyTo($1)
|
|
return S_OK
|
|
},
|
|
|
|
get_Bounds: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.bounds
|
|
$1?.initialize(to: .from(swift: value))
|
|
return S_OK
|
|
},
|
|
|
|
get_CustomProperties: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.customProperties
|
|
let valueWrapper = __ABI_Windows_Foundation_Collections.IPropertySetWrapper(value)
|
|
valueWrapper?.copyTo($1)
|
|
return S_OK
|
|
},
|
|
|
|
get_Dispatcher: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.dispatcher
|
|
value?.copyTo($1)
|
|
return S_OK
|
|
},
|
|
|
|
get_FlowDirection: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.flowDirection
|
|
$1?.initialize(to: value)
|
|
return S_OK
|
|
},
|
|
|
|
put_FlowDirection: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: UWP.CoreWindowFlowDirection = $1
|
|
__unwrapped__instance.flowDirection = value
|
|
return S_OK
|
|
},
|
|
|
|
get_IsInputEnabled: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.isInputEnabled
|
|
$1?.initialize(to: .init(from: value))
|
|
return S_OK
|
|
},
|
|
|
|
put_IsInputEnabled: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: Bool = .init(from: $1)
|
|
__unwrapped__instance.isInputEnabled = value
|
|
return S_OK
|
|
},
|
|
|
|
get_PointerCursor: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.pointerCursor
|
|
value?.copyTo($1)
|
|
return S_OK
|
|
},
|
|
|
|
put_PointerCursor: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: UWP.CoreCursor? = .from(abi: ComPtr($1))
|
|
__unwrapped__instance.pointerCursor = value
|
|
return S_OK
|
|
},
|
|
|
|
get_PointerPosition: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.pointerPosition
|
|
$1?.initialize(to: .from(swift: value))
|
|
return S_OK
|
|
},
|
|
|
|
get_Visible: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.visible
|
|
$1?.initialize(to: .init(from: value))
|
|
return S_OK
|
|
},
|
|
|
|
Activate: {
|
|
do {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
try __unwrapped__instance.activate()
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
Close: {
|
|
do {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
try __unwrapped__instance.close()
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
GetAsyncKeyState: {
|
|
do {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let virtualKey: UWP.VirtualKey = $1
|
|
let KeyState = try __unwrapped__instance.getAsyncKeyState(virtualKey)
|
|
$2?.initialize(to: KeyState)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
GetKeyState: {
|
|
do {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let virtualKey: UWP.VirtualKey = $1
|
|
let KeyState = try __unwrapped__instance.getKeyState(virtualKey)
|
|
$2?.initialize(to: KeyState)
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
ReleasePointerCapture: {
|
|
do {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
try __unwrapped__instance.releasePointerCapture()
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
SetPointerCapture: {
|
|
do {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
try __unwrapped__instance.setPointerCapture()
|
|
return S_OK
|
|
} catch { return failWith(err: E_FAIL) }
|
|
},
|
|
|
|
add_Activated: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CWindowActivatedEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.activated.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_Activated: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.activated.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_AutomationProviderRequested: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CAutomationProviderRequestedEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.automationProviderRequested.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_AutomationProviderRequested: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.automationProviderRequested.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_CharacterReceived: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CCharacterReceivedEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.characterReceived.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_CharacterReceived: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.characterReceived.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_Closed: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CCoreWindowEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.closed.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_Closed: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.closed.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_InputEnabled: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CInputEnabledEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.inputEnabled.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_InputEnabled: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.inputEnabled.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_KeyDown: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CKeyEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.keyDown.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_KeyDown: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.keyDown.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_KeyUp: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CKeyEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.keyUp.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_KeyUp: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.keyUp.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerCaptureLost: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerCaptureLost.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerCaptureLost: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerCaptureLost.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerEntered: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerEntered.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerEntered: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerEntered.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerExited: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerExited.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerExited: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerExited.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerMoved: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerMoved.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerMoved: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerMoved.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerPressed: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerPressed.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerPressed: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerPressed.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerReleased: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerReleased.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerReleased: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerReleased.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_TouchHitTesting: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CTouchHitTestingEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.touchHitTesting.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_TouchHitTesting: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.touchHitTesting.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_PointerWheelChanged: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CPointerEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let cookie = __unwrapped__instance.pointerWheelChanged.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: cookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_PointerWheelChanged: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.pointerWheelChanged.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_SizeChanged: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CWindowSizeChangedEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.sizeChanged.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_SizeChanged: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.sizeChanged.removeHandler(cookie)
|
|
return S_OK
|
|
},
|
|
|
|
add_VisibilityChanged: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
guard let handler = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CVisibilityChangedEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
|
let pCookie = __unwrapped__instance.visibilityChanged.addHandler(handler)
|
|
$2?.initialize(to: .from(swift: pCookie))
|
|
return S_OK
|
|
},
|
|
|
|
remove_VisibilityChanged: {
|
|
guard let __unwrapped__instance = ICoreWindowWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let cookie: EventRegistrationToken = $1
|
|
__unwrapped__instance.visibilityChanged.removeHandler(cookie)
|
|
return S_OK
|
|
}
|
|
)
|
|
|
|
public typealias ICoreWindowWrapper = InterfaceWrapperBase<__IMPL_Windows_UI_Core.ICoreWindowBridge>
|
|
public class ICoreWindow2: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindow2 }
|
|
|
|
internal func put_PointerPositionImpl(_ value: WindowsFoundation.Point) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow2.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_PointerPosition(pThis, .from(swift: value)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreWindow3: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindow3 }
|
|
|
|
internal func add_ClosestInteractiveBoundsRequestedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, UWP.ClosestInteractiveBoundsRequestedEventArgs?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow___x_ABI_CWindows__CUI__CCore__CClosestInteractiveBoundsRequestedEventArgsWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow3.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ClosestInteractiveBoundsRequested(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
internal func remove_ClosestInteractiveBoundsRequestedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow3.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ClosestInteractiveBoundsRequested(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
internal func GetCurrentKeyEventDeviceIdImpl() throws -> String {
|
|
var value: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow3.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetCurrentKeyEventDeviceId(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreWindow4: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindow4 }
|
|
|
|
internal func add_ResizeStartedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, Any?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow_IInspectableWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow4.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ResizeStarted(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
internal func remove_ResizeStartedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow4.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ResizeStarted(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
internal func add_ResizeCompletedImpl(_ handler: TypedEventHandler<UWP.CoreWindow?, Any?>?) throws -> EventRegistrationToken {
|
|
var pCookie: EventRegistrationToken = .init()
|
|
let handlerWrapper = UWP.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CUI__CCore__CCoreWindow_IInspectableWrapper(handler)
|
|
let _handler = try! handlerWrapper?.toABI { $0 }
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow4.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ResizeCompleted(pThis, _handler, &pCookie))
|
|
}
|
|
return pCookie
|
|
}
|
|
|
|
internal func remove_ResizeCompletedImpl(_ cookie: EventRegistrationToken) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow4.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ResizeCompleted(pThis, cookie))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreWindow5: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindow5 }
|
|
|
|
internal func get_DispatcherQueueImpl() throws -> UWP.DispatcherQueue? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow5.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DispatcherQueue(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func get_ActivationModeImpl() throws -> UWP.CoreWindowActivationMode {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreWindowActivationMode = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindow5.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ActivationMode(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreWindowEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindowEventArgs }
|
|
|
|
open func get_HandledImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindowEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Handled(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
open func put_HandledImpl(_ value: Bool) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindowEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Handled(pThis, .init(from: value)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
internal static var ICoreWindowEventArgsVTable: __x_ABI_CWindows_CUI_CCore_CICoreWindowEventArgsVtbl = .init(
|
|
QueryInterface: { ICoreWindowEventArgsWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { ICoreWindowEventArgsWrapper.addRef($0) },
|
|
Release: { ICoreWindowEventArgsWrapper.release($0) },
|
|
GetIids: {
|
|
let size = MemoryLayout<WindowsFoundation.IID>.size
|
|
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
|
iids[0] = IUnknown.IID
|
|
iids[1] = IInspectable.IID
|
|
iids[2] = __ABI_Windows_UI_Core.ICoreWindowEventArgsWrapper.IID
|
|
$1!.pointee = 3
|
|
$2!.pointee = iids
|
|
return S_OK
|
|
},
|
|
|
|
GetRuntimeClassName: {
|
|
_ = $0
|
|
let hstring = try! HString("Windows.UI.Core.ICoreWindowEventArgs").detach()
|
|
$1!.pointee = hstring
|
|
return S_OK
|
|
},
|
|
|
|
GetTrustLevel: {
|
|
_ = $0
|
|
$1!.pointee = TrustLevel(rawValue: 0)
|
|
return S_OK
|
|
},
|
|
|
|
get_Handled: {
|
|
guard let __unwrapped__instance = ICoreWindowEventArgsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value = __unwrapped__instance.handled
|
|
$1?.initialize(to: .init(from: value))
|
|
return S_OK
|
|
},
|
|
|
|
put_Handled: {
|
|
guard let __unwrapped__instance = ICoreWindowEventArgsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let value: Bool = .init(from: $1)
|
|
__unwrapped__instance.handled = value
|
|
return S_OK
|
|
}
|
|
)
|
|
|
|
public typealias ICoreWindowEventArgsWrapper = InterfaceWrapperBase<__IMPL_Windows_UI_Core.ICoreWindowEventArgsBridge>
|
|
public class ICoreWindowStatic: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindowStatic }
|
|
|
|
internal func GetForCurrentThreadImpl() throws -> UWP.CoreWindow? {
|
|
let (ppWindow) = try ComPtrs.initialize { ppWindowAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindowStatic.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetForCurrentThread(pThis, &ppWindowAbi))
|
|
}
|
|
}
|
|
return .from(abi: ppWindow)
|
|
}
|
|
|
|
}
|
|
|
|
public class ICoreWindowWithContext: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CICoreWindowWithContext }
|
|
|
|
internal func get_UIContextImpl() throws -> UWP.UIContext? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CICoreWindowWithContext.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_UIContext(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IIdleDispatchedHandlerArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandlerArgs }
|
|
|
|
internal func get_IsDispatcherIdleImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandlerArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsDispatcherIdle(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IInputEnabledEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIInputEnabledEventArgs }
|
|
|
|
internal func get_InputEnabledImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIInputEnabledEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_InputEnabled(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IKeyEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIKeyEventArgs }
|
|
|
|
internal func get_VirtualKeyImpl() throws -> UWP.VirtualKey {
|
|
var value: __x_ABI_CWindows_CSystem_CVirtualKey = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIKeyEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_VirtualKey(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func get_KeyStatusImpl() throws -> UWP.CorePhysicalKeyStatus {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCorePhysicalKeyStatus = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIKeyEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_KeyStatus(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IKeyEventArgs2: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIKeyEventArgs2 }
|
|
|
|
internal func get_DeviceIdImpl() throws -> String {
|
|
var value: HSTRING?
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIKeyEventArgs2.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DeviceId(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IPointerEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIPointerEventArgs }
|
|
|
|
internal func get_CurrentPointImpl() throws -> UWP.PointerPoint? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIPointerEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_CurrentPoint(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func get_KeyModifiersImpl() throws -> UWP.VirtualKeyModifiers {
|
|
var value: __x_ABI_CWindows_CSystem_CVirtualKeyModifiers = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIPointerEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_KeyModifiers(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
internal func GetIntermediatePointsImpl() throws -> WindowsFoundation.AnyIVector<UWP.PointerPoint?>? {
|
|
let (value) = try ComPtrs.initialize { valueAbi in
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIPointerEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.GetIntermediatePoints(pThis, &valueAbi))
|
|
}
|
|
}
|
|
return UWP.__x_ABI_C__FIVector_1___x_ABI_CWindows__CUI__CInput__CPointerPointWrapper.unwrapFrom(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class ITouchHitTestingEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs }
|
|
|
|
internal func get_ProximityEvaluationImpl() throws -> UWP.CoreProximityEvaluation {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreProximityEvaluation = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ProximityEvaluation(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func put_ProximityEvaluationImpl(_ value: UWP.CoreProximityEvaluation) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.put_ProximityEvaluation(pThis, .from(swift: value)))
|
|
}
|
|
}
|
|
|
|
internal func get_PointImpl() throws -> WindowsFoundation.Point {
|
|
var value: __x_ABI_CWindows_CFoundation_CPoint = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Point(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func get_BoundingBoxImpl() throws -> WindowsFoundation.Rect {
|
|
var value: __x_ABI_CWindows_CFoundation_CRect = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_BoundingBox(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
internal func EvaluateProximityToRectImpl(_ controlBoundingBox: WindowsFoundation.Rect) throws -> UWP.CoreProximityEvaluation {
|
|
var proximityEvaluation: __x_ABI_CWindows_CUI_CCore_CCoreProximityEvaluation = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CITouchHitTestingEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.EvaluateProximityToRect(pThis, .from(swift: controlBoundingBox), &proximityEvaluation))
|
|
}
|
|
return .from(abi: proximityEvaluation)
|
|
}
|
|
|
|
}
|
|
|
|
public class IVisibilityChangedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIVisibilityChangedEventArgs }
|
|
|
|
internal func get_VisibleImpl() throws -> Bool {
|
|
var value: boolean = 0
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIVisibilityChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Visible(pThis, &value))
|
|
}
|
|
return .init(from: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class IWindowActivatedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIWindowActivatedEventArgs }
|
|
|
|
internal func get_WindowActivationStateImpl() throws -> UWP.CoreWindowActivationState {
|
|
var value: __x_ABI_CWindows_CUI_CCore_CCoreWindowActivationState = .init(0)
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIWindowActivatedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_WindowActivationState(pThis, &value))
|
|
}
|
|
return value
|
|
}
|
|
|
|
}
|
|
|
|
public class IWindowSizeChangedEventArgs: WindowsFoundation.IInspectable {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIWindowSizeChangedEventArgs }
|
|
|
|
internal func get_SizeImpl() throws -> WindowsFoundation.Size {
|
|
var value: __x_ABI_CWindows_CFoundation_CSize = .init()
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIWindowSizeChangedEventArgs.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &value))
|
|
}
|
|
return .from(abi: value)
|
|
}
|
|
|
|
}
|
|
|
|
public class _ABI_CorePhysicalKeyStatus {
|
|
public var val: __x_ABI_CWindows_CUI_CCore_CCorePhysicalKeyStatus = .init()
|
|
public init() { }
|
|
public init(from swift: UWP.CorePhysicalKeyStatus) {
|
|
val.RepeatCount = swift.repeatCount
|
|
val.ScanCode = swift.scanCode
|
|
val.IsExtendedKey = .init(from: swift.isExtendedKey)
|
|
val.IsMenuKeyDown = .init(from: swift.isMenuKeyDown)
|
|
val.WasKeyDown = .init(from: swift.wasKeyDown)
|
|
val.IsKeyReleased = .init(from: swift.isKeyReleased)
|
|
}
|
|
|
|
public func detach() -> __x_ABI_CWindows_CUI_CCore_CCorePhysicalKeyStatus {
|
|
let result = val
|
|
return result
|
|
}
|
|
|
|
deinit {
|
|
}
|
|
}
|
|
}
|
|
extension __x_ABI_CWindows_CUI_CCore_CCoreProximityEvaluation {
|
|
public static func from(swift: UWP.CoreProximityEvaluation) -> __x_ABI_CWindows_CUI_CCore_CCoreProximityEvaluation {
|
|
.init(Score: swift.score, AdjustedPoint: .from(swift: swift.adjustedPoint))
|
|
}
|
|
}
|
|
// MARK - DispatchedHandler
|
|
extension __ABI_Windows_UI_Core {
|
|
public class DispatchedHandler: WindowsFoundation.IUnknown {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIDispatchedHandler }
|
|
|
|
open func InvokeImpl() throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIDispatchedHandler.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
typealias DispatchedHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_UI_Core.DispatchedHandlerBridge>
|
|
internal static var DispatchedHandlerVTable: __x_ABI_CWindows_CUI_CCore_CIDispatchedHandlerVtbl = .init(
|
|
QueryInterface: { DispatchedHandlerWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { DispatchedHandlerWrapper.addRef($0) },
|
|
Release: { DispatchedHandlerWrapper.release($0) },
|
|
Invoke: {
|
|
guard let __unwrapped__instance = DispatchedHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
__unwrapped__instance()
|
|
return S_OK
|
|
}
|
|
)
|
|
}
|
|
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CUI_CCore_CIDispatchedHandler {
|
|
static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_UI_Core.DispatchedHandlerVTable) { $0 }
|
|
return .init(lpVtbl:vtblPtr)
|
|
}
|
|
}
|
|
|
|
// MARK - IdleDispatchedHandler
|
|
extension __ABI_Windows_UI_Core {
|
|
public class IdleDispatchedHandler: WindowsFoundation.IUnknown {
|
|
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandler }
|
|
|
|
open func InvokeImpl(_ e: UWP.IdleDispatchedHandlerArgs?) throws {
|
|
_ = try perform(as: __x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandler.self) { pThis in
|
|
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, RawPointer(e)))
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
typealias IdleDispatchedHandlerWrapper = InterfaceWrapperBase<__IMPL_Windows_UI_Core.IdleDispatchedHandlerBridge>
|
|
internal static var IdleDispatchedHandlerVTable: __x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandlerVtbl = .init(
|
|
QueryInterface: { IdleDispatchedHandlerWrapper.queryInterface($0, $1, $2) },
|
|
AddRef: { IdleDispatchedHandlerWrapper.addRef($0) },
|
|
Release: { IdleDispatchedHandlerWrapper.release($0) },
|
|
Invoke: {
|
|
guard let __unwrapped__instance = IdleDispatchedHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
|
let e: UWP.IdleDispatchedHandlerArgs? = .from(abi: ComPtr($1))
|
|
__unwrapped__instance(e)
|
|
return S_OK
|
|
}
|
|
)
|
|
}
|
|
public extension WinRTDelegateBridge where CABI == __x_ABI_CWindows_CUI_CCore_CIIdleDispatchedHandler {
|
|
static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Windows_UI_Core.IdleDispatchedHandlerVTable) { $0 }
|
|
return .init(lpVtbl:vtblPtr)
|
|
}
|
|
}
|
|
|