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 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. */
65 } USER_MESSAGE_QUEUE, *PUSER_MESSAGE_QUEUE;
68 MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
69 PUSER_SENT_MESSAGE Message);
71 MsqInitializeMessage(PUSER_MESSAGE Message,
74 MsqCreateMessage(LPMSG Msg);
76 MsqDestroyMessage(PUSER_MESSAGE Message);
78 MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue,
79 PUSER_MESSAGE Message);
81 MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
86 IN UINT MsgFilterHigh,
87 OUT PUSER_MESSAGE* Message);
89 MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
91 MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
93 MsqCreateMessageQueue(VOID);
95 MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
97 MsqGetHardwareMessageQueue(VOID);
99 MsqWaitForNewMessage(PUSER_MESSAGE_QUEUE MessageQueue);
101 MsqInitializeImpl(VOID);
103 MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue);
105 MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue);
107 MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue,
108 PUSER_SENT_MESSAGE_NOTIFY NotifyMessage);
110 MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
112 MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
114 W32kSendMessage(HWND hWnd,
120 MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
122 MsqInsertSystemMessage(MSG* Msg);
124 #define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
126 #endif /* __WIN32K_MSGQUEUE_H */