Make sure edit and listbox controls are of same ASCII/Unicode style as
[wine.git] / include / queue.h
blobb53c7b775442422378c86da8e22af48d3442996a
1 /*
2 * Message queues definitions
4 * Copyright 1993 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_QUEUE_H
22 #define __WINE_QUEUE_H
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wingdi.h"
27 #include "winuser.h"
28 #include "thread.h"
30 #define WH_NB_HOOKS (WH_MAXHOOK-WH_MINHOOK+1)
32 /* Per-queue data for the message queue
33 * Note that we currently only store the current values for
34 * Active, Capture and Focus windows currently.
35 * It might be necessary to store a pointer to the system message queue
36 * as well since windows 9x maintains per thread system message queues
38 typedef struct tagPERQUEUEDATA
40 HWND hWndFocus; /* Focus window */
41 HWND hWndActive; /* Active window */
42 HWND hWndCapture; /* Capture window */
43 INT16 nCaptureHT; /* Capture info (hit-test) */
44 ULONG ulRefCount; /* Reference count */
45 CRITICAL_SECTION cSection; /* Critical section for thread safe access */
46 } PERQUEUEDATA;
48 struct received_message_info;
50 /* Message queue */
51 typedef struct tagMESSAGEQUEUE
53 HQUEUE16 self; /* Handle to self (was: reserved) */
54 TEB* teb; /* Thread owning queue */
55 HANDLE server_queue; /* Handle to server-side queue */
56 struct received_message_info *receive_info; /* Info about message being currently received */
58 DWORD magic; /* magic number should be QUEUE_MAGIC */
59 DWORD lockCount; /* reference counter */
61 DWORD GetMessageTimeVal; /* Value for GetMessageTime */
62 DWORD GetMessagePosVal; /* Value for GetMessagePos */
63 DWORD GetMessageExtraInfoVal; /* Value for GetMessageExtraInfo */
65 HANDLE16 hCurHook; /* Current hook */
66 HANDLE16 hooks[WH_NB_HOOKS]; /* Task hooks list */
68 PERQUEUEDATA *pQData; /* pointer to (shared) PERQUEUEDATA structure */
70 } MESSAGEQUEUE;
73 #define QUEUE_MAGIC 0xD46E80AF
75 /* Per queue data management methods */
76 HWND PERQDATA_GetFocusWnd( PERQUEUEDATA *pQData );
77 HWND PERQDATA_SetFocusWnd( PERQUEUEDATA *pQData, HWND hWndFocus );
78 HWND PERQDATA_GetActiveWnd( PERQUEUEDATA *pQData );
79 HWND PERQDATA_SetActiveWnd( PERQUEUEDATA *pQData, HWND hWndActive );
80 HWND PERQDATA_GetCaptureWnd( INT *hittest );
81 HWND PERQDATA_SetCaptureWnd( HWND hWndCapture, INT hittest );
83 /* Message queue management methods */
84 extern MESSAGEQUEUE *QUEUE_Current(void);
85 extern MESSAGEQUEUE *QUEUE_Lock( HQUEUE16 hQueue );
86 extern void QUEUE_Unlock( MESSAGEQUEUE *queue );
87 extern void QUEUE_DeleteMsgQueue(void);
89 #endif /* __WINE_QUEUE_H */