1 #ifndef __WIN32K_MSGQUEUE_H
2 #define __WIN32K_MSGQUEUE_H
6 typedef struct _USER_MESSAGE
10 } USER_MESSAGE, *PUSER_MESSAGE;
12 struct _USER_MESSAGE_QUEUE;
14 typedef struct _USER_SENT_MESSAGE
18 PKEVENT CompletionEvent;
20 struct _USER_MESSAGE_QUEUE* CompletionQueue;
21 SENDASYNCPROC CompletionCallback;
22 ULONG_PTR CompletionCallbackContext;
23 } USER_SENT_MESSAGE, *PUSER_SENT_MESSAGE;
25 typedef struct _USER_SENT_MESSAGE_NOTIFY
27 SENDASYNCPROC CompletionCallback;
28 ULONG_PTR CompletionCallbackContext;
33 } USER_SENT_MESSAGE_NOTIFY, *PUSER_SENT_MESSAGE_NOTIFY;
35 typedef struct _USER_MESSAGE_QUEUE
37 /* Queue of messages sent to the queue. */
38 LIST_ENTRY SentMessagesListHead;
39 /* Queue of messages posted to the queue. */
40 LIST_ENTRY PostedMessagesListHead;
41 /* Queue of sent-message notifies for the queue. */
42 LIST_ENTRY NotifyMessagesListHead;
43 /* Queue for hardware messages for the queue. */
44 LIST_ENTRY HardwareMessagesListHead;
45 /* Lock for the queue. */
47 /* True if a WM_QUIT message is pending. */
49 /* The quit exit code. */
51 /* Set if there are new messages in any of the queues. */
55 /* Current window with focus (ie. receives keyboard input) for this queue. */
57 /* True if a window needs painting. */
59 /* Count of paints pending. */
61 /* Current active window for this queue. */
63 /* Current capture window for this queue. */
66 /* queue state tracking */
72 } USER_MESSAGE_QUEUE, *PUSER_MESSAGE_QUEUE;
75 MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
76 PUSER_SENT_MESSAGE Message);
78 MsqInitializeMessage(PUSER_MESSAGE Message,
80 PUSER_MESSAGE FASTCALL
81 MsqCreateMessage(LPMSG Msg);
83 MsqDestroyMessage(PUSER_MESSAGE Message);
85 MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue,
86 PUSER_MESSAGE Message);
88 MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode);
90 MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
95 IN UINT MsgFilterHigh,
96 OUT PUSER_MESSAGE* Message);
98 MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
100 MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
101 PUSER_MESSAGE_QUEUE FASTCALL
102 MsqCreateMessageQueue(VOID);
104 MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
105 PUSER_MESSAGE_QUEUE FASTCALL
106 MsqGetHardwareMessageQueue(VOID);
108 MsqWaitForNewMessage(PUSER_MESSAGE_QUEUE MessageQueue);
110 MsqInitializeImpl(VOID);
112 MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue);
114 MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue);
116 MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue,
117 PUSER_SENT_MESSAGE_NOTIFY NotifyMessage);
119 MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
121 MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
123 IntSendMessage(HWND hWnd,
129 MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
131 MsqInsertSystemMessage(MSG* Msg, BOOL RemMouseMoveMsg);
133 inline BOOL MsqIsSignaled( PUSER_MESSAGE_QUEUE queue );
134 inline VOID MsqSetQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits );
135 inline VOID MsqClearQueueBits( PUSER_MESSAGE_QUEUE queue, WORD bits );
137 #define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
139 #endif /* __WIN32K_MSGQUEUE_H */