reactos/reactos/subsys/win32k/include/msgqueue.h
Casper Hornstrup 9826d4e679 2003-07-05 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/win32k/ntuser.h (NtUserSetFocus): Correct prototype.
	* lib/user32/misc/stubs.c (SetFocus): Remove.
	* lib/user32/windows/defwnd.c (KEYDATA_ALT): New.
	(User32DefWindowProc): Handle WM_SYSKEYDOWN.
	* lib/user32/windows/input.c (SetFocus): New.
	* subsys/win32k/include/msgqueue.h (USER_MESSAGE_QUEUE): Document
	FocusWindow field.
	* subsys/win32k/include/window.h (W32kSetFocusWindow): Change return type
	to HWND.
	* subsys/win32k/include/winsta.h (W32kGetFocusMessageQueue): New.
	* subsys/win32k/ntuser/input.c (KeyboardThreadMain): Handle system keys.
	* subsys/win32k/ntuser/keyboard.c (NtUserSetFocus): New.
	* subsys/win32k/ntuser/msgqueue.c (MsqPostKeyboardMessage): Implement.
	* subsys/win32k/ntuser/stubs.c (NtUserSetFocus): Remove.
	* subsys/win32k/ntuser/window.c (W32kSetFocusWindow): Implement.
	(NtUserGetClientRect, W32kGetWindowProc, NtUserCreateWindowEx): Release
	window reference on error.
	(W32kDestroyWindow): Remove focus from window tree before destroying it
	if needed.
	* subsys/win32k/ntuser/winpos.c (WinPosChangeActiveWindow): Implement.
	(WinPosShowWindow): Activate window if needed.
	* subsys/win32k/ntuser/winsta.c (W32kGetFocusMessageQueue): New.

svn path=/trunk/; revision=5000
2003-07-05 16:04:01 +00:00

130 lines
3.6 KiB
C

#ifndef __WIN32K_MSGQUEUE_H
#define __WIN32K_MSGQUEUE_H
#include <windows.h>
typedef struct _USER_MESSAGE
{
LIST_ENTRY ListEntry;
MSG Msg;
} USER_MESSAGE, *PUSER_MESSAGE;
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;
typedef struct _USER_MESSAGE_QUEUE
{
/* Queue of messages sent to the queue. */
LIST_ENTRY SentMessagesListHead;
/* Queue of messages posted to the queue. */
LIST_ENTRY PostedMessagesListHead;
/* Queue of sent-message notifies for the queue. */
LIST_ENTRY NotifyMessagesListHead;
/* Queue for hardware messages for the queue. */
LIST_ENTRY HardwareMessagesListHead;
/* Lock for the queue. */
FAST_MUTEX Lock;
/* True if a WM_QUIT message is pending. */
BOOLEAN QuitPosted;
/* The quit exit code. */
ULONG QuitExitCode;
/* Set if there are new messages in any of the queues. */
KEVENT NewMessages;
/* FIXME: Unknown. */
ULONG QueueStatus;
/* Current window with focus (ie. receives keyboard input) for this queue. */
HWND FocusWindow;
/* True if a window needs painting. */
BOOLEAN PaintPosted;
/* Count of paints pending. */
ULONG PaintCount;
/* Current active window for this queue. */
HWND ActiveWindow;
/* Current capture window for this queue. */
HWND CaptureWindow;
} USER_MESSAGE_QUEUE, *PUSER_MESSAGE_QUEUE;
VOID FASTCALL
MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
PUSER_SENT_MESSAGE Message);
VOID FASTCALL
MsqInitializeMessage(PUSER_MESSAGE Message,
LPMSG Msg);
PUSER_MESSAGE FASTCALL
MsqCreateMessage(LPMSG Msg);
VOID FASTCALL
MsqDestroyMessage(PUSER_MESSAGE Message);
VOID FASTCALL
MsqPostMessage(PUSER_MESSAGE_QUEUE MessageQueue,
PUSER_MESSAGE Message);
VOID FASTCALL
MsqPostQuitMessage(PUSER_MESSAGE_QUEUE MessageQueue, ULONG ExitCode);
BOOLEAN STDCALL
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);
VOID FASTCALL
MsqInitializeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
VOID FASTCALL
MsqFreeMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
PUSER_MESSAGE_QUEUE FASTCALL
MsqCreateMessageQueue(VOID);
VOID FASTCALL
MsqDestroyMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue);
PUSER_MESSAGE_QUEUE FASTCALL
MsqGetHardwareMessageQueue(VOID);
NTSTATUS FASTCALL
MsqWaitForNewMessage(PUSER_MESSAGE_QUEUE MessageQueue);
NTSTATUS FASTCALL
MsqInitializeImpl(VOID);
BOOLEAN FASTCALL
MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue);
NTSTATUS FASTCALL
MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue);
VOID FASTCALL
MsqSendNotifyMessage(PUSER_MESSAGE_QUEUE MessageQueue,
PUSER_SENT_MESSAGE_NOTIFY NotifyMessage);
VOID FASTCALL
MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
VOID FASTCALL
MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue);
LRESULT STDCALL
W32kSendMessage(HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam,
BOOL KernelMessage);
VOID STDCALL
MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
VOID FASTCALL
MsqInsertSystemMessage(MSG* Msg);
#define MAKE_LONG(x, y) ((((y) & 0xFFFF) << 16) | ((x) & 0xFFFF))
#endif /* __WIN32K_MSGQUEUE_H */
/* EOF */