1996-03-14 18:08:34 +00:00
|
|
|
/*
|
|
|
|
* Message queues definitions
|
|
|
|
*
|
|
|
|
* Copyright 1993 Alexandre Julliard
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_QUEUE_H
|
|
|
|
#define __WINE_QUEUE_H
|
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
#include "windef.h"
|
2000-03-08 18:26:56 +00:00
|
|
|
#include "winbase.h"
|
2000-02-10 19:03:02 +00:00
|
|
|
#include "wingdi.h"
|
1999-02-21 18:23:26 +00:00
|
|
|
#include "winuser.h"
|
1999-01-26 09:30:05 +00:00
|
|
|
#include "thread.h"
|
|
|
|
|
1996-03-14 18:08:34 +00:00
|
|
|
|
1999-02-05 10:37:53 +00:00
|
|
|
/* Per-queue data for the message queue
|
|
|
|
* Note that we currently only store the current values for
|
|
|
|
* Active, Capture and Focus windows currently.
|
|
|
|
* It might be necessary to store a pointer to the system message queue
|
|
|
|
* as well since windows 9x maintains per thread system message queues
|
|
|
|
*/
|
1999-01-26 09:30:05 +00:00
|
|
|
typedef struct tagPERQUEUEDATA
|
|
|
|
{
|
1999-02-26 11:11:13 +00:00
|
|
|
HWND hWndFocus; /* Focus window */
|
|
|
|
HWND hWndActive; /* Active window */
|
|
|
|
HWND hWndCapture; /* Capture window */
|
1999-02-05 10:37:53 +00:00
|
|
|
INT16 nCaptureHT; /* Capture info (hit-test) */
|
|
|
|
ULONG ulRefCount; /* Reference count */
|
|
|
|
CRITICAL_SECTION cSection; /* Critical section for thread safe access */
|
1999-01-26 09:30:05 +00:00
|
|
|
} PERQUEUEDATA;
|
1996-03-14 18:08:34 +00:00
|
|
|
|
1999-02-05 10:37:53 +00:00
|
|
|
/* Message queue */
|
1996-03-14 18:08:34 +00:00
|
|
|
typedef struct tagMESSAGEQUEUE
|
|
|
|
{
|
1999-01-26 09:30:05 +00:00
|
|
|
HQUEUE16 self; /* Handle to self (was: reserved) */
|
1999-06-22 11:43:42 +00:00
|
|
|
TEB* teb; /* Thread owning queue */
|
2000-05-30 19:48:18 +00:00
|
|
|
HANDLE server_queue; /* Handle to server-side queue */
|
1999-01-26 09:30:05 +00:00
|
|
|
|
1999-01-28 10:54:11 +00:00
|
|
|
DWORD magic; /* magic number should be QUEUE_MAGIC */
|
|
|
|
DWORD lockCount; /* reference counter */
|
1999-01-26 09:30:05 +00:00
|
|
|
|
|
|
|
DWORD GetMessageTimeVal; /* Value for GetMessageTime */
|
|
|
|
DWORD GetMessagePosVal; /* Value for GetMessagePos */
|
|
|
|
DWORD GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
|
2001-05-18 22:51:56 +00:00
|
|
|
|
1999-01-26 09:30:05 +00:00
|
|
|
HANDLE16 hCurHook; /* Current hook */
|
|
|
|
HANDLE16 hooks[WH_NB_HOOKS]; /* Task hooks list */
|
|
|
|
|
1999-02-05 10:37:53 +00:00
|
|
|
PERQUEUEDATA *pQData; /* pointer to (shared) PERQUEUEDATA structure */
|
1999-01-26 09:30:05 +00:00
|
|
|
|
1996-03-14 18:08:34 +00:00
|
|
|
} MESSAGEQUEUE;
|
|
|
|
|
|
|
|
|
1999-01-28 10:54:11 +00:00
|
|
|
#define QUEUE_MAGIC 0xD46E80AF
|
|
|
|
|
1999-02-05 10:37:53 +00:00
|
|
|
/* Per queue data management methods */
|
1999-02-26 11:11:13 +00:00
|
|
|
HWND PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData );
|
|
|
|
HWND PERQDATA_SetFocusWnd( PERQUEUEDATA *pQData, HWND hWndFocus );
|
|
|
|
HWND PERQDATA_GetActiveWnd( PERQUEUEDATA *pQData );
|
|
|
|
HWND PERQDATA_SetActiveWnd( PERQUEUEDATA *pQData, HWND hWndActive );
|
2001-06-20 23:16:34 +00:00
|
|
|
HWND PERQDATA_GetCaptureWnd( INT *hittest );
|
|
|
|
HWND PERQDATA_SetCaptureWnd( HWND hWndCapture, INT hittest );
|
|
|
|
|
1999-02-05 10:37:53 +00:00
|
|
|
/* Message queue management methods */
|
2001-07-26 20:12:22 +00:00
|
|
|
extern MESSAGEQUEUE *QUEUE_Current(void);
|
1999-01-28 10:54:11 +00:00
|
|
|
extern MESSAGEQUEUE *QUEUE_Lock( HQUEUE16 hQueue );
|
|
|
|
extern void QUEUE_Unlock( MESSAGEQUEUE *queue );
|
1999-02-26 11:11:13 +00:00
|
|
|
extern BOOL QUEUE_IsExitingQueue( HQUEUE16 hQueue );
|
1997-05-25 13:58:18 +00:00
|
|
|
extern void QUEUE_SetExitingQueue( HQUEUE16 hQueue );
|
2001-07-26 20:12:22 +00:00
|
|
|
extern void QUEUE_DeleteMsgQueue(void);
|
1996-07-12 19:02:39 +00:00
|
|
|
extern HTASK16 QUEUE_GetQueueTask( HQUEUE16 hQueue );
|
2001-05-18 22:51:56 +00:00
|
|
|
extern void QUEUE_CleanupWindow( HWND hwnd );
|
1996-03-14 18:08:34 +00:00
|
|
|
|
|
|
|
#endif /* __WINE_QUEUE_H */
|