Skip to content

Commit c5363f7

Browse files
committed
SwiftWin32: add more inline constant definitions
These cannot be imported properly through the clang importer due to the "complex" nature of the definition. Re-define them locally to allow usage of the constants.
1 parent e3a82ca commit c5363f7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Sources/SwiftWin32/Support/WinSDK+Extensions.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,26 @@ internal var HWND_MESSAGE: HWND {
127127
HWND(bitPattern: -3)!
128128
}
129129

130+
@_transparent
131+
internal var QS_MOUSE: DWORD {
132+
DWORD(QS_MOUSEMOVE) | DWORD(QS_MOUSEBUTTON)
133+
}
134+
135+
@_transparent
136+
internal var QS_INPUT: DWORD {
137+
DWORD(QS_MOUSE) | DWORD(QS_KEY) | DWORD(QS_RAWINPUT) | DWORD(QS_TOUCH) | DWORD(QS_POINTER)
138+
}
139+
140+
@_transparent
141+
internal var QS_ALLEVENTS: DWORD {
142+
DWORD(QS_INPUT) | DWORD(QS_POSTMESSAGE) | DWORD(QS_TIMER) | DWORD(QS_PAINT) | DWORD(QS_HOTKEY)
143+
}
144+
145+
@_transparent
146+
internal var QS_ALLINPUT: DWORD {
147+
DWORD(QS_INPUT) | DWORD(QS_POSTMESSAGE) | DWORD(QS_TIMER) | DWORD(QS_PAINT) | DWORD(QS_HOTKEY) | DWORD(QS_SENDMESSAGE)
148+
}
149+
130150
@_transparent
131151
internal var WS_BORDER: DWORD {
132152
DWORD(WinSDK.WS_BORDER)

0 commit comments

Comments
 (0)