2001-06-12 17:51:51 +00:00
|
|
|
#ifndef __WIN32K_MSGQUEUE_H
|
|
|
|
#define __WIN32K_MSGQUEUE_H
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
typedef struct _USER_MESSAGE
|
|
|
|
{
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
MSG Msg;
|
|
|
|
} USER_MESSAGE, *PUSER_MESSAGE;
|
|
|
|
|
2002-05-06 22:20:32 +00:00
|
|
|
struct _USER_MESSAGE_QUEUE;
|
|
|
|
|
|
|
|
typedef struct _USER_SENT_MESSAGE
|
|
|
|
{
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
MSG Msg;
|
|
|
|
PKEVENT CompletionEvent;
|
|
|
|
LRESULT* Result;
|
|
|
|
struct _USER_MESSAGE_QUEUE* CompletionQueue;
|
|
|
|
SENDASYNCPROC CompletionCallback;
|
|
|
|
ULONG_PTR CompletionCallbackContext;
|
|
|
|
} USER_SENT_MESSAGE, *PUSER_SENT_MESSAGE;
|
|
|
|
|
|
|
|
typedef struct _USER_SENT_MESSAGE_NOTIFY
|
|
|
|
{
|
|
|
|
SENDASYNCPROC CompletionCallback;
|
|
|
|
ULONG_PTR CompletionCallbackContext;
|
|
|
|
LRESULT Result;
|
|
|
|
HWND hWnd;
|
|
|
|
UINT Msg;
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
} USER_SENT_MESSAGE_NOTIFY, *PUSER_SENT_MESSAGE_NOTIFY;
|
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
typedef struct _USER_MESSAGE_QUEUE
|
|
|
|
{
|
2002-07-04 19:56:38 +00:00
|
|
|
/* Queue of messages sent to the queue. */
|
2002-01-13 22:52:08 +00:00
|
|
|
LIST_ENTRY SentMessagesListHead;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* Queue of messages posted to the queue. */
|
2002-01-13 22:52:08 +00:00
|
|
|
LIST_ENTRY PostedMessagesListHead;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* Queue of sent-message notifies for the queue. */
|
2002-05-06 22:20:32 +00:00
|
|
|
LIST_ENTRY NotifyMessagesListHead;
|
2002-10-31 00:03:31 +00:00
|
|
|
/* Queue for hardware messages for the queue. */
|
|
|
|
LIST_ENTRY HardwareMessagesListHead;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* Lock for the queue. */
|
2002-01-13 22:52:08 +00:00
|
|
|
FAST_MUTEX Lock;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* True if a WM_QUIT message is pending. */
|
2002-01-13 22:52:08 +00:00
|
|
|
BOOLEAN QuitPosted;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* The quit exit code. */
|
2002-01-13 22:52:08 +00:00
|
|
|
ULONG QuitExitCode;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* Set if there are new messages in any of the queues. */
|
2002-01-13 22:52:08 +00:00
|
|
|
KEVENT NewMessages;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* FIXME: Unknown. */
|
2002-01-13 22:52:08 +00:00
|
|
|
ULONG QueueStatus;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* Current window with focus for this queue. */
|
2002-01-13 22:52:08 +00:00
|
|
|
HWND FocusWindow;
|
2002-07-04 19:56:38 +00:00
|
|
|
/* True if a window needs painting. */
|
|
|
|
BOOLEAN PaintPosted;
|
|
|
|
/* Count of paints pending. */
|
|
|
|
ULONG PaintCount;
|
2002-07-17 21:04:57 +00:00
|
|
|
/* Current active window for this queue. */
|
|
|
|
HWND ActiveWindow;
|
|
|
|
/* Current capture window for this queue. */
|
|
|
|
HWND CaptureWindow;
|
2001-06-12 17:51:51 +00:00
|
|
|
} USER_MESSAGE_QUEUE, *PUSER_MESSAGE_QUEUE;
|
|
|
|
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-05-06 22:20:32 +00:00
|
|
|
MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
|
|
|
PUSER_SENT_MESSAGE Message);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqInitializeMessage(PUSER_MESSAGE Message,
|
|
|
|
LPMSG Msg);
|
2003-05-18 17:16:18 +00:00
|
|
|
PUSER_MESSAGE FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqCreateMessage(LPMSG Msg);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqDestroyMessage(PUSER_MESSAGE Message);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
2002-10-31 00:03:31 +00:00
|
|
|
PUSER_MESSAGE Message);
|
2003-05-21 22:58:43 +00:00
|
|
|
VOID FASTCALL
|
|
|
|
MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode);
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOLEAN STDCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqFindMessage(IN PUSER_MESSAGE_QUEUE MessageQueue,
|
|
|
|
IN BOOLEAN Hardware,
|
|
|
|
IN BOOLEAN Remove,
|
|
|
|
IN HWND Wnd,
|
|
|
|
IN UINT MsgFilterLow,
|
|
|
|
IN UINT MsgFilterHigh,
|
|
|
|
OUT PUSER_MESSAGE* Message);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
|
2003-05-18 17:16:18 +00:00
|
|
|
PUSER_MESSAGE_QUEUE FASTCALL
|
2001-06-12 17:51:51 +00:00
|
|
|
MsqCreateMessageQueue(VOID);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
|
2003-05-18 17:16:18 +00:00
|
|
|
PUSER_MESSAGE_QUEUE FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqGetHardwareMessageQueue(VOID);
|
2003-05-18 17:16:18 +00:00
|
|
|
NTSTATUS FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqWaitForNewMessage(PUSER_MESSAGE_QUEUE MessageQueue);
|
2003-05-18 17:16:18 +00:00
|
|
|
NTSTATUS FASTCALL
|
2002-01-13 22:52:08 +00:00
|
|
|
MsqInitializeImpl(VOID);
|
2003-05-18 17:16:18 +00:00
|
|
|
BOOLEAN FASTCALL
|
2002-07-04 19:56:38 +00:00
|
|
|
MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue);
|
2003-05-18 17:16:18 +00:00
|
|
|
NTSTATUS FASTCALL
|
2002-07-04 19:56:38 +00:00
|
|
|
MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-07-04 19:56:38 +00:00
|
|
|
MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
|
|
|
PUSER_SENT_MESSAGE_NOTIFY NotifyMessage);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-08-26 23:20:54 +00:00
|
|
|
MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-08-26 23:20:54 +00:00
|
|
|
MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
|
2002-07-17 21:04:57 +00:00
|
|
|
LRESULT STDCALL
|
|
|
|
W32kSendMessage(HWND hWnd,
|
|
|
|
UINT Msg,
|
|
|
|
WPARAM wParam,
|
|
|
|
LPARAM lParam,
|
|
|
|
BOOL KernelMessage);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID STDCALL
|
2002-10-31 00:03:31 +00:00
|
|
|
MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2003-05-18 17:16:18 +00:00
|
|
|
VOID FASTCALL
|
2002-10-31 00:03:31 +00:00
|
|
|
MsqInsertSystemMessage(MSG* Msg);
|
2001-06-12 17:51:51 +00:00
|
|
|
|
2002-05-06 22:20:32 +00:00
|
|
|
#define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
|
|
|
|
|
2001-06-12 17:51:51 +00:00
|
|
|
#endif /* __WIN32K_MSGQUEUE_H */
|
|
|
|
|
|
|
|
/* EOF */
|