Skip to content

Commit 929eb86

Browse files
committed
fix: add QS constants and update PM flags to use QS values
1 parent b5f726b commit 929eb86

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

source/win32/consts.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export * from './consts/OBM.js'
1717
export * from './consts/OCR.js'
1818
export * from './consts/OIC.js'
1919
export * from './consts/PM.js'
20+
export * from './consts/QS.js'
2021
export * from './consts/SW.js'
2122
export * from './consts/TPM.js'
2223
export * from './consts/WM.js'

source/win32/consts/PM.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { QS_ } from './QS.js';
12

23
/**
34
* PeekMessage flags
@@ -6,10 +7,10 @@ export enum PM_ {
67
NOREMOVE = 0x0000,
78
REMOVE = 0x0001,
89
NOYIELD = 0x0002,
9-
QS_INPUT = 0x000000E0,
10-
QS_POSTMSG = 0x00000008,
11-
QS_HOTKEY = 0x00000080,
12-
QS_TIMER = 0x00000010,
13-
QS_PAINT = 0x00000020,
14-
QS_SENDMSG = 0x00000040
10+
QS_INPUT = (QS_.INPUT << 16),
11+
QS_POSTMSG = (QS_.POSTMSG << 16),
12+
QS_HOTKEY = (QS_.HOTKEY << 16),
13+
QS_TIMER = (QS_.TIMER << 16),
14+
QS_PAINT = (QS_.PAINT << 16),
15+
QS_SENDMSG = (QS_.SENDMSG << 16)
1516
}

source/win32/consts/QS.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* QueueStatus flags
3+
*/
4+
export enum QS_ {
5+
KEY = 0x0001,
6+
MOUSEMOVE = 0x0002,
7+
MOUSEBUTTON = 0x0004,
8+
POSTMSG = 0x0008,
9+
TIMER = 0x0010,
10+
PAINT = 0x0020,
11+
SENDMSG = 0x0040,
12+
HOTKEY = 0x0080,
13+
ALLPOSTMSG = 0x0100,
14+
RAWINPUT = 0x0400,
15+
MOUSE = MOUSEMOVE | MOUSEBUTTON,
16+
INPUT = MOUSE | KEY | RAWINPUT,
17+
ALLEVENTS = INPUT | POSTMSG | TIMER | PAINT | HOTKEY,
18+
ALLINPUT = INPUT | POSTMSG | TIMER | PAINT | HOTKEY | SENDMSG
19+
}

0 commit comments

Comments
 (0)