2 * Message queues definitions
4 * Copyright 1993 Alexandre Julliard
16 /* Message as stored in the queue (contains the extraInfo field) */
17 typedef struct tagQMSG
19 DWORD extraInfo
; /* Only in 3.1 */
24 typedef struct tagMESSAGEQUEUE
26 HQUEUE next
; /* 00 Next queue */
27 HTASK hTask
; /* 02 hTask owning the queue */
28 WORD msgSize
; /* 04 Size of messages in the queue */
29 WORD msgCount
; /* 06 Number of waiting messages */
30 WORD nextMessage
; /* 08 Next message to be retrieved */
31 WORD nextFreeMessage
; /* 0a Next available slot in the queue */
32 WORD queueSize
; /* 0c Size of the queue */
33 DWORD GetMessageTimeVal WINE_PACKED
; /* 0e Value for GetMessageTime */
34 DWORD GetMessagePosVal WINE_PACKED
; /* 12 Value for GetMessagePos */
35 WORD reserved1
; /* 16 Unknown */
36 DWORD GetMessageExtraInfoVal
; /* 18 Value for GetMessageExtraInfo */
37 WORD reserved2
; /* 1c Unknown */
38 LPARAM lParam WINE_PACKED
; /* 1e Next 4 values set by SendMessage */
39 WPARAM wParam
; /* 22 */
42 DWORD SendMessageReturn
; /* 28 Return value for SendMessage */
43 WORD wPostQMsg
; /* 2c PostQuitMessage flag */
44 WORD wExitCode
; /* 2e PostQuitMessage exit code */
45 WORD reserved3
[3]; /* 30 Unknown */
46 WORD wWinVersion
; /* 36 Expected Windows version */
47 HQUEUE InSendMessageHandle
; /* 38 Queue of task that sent a message */
48 HTASK hSendingTask
; /* 3a Handle of task that sent a message */
49 HTASK hPrevSendingTask
; /* 3c Handle of previous sender */
50 WORD wPaintCount
; /* 3e Number of WM_PAINT needed */
51 WORD wTimerCount
; /* 40 Number of timers for this task */
52 WORD tempStatus
; /* 42 State reset by GetQueueStatus */
53 WORD status
; /* 44 Queue state */
54 WORD wakeMask
; /* 46 Task wake-up mask */
55 WORD SendMsgReturnPtrs
[3]; /* 48 Near ptr to return values (?) */
56 HANDLE hCurHook
; /* 4e Current hook */
57 HANDLE hooks
[WH_NB_HOOKS
]; /* 50 Task hooks list */
58 WORD reserved4
[3]; /* 68 Unknown */
59 QMSG messages
[1]; /* 6e Queue messages */
66 extern void QUEUE_DumpQueue( HQUEUE hQueue
);
67 extern void QUEUE_WalkQueues(void);
68 extern MESSAGEQUEUE
*QUEUE_GetSysQueue(void);
69 extern void QUEUE_IncPaintCount( HQUEUE hQueue
);
70 extern void QUEUE_DecPaintCount( HQUEUE hQueue
);
71 extern void QUEUE_IncTimerCount( HQUEUE hQueue
);
72 extern void QUEUE_DecTimerCount( HQUEUE hQueue
);
73 extern BOOL
QUEUE_CreateSysMsgQueue( int size
);
74 extern BOOL
QUEUE_DeleteMsgQueue( HQUEUE hQueue
);
75 extern HTASK
QUEUE_GetQueueTask( HQUEUE hQueue
);
76 extern BOOL
QUEUE_AddMsg( HQUEUE hQueue
, MSG
* msg
, DWORD extraInfo
);
77 extern int QUEUE_FindMsg( MESSAGEQUEUE
* msgQueue
, HWND hwnd
,
78 int first
, int last
);
79 extern void QUEUE_RemoveMsg( MESSAGEQUEUE
* msgQueue
, int pos
);
80 extern void hardware_event( WORD message
, WORD wParam
, LONG lParam
,
81 int xPos
, int yPos
, DWORD time
, DWORD extraInfo
);
83 #endif /* __WINE_QUEUE_H */