Added internal Wine messages to perform SetWindowPos, ShowWindow and
[wine/multimedia.git] / include / queue.h
blob394e34f668bd4ca207fcf428099ea3e8756733d2
1 /*
2 * Message queues definitions
4 * Copyright 1993 Alexandre Julliard
5 */
7 #ifndef __WINE_QUEUE_H
8 #define __WINE_QUEUE_H
10 #include "windef.h"
11 #include "winbase.h"
12 #include "wingdi.h"
13 #include "winuser.h"
14 #include "thread.h"
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 */
31 } PERQUEUEDATA;
33 struct received_message_info;
35 /* Message queue */
36 typedef struct tagMESSAGEQUEUE
38 HQUEUE16 self; /* Handle to self (was: reserved) */
39 TEB* teb; /* Thread owning queue */
40 HANDLE server_queue; /* Handle to server-side queue */
41 struct received_message_info *receive_info; /* Info about message being currently received */
43 DWORD magic; /* magic number should be QUEUE_MAGIC */
44 DWORD lockCount; /* reference counter */
46 DWORD GetMessageTimeVal; /* Value for GetMessageTime */
47 DWORD GetMessagePosVal; /* Value for GetMessagePos */
48 DWORD GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
50 HANDLE16 hCurHook; /* Current hook */
51 HANDLE16 hooks[WH_NB_HOOKS]; /* Task hooks list */
53 PERQUEUEDATA *pQData; /* pointer to (shared) PERQUEUEDATA structure */
55 } MESSAGEQUEUE;
58 #define QUEUE_MAGIC 0xD46E80AF
60 /* Per queue data management methods */
61 HWND PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData );
62 HWND PERQDATA_SetFocusWnd( PERQUEUEDATA *pQData, HWND hWndFocus );
63 HWND PERQDATA_GetActiveWnd( PERQUEUEDATA *pQData );
64 HWND PERQDATA_SetActiveWnd( PERQUEUEDATA *pQData, HWND hWndActive );
65 HWND PERQDATA_GetCaptureWnd( INT *hittest );
66 HWND PERQDATA_SetCaptureWnd( HWND hWndCapture, INT hittest );
68 /* Message queue management methods */
69 extern MESSAGEQUEUE *QUEUE_Current(void);
70 extern MESSAGEQUEUE *QUEUE_Lock( HQUEUE16 hQueue );
71 extern void QUEUE_Unlock( MESSAGEQUEUE *queue );
72 extern void QUEUE_DeleteMsgQueue(void);
74 #endif /* __WINE_QUEUE_H */