2 * Message queues definitions
4 * Copyright 1993 Alexandre Julliard
17 /* Per-queue data for the message queue
18 * Note that we currently only store the current values for
19 * Active, Capture and Focus windows currently.
20 * It might be necessary to store a pointer to the system message queue
21 * as well since windows 9x maintains per thread system message queues
23 typedef struct tagPERQUEUEDATA
25 HWND hWndFocus; /* Focus window */
26 HWND hWndActive; /* Active window */
27 HWND hWndCapture; /* Capture window */
28 INT16 nCaptureHT; /* Capture info (hit-test) */
29 ULONG ulRefCount; /* Reference count */
30 CRITICAL_SECTION cSection; /* Critical section for thread safe access */
34 typedef struct tagMESSAGEQUEUE
36 HQUEUE16 self; /* Handle to self (was: reserved) */
37 TEB* teb; /* Thread owning queue */
38 HANDLE server_queue; /* Handle to server-side queue */
40 DWORD magic; /* magic number should be QUEUE_MAGIC */
41 DWORD lockCount; /* reference counter */
43 DWORD GetMessageTimeVal; /* Value for GetMessageTime */
44 DWORD GetMessagePosVal; /* Value for GetMessagePos */
45 DWORD GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
47 HANDLE16 hCurHook; /* Current hook */
48 HANDLE16 hooks[WH_NB_HOOKS]; /* Task hooks list */
50 PERQUEUEDATA *pQData; /* pointer to (shared) PERQUEUEDATA structure */
55 #define QUEUE_MAGIC 0xD46E80AF
57 /* Per queue data management methods */
58 HWND PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData );
59 HWND PERQDATA_SetFocusWnd( PERQUEUEDATA *pQData, HWND hWndFocus );
60 HWND PERQDATA_GetActiveWnd( PERQUEUEDATA *pQData );
61 HWND PERQDATA_SetActiveWnd( PERQUEUEDATA *pQData, HWND hWndActive );
62 HWND PERQDATA_GetCaptureWnd( INT *hittest );
63 HWND PERQDATA_SetCaptureWnd( HWND hWndCapture, INT hittest );
65 /* Message queue management methods */
66 extern MESSAGEQUEUE *QUEUE_Lock( HQUEUE16 hQueue );
67 extern void QUEUE_Unlock( MESSAGEQUEUE *queue );
68 extern BOOL QUEUE_IsExitingQueue( HQUEUE16 hQueue );
69 extern void QUEUE_SetExitingQueue( HQUEUE16 hQueue );
70 extern BOOL QUEUE_DeleteMsgQueue( HQUEUE16 hQueue );
71 extern HTASK16 QUEUE_GetQueueTask( HQUEUE16 hQueue );
72 extern void QUEUE_CleanupWindow( HWND hwnd );
74 extern HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags );
76 #endif /* __WINE_QUEUE_H */