Commit d253c58b authored by Alexandre Julliard's avatar Alexandre Julliard

Rewrote most of SendMessage/PeekMessage.

Implemented inter-process messaging. Moved most message routines to dlls/user, and split off 16-bit routines to a separate file.
parent 252b0fe0
...@@ -18,8 +18,10 @@ C_SRCS = \ ...@@ -18,8 +18,10 @@ C_SRCS = \
display.c \ display.c \
exticon.c \ exticon.c \
lstr.c \ lstr.c \
message.c \
misc.c \ misc.c \
mouse.c \ mouse.c \
msg16.c \
network.c \ network.c \
resource.c \ resource.c \
text.c \ text.c \
......
...@@ -112,8 +112,8 @@ rsrc resources/version16.res ...@@ -112,8 +112,8 @@ rsrc resources/version16.res
105 pascal16 FlashWindow(word word) FlashWindow16 105 pascal16 FlashWindow(word word) FlashWindow16
106 pascal16 GetKeyState(word) GetKeyState16 106 pascal16 GetKeyState(word) GetKeyState16
107 pascal DefWindowProc(word word word long) DefWindowProc16 107 pascal DefWindowProc(word word word long) DefWindowProc16
108 pascal16 GetMessage(segptr word word word) GetMessage16 108 pascal16 GetMessage(ptr word word word) GetMessage16
109 pascal16 PeekMessage(segptr word word word word) PeekMessage16 109 pascal16 PeekMessage(ptr word word word word) PeekMessage16
110 pascal16 PostMessage(word word word long) PostMessage16 110 pascal16 PostMessage(word word word long) PostMessage16
111 pascal SendMessage(word word word long) SendMessage16 111 pascal SendMessage(word word word long) SendMessage16
112 pascal16 WaitMessage() WaitMessage 112 pascal16 WaitMessage() WaitMessage
...@@ -538,8 +538,8 @@ rsrc resources/version16.res ...@@ -538,8 +538,8 @@ rsrc resources/version16.res
802 stub OPENFILENAME_CALLBACK16 802 stub OPENFILENAME_CALLBACK16
803 stub PRINTDLG_CALLBACK16 803 stub PRINTDLG_CALLBACK16
804 stub CHOOSECOLOR_CALLBACK16 804 stub CHOOSECOLOR_CALLBACK16
819 pascal16 PeekMessage32(segptr word word word word word) PeekMessage32_16 819 pascal16 PeekMessage32(ptr word word word word word) PeekMessage32_16
820 pascal GetMessage32(segptr word word word word) GetMessage32_16 820 pascal GetMessage32(ptr word word word word) GetMessage32_16
821 pascal16 TranslateMessage32(ptr word) TranslateMessage32_16 821 pascal16 TranslateMessage32(ptr word) TranslateMessage32_16
#821 stub IsDialogMessage32 # FIXME: two ordinal 821??? #821 stub IsDialogMessage32 # FIXME: two ordinal 821???
822 pascal DispatchMessage32(ptr word) DispatchMessage32_16 822 pascal DispatchMessage32(ptr word) DispatchMessage32_16
......
...@@ -11,12 +11,14 @@ ...@@ -11,12 +11,14 @@
#include "wine/windef16.h" #include "wine/windef16.h"
#include "winproc.h" #include "winproc.h"
struct tagMSG;
/* message.c */ /* message.c */
extern BOOL MSG_InternalGetMessage( struct tagMSG *msg, HWND hwnd, HWND hwndOwner, extern BOOL MSG_process_raw_hardware_message( MSG *msg, ULONG_PTR extra_info, HWND hwnd_filter,
UINT first, UINT last, WPARAM code, UINT first, UINT last, BOOL remove );
WORD flags, BOOL sendIdle, BOOL* idleSent ); extern BOOL MSG_process_cooked_hardware_message( MSG *msg, BOOL remove );
extern void MSG_JournalPlayBackMsg(void);
/* sendmsg.c */
extern BOOL MSG_peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, int flags );
/* timer.c */ /* timer.c */
extern void TIMER_RemoveWindowTimers( HWND hwnd ); extern void TIMER_RemoveWindowTimers( HWND hwnd );
......
...@@ -30,12 +30,15 @@ typedef struct tagPERQUEUEDATA ...@@ -30,12 +30,15 @@ typedef struct tagPERQUEUEDATA
CRITICAL_SECTION cSection; /* Critical section for thread safe access */ CRITICAL_SECTION cSection; /* Critical section for thread safe access */
} PERQUEUEDATA; } PERQUEUEDATA;
struct received_message_info;
/* Message queue */ /* Message queue */
typedef struct tagMESSAGEQUEUE typedef struct tagMESSAGEQUEUE
{ {
HQUEUE16 self; /* Handle to self (was: reserved) */ HQUEUE16 self; /* Handle to self (was: reserved) */
TEB* teb; /* Thread owning queue */ TEB* teb; /* Thread owning queue */
HANDLE server_queue; /* Handle to server-side queue */ HANDLE server_queue; /* Handle to server-side queue */
struct received_message_info *receive_info; /* Info about message being currently received */
DWORD magic; /* magic number should be QUEUE_MAGIC */ DWORD magic; /* magic number should be QUEUE_MAGIC */
DWORD lockCount; /* reference counter */ DWORD lockCount; /* reference counter */
...@@ -69,7 +72,6 @@ extern void QUEUE_Unlock( MESSAGEQUEUE *queue ); ...@@ -69,7 +72,6 @@ extern void QUEUE_Unlock( MESSAGEQUEUE *queue );
extern BOOL QUEUE_IsExitingQueue( HQUEUE16 hQueue ); extern BOOL QUEUE_IsExitingQueue( HQUEUE16 hQueue );
extern void QUEUE_SetExitingQueue( HQUEUE16 hQueue ); extern void QUEUE_SetExitingQueue( HQUEUE16 hQueue );
extern void QUEUE_DeleteMsgQueue(void); extern void QUEUE_DeleteMsgQueue(void);
extern HTASK16 QUEUE_GetQueueTask( HQUEUE16 hQueue );
extern void QUEUE_CleanupWindow( HWND hwnd ); extern void QUEUE_CleanupWindow( HWND hwnd );
#endif /* __WINE_QUEUE_H */ #endif /* __WINE_QUEUE_H */
...@@ -1338,20 +1338,31 @@ struct wait_input_idle_request ...@@ -1338,20 +1338,31 @@ struct wait_input_idle_request
struct send_message_request struct send_message_request
{ {
struct request_header __header; struct request_header __header;
int kind;
void* id; void* id;
int type; int type;
handle_t win; handle_t win;
unsigned int msg; unsigned int msg;
unsigned int wparam; unsigned int wparam;
unsigned int lparam; unsigned int lparam;
unsigned short x; int x;
unsigned short y; int y;
unsigned int time; unsigned int time;
unsigned int info; unsigned int info;
int timeout;
/* VARARG(data,bytes); */
};
enum message_type
{
MSG_ASCII,
MSG_UNICODE,
MSG_NOTIFY,
MSG_CALLBACK,
MSG_OTHER_PROCESS,
MSG_POSTED,
MSG_HARDWARE_RAW,
MSG_HARDWARE_COOKED
}; };
enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAGE };
#define NB_MSG_KINDS (RAW_HW_MESSAGE+1)
...@@ -1362,16 +1373,16 @@ struct get_message_request ...@@ -1362,16 +1373,16 @@ struct get_message_request
handle_t get_win; handle_t get_win;
unsigned int get_first; unsigned int get_first;
unsigned int get_last; unsigned int get_last;
int kind;
int type; int type;
handle_t win; handle_t win;
unsigned int msg; unsigned int msg;
unsigned int wparam; unsigned int wparam;
unsigned int lparam; unsigned int lparam;
unsigned short x; int x;
unsigned short y; int y;
unsigned int time; unsigned int time;
unsigned int info; unsigned int info;
/* VARARG(data,bytes); */
}; };
#define GET_MSG_REMOVE 1 #define GET_MSG_REMOVE 1
#define GET_MSG_SENT_ONLY 2 #define GET_MSG_SENT_ONLY 2
...@@ -1383,6 +1394,7 @@ struct reply_message_request ...@@ -1383,6 +1394,7 @@ struct reply_message_request
struct request_header __header; struct request_header __header;
unsigned int result; unsigned int result;
int remove; int remove;
/* VARARG(data,bytes); */
}; };
...@@ -1392,14 +1404,7 @@ struct get_message_reply_request ...@@ -1392,14 +1404,7 @@ struct get_message_reply_request
struct request_header __header; struct request_header __header;
int cancel; int cancel;
unsigned int result; unsigned int result;
}; /* VARARG(data,bytes); */
struct in_send_message_request
{
struct request_header __header;
int flags;
}; };
...@@ -1639,7 +1644,6 @@ enum request ...@@ -1639,7 +1644,6 @@ enum request
REQ_get_message, REQ_get_message,
REQ_reply_message, REQ_reply_message,
REQ_get_message_reply, REQ_get_message_reply,
REQ_in_send_message,
REQ_cleanup_window_queue, REQ_cleanup_window_queue,
REQ_set_win_timer, REQ_set_win_timer,
REQ_kill_win_timer, REQ_kill_win_timer,
...@@ -1767,7 +1771,6 @@ union generic_request ...@@ -1767,7 +1771,6 @@ union generic_request
struct get_message_request get_message; struct get_message_request get_message;
struct reply_message_request reply_message; struct reply_message_request reply_message;
struct get_message_reply_request get_message_reply; struct get_message_reply_request get_message_reply;
struct in_send_message_request in_send_message;
struct cleanup_window_queue_request cleanup_window_queue; struct cleanup_window_queue_request cleanup_window_queue;
struct set_win_timer_request set_win_timer; struct set_win_timer_request set_win_timer;
struct kill_win_timer_request kill_win_timer; struct kill_win_timer_request kill_win_timer;
...@@ -1780,6 +1783,6 @@ union generic_request ...@@ -1780,6 +1783,6 @@ union generic_request
struct connect_named_pipe_request connect_named_pipe; struct connect_named_pipe_request connect_named_pipe;
}; };
#define SERVER_PROTOCOL_VERSION 48 #define SERVER_PROTOCOL_VERSION 49
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */ #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
...@@ -561,8 +561,6 @@ INT16 WINAPI GetWindowRgn16(HWND16,HRGN16); ...@@ -561,8 +561,6 @@ INT16 WINAPI GetWindowRgn16(HWND16,HRGN16);
BOOL16 WINAPI IsWindow16(HWND16); BOOL16 WINAPI IsWindow16(HWND16);
INT16 WINAPI LookupIconIdFromDirectory16(LPBYTE,BOOL16); INT16 WINAPI LookupIconIdFromDirectory16(LPBYTE,BOOL16);
UINT16 WINAPI MapVirtualKey16(UINT16,UINT16); UINT16 WINAPI MapVirtualKey16(UINT16,UINT16);
LRESULT WINAPI SendMessageTimeout16(HWND16,UINT16,WPARAM16,LPARAM,UINT16,
UINT16,LPWORD);
FARPROC16 WINAPI SetWindowsHook16(INT16,HOOKPROC16); FARPROC16 WINAPI SetWindowsHook16(INT16,HOOKPROC16);
HHOOK WINAPI SetWindowsHookEx16(INT16,HOOKPROC16,HINSTANCE16,HTASK16); HHOOK WINAPI SetWindowsHookEx16(INT16,HOOKPROC16,HINSTANCE16,HTASK16);
BOOL16 WINAPI UnhookWindowsHook16(INT16,HOOKPROC16); BOOL16 WINAPI UnhookWindowsHook16(INT16,HOOKPROC16);
...@@ -746,8 +744,8 @@ UINT16 WINAPI GetMenuItemID16(HMENU16,INT16); ...@@ -746,8 +744,8 @@ UINT16 WINAPI GetMenuItemID16(HMENU16,INT16);
BOOL16 WINAPI GetMenuItemRect16(HWND16,HMENU16,UINT16,LPRECT16); BOOL16 WINAPI GetMenuItemRect16(HWND16,HMENU16,UINT16,LPRECT16);
UINT16 WINAPI GetMenuState16(HMENU16,UINT16,UINT16); UINT16 WINAPI GetMenuState16(HMENU16,UINT16,UINT16);
INT16 WINAPI GetMenuString16(HMENU16,UINT16,LPSTR,INT16,UINT16); INT16 WINAPI GetMenuString16(HMENU16,UINT16,LPSTR,INT16,UINT16);
BOOL16 WINAPI GetMessage16(SEGPTR,HWND16,UINT16,UINT16); BOOL16 WINAPI GetMessage16(MSG16*,HWND16,UINT16,UINT16);
BOOL16 WINAPI GetMessage32_16(SEGPTR,HWND16,UINT16,UINT16,BOOL16); BOOL16 WINAPI GetMessage32_16(MSG32_16*,HWND16,UINT16,UINT16,BOOL16);
HWND16 WINAPI GetNextDlgGroupItem16(HWND16,HWND16,BOOL16); HWND16 WINAPI GetNextDlgGroupItem16(HWND16,HWND16,BOOL16);
HWND16 WINAPI GetNextDlgTabItem16(HWND16,HWND16,BOOL16); HWND16 WINAPI GetNextDlgTabItem16(HWND16,HWND16,BOOL16);
HWND16 WINAPI GetNextWindow16(HWND16,WORD); HWND16 WINAPI GetNextWindow16(HWND16,WORD);
...@@ -825,8 +823,8 @@ BOOL16 WINAPI MoveWindow16(HWND16,INT16,INT16,INT16,INT16,BOOL16); ...@@ -825,8 +823,8 @@ BOOL16 WINAPI MoveWindow16(HWND16,INT16,INT16,INT16,INT16,BOOL16);
void WINAPI OffsetRect16(LPRECT16,INT16,INT16); void WINAPI OffsetRect16(LPRECT16,INT16,INT16);
BOOL16 WINAPI OpenClipboard16(HWND16); BOOL16 WINAPI OpenClipboard16(HWND16);
BOOL16 WINAPI OpenIcon16(HWND16); BOOL16 WINAPI OpenIcon16(HWND16);
BOOL16 WINAPI PeekMessage16(SEGPTR,HWND16,UINT16,UINT16,UINT16); BOOL16 WINAPI PeekMessage16(MSG16*,HWND16,UINT16,UINT16,UINT16);
BOOL16 WINAPI PeekMessage32_16(SEGPTR,HWND16,UINT16,UINT16,UINT16,BOOL16); BOOL16 WINAPI PeekMessage32_16(MSG32_16*,HWND16,UINT16,UINT16,UINT16,BOOL16);
BOOL16 WINAPI PostAppMessage16(HTASK16,UINT16,WPARAM16,LPARAM); BOOL16 WINAPI PostAppMessage16(HTASK16,UINT16,WPARAM16,LPARAM);
BOOL16 WINAPI PostMessage16(HWND16,UINT16,WPARAM16,LPARAM); BOOL16 WINAPI PostMessage16(HWND16,UINT16,WPARAM16,LPARAM);
void WINAPI PostQuitMessage16(INT16); void WINAPI PostQuitMessage16(INT16);
......
...@@ -1195,20 +1195,31 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; ...@@ -1195,20 +1195,31 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
/* Send a message to a thread queue */ /* Send a message to a thread queue */
@REQ(send_message) @REQ(send_message)
int kind; /* message kind (see below) */
void* id; /* thread id */ void* id; /* thread id */
int type; /* message type */ int type; /* message type (see below) */
handle_t win; /* window handle */ handle_t win; /* window handle */
unsigned int msg; /* message code */ unsigned int msg; /* message code */
unsigned int wparam; /* parameters */ unsigned int wparam; /* parameters */
unsigned int lparam; /* parameters */ unsigned int lparam; /* parameters */
unsigned short x; /* x position */ int x; /* x position */
unsigned short y; /* y position */ int y; /* y position */
unsigned int time; /* message time */ unsigned int time; /* message time */
unsigned int info; /* extra info */ unsigned int info; /* extra info */
int timeout; /* timeout for reply */
VARARG(data,bytes); /* message data for sent messages */
@END @END
enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAGE };
#define NB_MSG_KINDS (RAW_HW_MESSAGE+1) enum message_type
{
MSG_ASCII, /* Ascii message (from SendMessageA) */
MSG_UNICODE, /* Unicode message (from SendMessageW) */
MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
MSG_HARDWARE_RAW, /* raw hardware message */
MSG_HARDWARE_COOKED /* cooked hardware message */
};
/* Get a message from the current queue */ /* Get a message from the current queue */
...@@ -1218,16 +1229,16 @@ enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAG ...@@ -1218,16 +1229,16 @@ enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAG
unsigned int get_first; /* first message code to get */ unsigned int get_first; /* first message code to get */
unsigned int get_last; /* last message code to get */ unsigned int get_last; /* last message code to get */
@REPLY @REPLY
int kind; /* message kind */
int type; /* message type */ int type; /* message type */
handle_t win; /* window handle */ handle_t win; /* window handle */
unsigned int msg; /* message code */ unsigned int msg; /* message code */
unsigned int wparam; /* parameters */ unsigned int wparam; /* parameters */
unsigned int lparam; /* parameters */ unsigned int lparam; /* parameters */
unsigned short x; /* x position */ int x; /* x position */
unsigned short y; /* y position */ int y; /* y position */
unsigned int time; /* message time */ unsigned int time; /* message time */
unsigned int info; /* extra info */ unsigned int info; /* extra info */
VARARG(data,bytes); /* message data for sent messages */
@END @END
#define GET_MSG_REMOVE 1 /* remove the message */ #define GET_MSG_REMOVE 1 /* remove the message */
#define GET_MSG_SENT_ONLY 2 /* only get sent messages */ #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
...@@ -1237,6 +1248,7 @@ enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAG ...@@ -1237,6 +1248,7 @@ enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAG
@REQ(reply_message) @REQ(reply_message)
unsigned int result; /* message result */ unsigned int result; /* message result */
int remove; /* should we remove the message? */ int remove; /* should we remove the message? */
VARARG(data,bytes); /* message data for sent messages */
@END @END
...@@ -1245,13 +1257,7 @@ enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAG ...@@ -1245,13 +1257,7 @@ enum message_kind { SEND_MESSAGE, POST_MESSAGE, COOKED_HW_MESSAGE, RAW_HW_MESSAG
int cancel; /* cancel message if not ready? */ int cancel; /* cancel message if not ready? */
@REPLY @REPLY
unsigned int result; /* message result */ unsigned int result; /* message result */
@END VARARG(data,bytes); /* message data for sent messages */
/* Check if we are processing a sent message */
@REQ(in_send_message)
@REPLY
int flags; /* ISMEX_* flags */
@END @END
......
...@@ -175,7 +175,6 @@ DECL_HANDLER(send_message); ...@@ -175,7 +175,6 @@ DECL_HANDLER(send_message);
DECL_HANDLER(get_message); DECL_HANDLER(get_message);
DECL_HANDLER(reply_message); DECL_HANDLER(reply_message);
DECL_HANDLER(get_message_reply); DECL_HANDLER(get_message_reply);
DECL_HANDLER(in_send_message);
DECL_HANDLER(cleanup_window_queue); DECL_HANDLER(cleanup_window_queue);
DECL_HANDLER(set_win_timer); DECL_HANDLER(set_win_timer);
DECL_HANDLER(kill_win_timer); DECL_HANDLER(kill_win_timer);
...@@ -302,7 +301,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] = ...@@ -302,7 +301,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_get_message, (req_handler)req_get_message,
(req_handler)req_reply_message, (req_handler)req_reply_message,
(req_handler)req_get_message_reply, (req_handler)req_get_message_reply,
(req_handler)req_in_send_message,
(req_handler)req_cleanup_window_queue, (req_handler)req_cleanup_window_queue,
(req_handler)req_set_win_timer, (req_handler)req_set_win_timer,
(req_handler)req_kill_win_timer, (req_handler)req_kill_win_timer,
......
...@@ -1457,17 +1457,19 @@ static void dump_wait_input_idle_reply( const struct wait_input_idle_request *re ...@@ -1457,17 +1457,19 @@ static void dump_wait_input_idle_reply( const struct wait_input_idle_request *re
static void dump_send_message_request( const struct send_message_request *req ) static void dump_send_message_request( const struct send_message_request *req )
{ {
fprintf( stderr, " kind=%d,", req->kind );
fprintf( stderr, " id=%p,", req->id ); fprintf( stderr, " id=%p,", req->id );
fprintf( stderr, " type=%d,", req->type ); fprintf( stderr, " type=%d,", req->type );
fprintf( stderr, " win=%d,", req->win ); fprintf( stderr, " win=%d,", req->win );
fprintf( stderr, " msg=%08x,", req->msg ); fprintf( stderr, " msg=%08x,", req->msg );
fprintf( stderr, " wparam=%08x,", req->wparam ); fprintf( stderr, " wparam=%08x,", req->wparam );
fprintf( stderr, " lparam=%08x,", req->lparam ); fprintf( stderr, " lparam=%08x,", req->lparam );
fprintf( stderr, " x=%04x,", req->x ); fprintf( stderr, " x=%d,", req->x );
fprintf( stderr, " y=%04x,", req->y ); fprintf( stderr, " y=%d,", req->y );
fprintf( stderr, " time=%08x,", req->time ); fprintf( stderr, " time=%08x,", req->time );
fprintf( stderr, " info=%08x", req->info ); fprintf( stderr, " info=%08x,", req->info );
fprintf( stderr, " timeout=%d,", req->timeout );
fprintf( stderr, " data=" );
cur_pos += dump_varargs_bytes( req );
} }
static void dump_get_message_request( const struct get_message_request *req ) static void dump_get_message_request( const struct get_message_request *req )
...@@ -1480,22 +1482,25 @@ static void dump_get_message_request( const struct get_message_request *req ) ...@@ -1480,22 +1482,25 @@ static void dump_get_message_request( const struct get_message_request *req )
static void dump_get_message_reply( const struct get_message_request *req ) static void dump_get_message_reply( const struct get_message_request *req )
{ {
fprintf( stderr, " kind=%d,", req->kind );
fprintf( stderr, " type=%d,", req->type ); fprintf( stderr, " type=%d,", req->type );
fprintf( stderr, " win=%d,", req->win ); fprintf( stderr, " win=%d,", req->win );
fprintf( stderr, " msg=%08x,", req->msg ); fprintf( stderr, " msg=%08x,", req->msg );
fprintf( stderr, " wparam=%08x,", req->wparam ); fprintf( stderr, " wparam=%08x,", req->wparam );
fprintf( stderr, " lparam=%08x,", req->lparam ); fprintf( stderr, " lparam=%08x,", req->lparam );
fprintf( stderr, " x=%04x,", req->x ); fprintf( stderr, " x=%d,", req->x );
fprintf( stderr, " y=%04x,", req->y ); fprintf( stderr, " y=%d,", req->y );
fprintf( stderr, " time=%08x,", req->time ); fprintf( stderr, " time=%08x,", req->time );
fprintf( stderr, " info=%08x", req->info ); fprintf( stderr, " info=%08x,", req->info );
fprintf( stderr, " data=" );
cur_pos += dump_varargs_bytes( req );
} }
static void dump_reply_message_request( const struct reply_message_request *req ) static void dump_reply_message_request( const struct reply_message_request *req )
{ {
fprintf( stderr, " result=%08x,", req->result ); fprintf( stderr, " result=%08x,", req->result );
fprintf( stderr, " remove=%d", req->remove ); fprintf( stderr, " remove=%d,", req->remove );
fprintf( stderr, " data=" );
cur_pos += dump_varargs_bytes( req );
} }
static void dump_get_message_reply_request( const struct get_message_reply_request *req ) static void dump_get_message_reply_request( const struct get_message_reply_request *req )
...@@ -1505,16 +1510,9 @@ static void dump_get_message_reply_request( const struct get_message_reply_reque ...@@ -1505,16 +1510,9 @@ static void dump_get_message_reply_request( const struct get_message_reply_reque
static void dump_get_message_reply_reply( const struct get_message_reply_request *req ) static void dump_get_message_reply_reply( const struct get_message_reply_request *req )
{ {
fprintf( stderr, " result=%08x", req->result ); fprintf( stderr, " result=%08x,", req->result );
} fprintf( stderr, " data=" );
cur_pos += dump_varargs_bytes( req );
static void dump_in_send_message_request( const struct in_send_message_request *req )
{
}
static void dump_in_send_message_reply( const struct in_send_message_request *req )
{
fprintf( stderr, " flags=%d", req->flags );
} }
static void dump_cleanup_window_queue_request( const struct cleanup_window_queue_request *req ) static void dump_cleanup_window_queue_request( const struct cleanup_window_queue_request *req )
...@@ -1739,7 +1737,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = { ...@@ -1739,7 +1737,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_get_message_request, (dump_func)dump_get_message_request,
(dump_func)dump_reply_message_request, (dump_func)dump_reply_message_request,
(dump_func)dump_get_message_reply_request, (dump_func)dump_get_message_reply_request,
(dump_func)dump_in_send_message_request,
(dump_func)dump_cleanup_window_queue_request, (dump_func)dump_cleanup_window_queue_request,
(dump_func)dump_set_win_timer_request, (dump_func)dump_set_win_timer_request,
(dump_func)dump_kill_win_timer_request, (dump_func)dump_kill_win_timer_request,
...@@ -1863,7 +1860,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { ...@@ -1863,7 +1860,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_get_message_reply, (dump_func)dump_get_message_reply,
(dump_func)0, (dump_func)0,
(dump_func)dump_get_message_reply_reply, (dump_func)dump_get_message_reply_reply,
(dump_func)dump_in_send_message_reply,
(dump_func)0, (dump_func)0,
(dump_func)0, (dump_func)0,
(dump_func)0, (dump_func)0,
...@@ -1987,7 +1983,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = { ...@@ -1987,7 +1983,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_message", "get_message",
"reply_message", "reply_message",
"get_message_reply", "get_message_reply",
"in_send_message",
"cleanup_window_queue", "cleanup_window_queue",
"set_win_timer", "set_win_timer",
"kill_win_timer", "kill_win_timer",
......
...@@ -85,9 +85,8 @@ static void queue_raw_hardware_message( UINT message, WPARAM wParam, LPARAM lPar ...@@ -85,9 +85,8 @@ static void queue_raw_hardware_message( UINT message, WPARAM wParam, LPARAM lPar
{ {
SERVER_START_REQ( send_message ) SERVER_START_REQ( send_message )
{ {
req->kind = RAW_HW_MESSAGE;
req->id = (void *)GetCurrentThreadId(); req->id = (void *)GetCurrentThreadId();
req->type = 0; req->type = MSG_HARDWARE_RAW;
req->win = 0; req->win = 0;
req->msg = message; req->msg = message;
req->wparam = wParam; req->wparam = wParam;
...@@ -96,6 +95,7 @@ static void queue_raw_hardware_message( UINT message, WPARAM wParam, LPARAM lPar ...@@ -96,6 +95,7 @@ static void queue_raw_hardware_message( UINT message, WPARAM wParam, LPARAM lPar
req->y = yPos; req->y = yPos;
req->time = time; req->time = time;
req->info = extraInfo; req->info = extraInfo;
req->timeout = 0;
SERVER_CALL(); SERVER_CALL();
} }
SERVER_END_REQ; SERVER_END_REQ;
......
...@@ -456,64 +456,24 @@ void QUEUE_CleanupWindow( HWND hwnd ) ...@@ -456,64 +456,24 @@ void QUEUE_CleanupWindow( HWND hwnd )
/*********************************************************************** /***********************************************************************
* QUEUE_GetQueueTask
*/
HTASK16 QUEUE_GetQueueTask( HQUEUE16 hQueue )
{
HTASK16 hTask = 0;
MESSAGEQUEUE *queue = QUEUE_Lock( hQueue );
if (queue)
{
hTask = queue->teb->htask16;
QUEUE_Unlock( queue );
}
return hTask;
}
/***********************************************************************
* PostQuitMessage (USER.6)
*/
void WINAPI PostQuitMessage16( INT16 exitCode )
{
PostQuitMessage( exitCode );
}
/***********************************************************************
* PostQuitMessage (USER32.@)
*
* PostQuitMessage() posts a message to the system requesting an
* application to terminate execution. As a result of this function,
* the WM_QUIT message is posted to the application, and
* PostQuitMessage() returns immediately. The exitCode parameter
* specifies an application-defined exit code, which appears in the
* _wParam_ parameter of the WM_QUIT message posted to the application.
*
* CONFORMANCE
*
* ECMA-234, Win32
*/
void WINAPI PostQuitMessage( INT exitCode )
{
PostThreadMessageW( GetCurrentThreadId(), WM_QUIT, exitCode, 0 );
}
/***********************************************************************
* GetWindowTask (USER.224) * GetWindowTask (USER.224)
*/ */
HTASK16 WINAPI GetWindowTask16( HWND16 hwnd ) HTASK16 WINAPI GetWindowTask16( HWND16 hwnd )
{ {
HTASK16 retvalue; HTASK16 retvalue;
WND *wndPtr = WIN_FindWndPtr( hwnd ); MESSAGEQUEUE *queue;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if (!wndPtr) return 0; if (!wndPtr) return 0;
retvalue = QUEUE_GetQueueTask( wndPtr->hmemTaskQ );
queue = QUEUE_Lock( wndPtr->hmemTaskQ );
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
if (!queue) return 0;
retvalue = queue->teb->htask16;
QUEUE_Unlock( queue );
return retvalue; return retvalue;
} }
...@@ -542,25 +502,6 @@ DWORD WINAPI GetWindowThreadProcessId( HWND hwnd, LPDWORD process ) ...@@ -542,25 +502,6 @@ DWORD WINAPI GetWindowThreadProcessId( HWND hwnd, LPDWORD process )
/*********************************************************************** /***********************************************************************
* SetMessageQueue (USER.266)
*/
BOOL16 WINAPI SetMessageQueue16( INT16 size )
{
return SetMessageQueue( size );
}
/***********************************************************************
* SetMessageQueue (USER32.@)
*/
BOOL WINAPI SetMessageQueue( INT size )
{
/* now obsolete the message queue will be expanded dynamically
as necessary */
return TRUE;
}
/***********************************************************************
* InitThreadInput (USER.409) * InitThreadInput (USER.409)
*/ */
HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags ) HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags )
...@@ -593,14 +534,6 @@ HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags ) ...@@ -593,14 +534,6 @@ HQUEUE16 WINAPI InitThreadInput16( WORD unknown, WORD flags )
} }
/*********************************************************************** /***********************************************************************
* GetQueueStatus (USER.334)
*/
DWORD WINAPI GetQueueStatus16( UINT16 flags )
{
return GetQueueStatus( flags );
}
/***********************************************************************
* GetQueueStatus (USER32.@) * GetQueueStatus (USER32.@)
*/ */
DWORD WINAPI GetQueueStatus( UINT flags ) DWORD WINAPI GetQueueStatus( UINT flags )
...@@ -619,14 +552,6 @@ DWORD WINAPI GetQueueStatus( UINT flags ) ...@@ -619,14 +552,6 @@ DWORD WINAPI GetQueueStatus( UINT flags )
/*********************************************************************** /***********************************************************************
* GetInputState (USER.335)
*/
BOOL16 WINAPI GetInputState16(void)
{
return GetInputState();
}
/***********************************************************************
* GetInputState (USER32.@) * GetInputState (USER32.@)
*/ */
BOOL WINAPI GetInputState(void) BOOL WINAPI GetInputState(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment