Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
039e1311
Commit
039e1311
authored
Jul 26, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented inter-thread SendMessageCallback.
parent
30573158
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
16 deletions
+55
-16
message.c
dlls/user/message.c
+33
-1
server_protocol.h
include/wine/server_protocol.h
+3
-1
protocol.def
server/protocol.def
+5
-3
queue.c
server/queue.c
+0
-0
trace.c
server/trace.c
+1
-0
input.c
windows/input.c
+13
-11
No files found.
dlls/user/message.c
View file @
039e1311
...
...
@@ -38,6 +38,7 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msg
);
WINE_DECLARE_DEBUG_CHANNEL
(
relay
);
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
#define WM_NCMOUSELAST WM_NCMBUTTONDBLCLK
...
...
@@ -1469,6 +1470,26 @@ static BOOL process_hardware_message( MSG *msg, ULONG_PTR extra_info, HWND hwnd,
/***********************************************************************
* call_sendmsg_callback
*
* Call the callback function of SendMessageCallback.
*/
static
inline
void
call_sendmsg_callback
(
SENDASYNCPROC
callback
,
HWND
hwnd
,
UINT
msg
,
ULONG_PTR
data
,
LRESULT
result
)
{
if
(
TRACE_ON
(
relay
))
DPRINTF
(
"%04lx:Call message callback %p (hwnd=%p,msg=%s,data=%08lx,result=%08lx)
\n
"
,
GetCurrentThreadId
(),
callback
,
hwnd
,
SPY_GetMsgName
(
msg
,
hwnd
),
data
,
result
);
callback
(
hwnd
,
msg
,
data
,
result
);
if
(
TRACE_ON
(
relay
))
DPRINTF
(
"%04lx:Ret message callback %p (hwnd=%p,msg=%s,data=%08lx,result=%08lx)
\n
"
,
GetCurrentThreadId
(),
callback
,
hwnd
,
SPY_GetMsgName
(
msg
,
hwnd
),
data
,
result
);
}
/***********************************************************************
* MSG_peek_message
*
* Peek for a message matching the given parameters. Return FALSE if none available.
...
...
@@ -1540,6 +1561,10 @@ BOOL MSG_peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, int flags )
case
MSG_CALLBACK
:
info
.
flags
=
ISMEX_CALLBACK
;
break
;
case
MSG_CALLBACK_RESULT
:
call_sendmsg_callback
(
(
SENDASYNCPROC
)
info
.
msg
.
wParam
,
info
.
msg
.
hwnd
,
info
.
msg
.
message
,
extra_info
,
info
.
msg
.
lParam
);
goto
next
;
case
MSG_OTHER_PROCESS
:
info
.
flags
=
ISMEX_SEND
;
if
(
!
unpack_message
(
info
.
msg
.
hwnd
,
info
.
msg
.
message
,
&
info
.
msg
.
wParam
,
...
...
@@ -1690,6 +1715,13 @@ static BOOL put_message_in_queue( DWORD dest_tid, const struct send_message_info
req
->
lparam
=
info
->
lparam
;
req
->
time
=
GetCurrentTime
();
req
->
timeout
=
timeout
;
if
(
info
->
type
==
MSG_CALLBACK
)
{
req
->
callback
=
info
->
callback
;
req
->
info
=
info
->
data
;
}
if
(
info
->
flags
&
SMTO_ABORTIFHUNG
)
req
->
flags
|=
SEND_MSG_ABORT_IF_HUNG
;
for
(
i
=
0
;
i
<
data
.
count
;
i
++
)
wine_server_add_data
(
req
,
data
.
data
[
i
],
data
.
size
[
i
]
);
if
((
res
=
wine_server_call
(
req
)))
...
...
@@ -2043,7 +2075,7 @@ BOOL WINAPI SendMessageCallbackW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
if
(
dest_tid
==
GetCurrentThreadId
())
{
result
=
call_window_proc
(
hwnd
,
msg
,
wparam
,
lparam
,
TRUE
,
TRUE
);
call
back
(
hwnd
,
msg
,
data
,
result
);
call
_sendmsg_callback
(
callback
,
hwnd
,
msg
,
data
,
result
);
return
TRUE
;
}
FIXME
(
"callback will not be called
\n
"
);
...
...
include/wine/server_protocol.h
View file @
039e1311
...
...
@@ -2214,6 +2214,7 @@ struct send_message_request
unsigned
int
time
;
unsigned
int
info
;
int
timeout
;
void
*
callback
;
/* VARARG(data,bytes); */
};
struct
send_message_reply
...
...
@@ -2227,6 +2228,7 @@ enum message_type
MSG_UNICODE
,
MSG_NOTIFY
,
MSG_CALLBACK
,
MSG_CALLBACK_RESULT
,
MSG_OTHER_PROCESS
,
MSG_POSTED
,
MSG_HARDWARE
...
...
@@ -3645,6 +3647,6 @@ union generic_reply
struct
open_token_reply
open_token_reply
;
};
#define SERVER_PROTOCOL_VERSION 11
7
#define SERVER_PROTOCOL_VERSION 11
8
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
039e1311
...
...
@@ -1574,6 +1574,7 @@ enum char_info_mode
unsigned int time; /* message time */
unsigned int info; /* extra info */
int timeout; /* timeout for reply */
void* callback; /* callback address */
VARARG(data,bytes); /* message data for sent messages */
@END
...
...
@@ -1583,6 +1584,7 @@ enum message_type
MSG_UNICODE, /* Unicode message (from SendMessageW) */
MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
MSG_CALLBACK_RESULT,/* result of a callback message */
MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
MSG_HARDWARE /* hardware message */
...
...
@@ -1600,12 +1602,12 @@ enum message_type
int type; /* message type */
user_handle_t win; /* window handle */
unsigned int msg; /* message code */
unsigned int wparam; /* parameters */
unsigned int lparam; /* parameters */
unsigned int wparam; /* parameters
(callback function for MSG_CALLBACK_RESULT)
*/
unsigned int lparam; /* parameters
(result for MSG_CALLBACK_RESULT)
*/
int x; /* x position */
int y; /* y position */
unsigned int time; /* message time */
unsigned int info; /* extra info */
unsigned int info; /* extra info
(callback argument for MSG_CALLBACK_RESULT)
*/
size_t total; /* total size of extra data */
VARARG(data,bytes); /* message data for sent messages */
@END
...
...
server/queue.c
View file @
039e1311
This diff is collapsed.
Click to expand it.
server/trace.c
View file @
039e1311
...
...
@@ -1844,6 +1844,7 @@ static void dump_send_message_request( const struct send_message_request *req )
fprintf
(
stderr
,
" time=%08x,"
,
req
->
time
);
fprintf
(
stderr
,
" info=%08x,"
,
req
->
info
);
fprintf
(
stderr
,
" timeout=%d,"
,
req
->
timeout
);
fprintf
(
stderr
,
" callback=%p,"
,
req
->
callback
);
fprintf
(
stderr
,
" data="
);
dump_varargs_bytes
(
cur_size
);
}
...
...
windows/input.c
View file @
039e1311
...
...
@@ -112,17 +112,19 @@ static void queue_hardware_message( UINT message, HWND hwnd, WPARAM wParam, LPAR
{
SERVER_START_REQ
(
send_message
)
{
req
->
id
=
GetCurrentThreadId
();
req
->
type
=
MSG_HARDWARE
;
req
->
win
=
hwnd
;
req
->
msg
=
message
;
req
->
wparam
=
wParam
;
req
->
lparam
=
lParam
;
req
->
x
=
xPos
;
req
->
y
=
yPos
;
req
->
time
=
time
;
req
->
info
=
extraInfo
;
req
->
timeout
=
0
;
req
->
id
=
GetCurrentThreadId
();
req
->
type
=
MSG_HARDWARE
;
req
->
flags
=
0
;
req
->
win
=
hwnd
;
req
->
msg
=
message
;
req
->
wparam
=
wParam
;
req
->
lparam
=
lParam
;
req
->
x
=
xPos
;
req
->
y
=
yPos
;
req
->
time
=
time
;
req
->
info
=
extraInfo
;
req
->
timeout
=
-
1
;
req
->
callback
=
NULL
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment