Commit 6d167b91 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

server: Add rawinput union to hw_input_t / INPUT_HARDWARE.

When msg is WM_INPUT_DEVICE_CHANGE. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c0fc8999
......@@ -262,14 +262,8 @@ struct hw_msg_source
unsigned int origin;
};
struct hardware_msg_data
union rawinput
{
lparam_t info;
unsigned int hw_id;
unsigned int flags;
struct hw_msg_source source;
union
{
int type;
struct
{
......@@ -285,7 +279,15 @@ struct hardware_msg_data
int y;
unsigned int data;
} mouse;
} rawinput;
};
struct hardware_msg_data
{
lparam_t info;
unsigned int hw_id;
unsigned int flags;
struct hw_msg_source source;
union rawinput rawinput;
};
struct callback_msg_data
......@@ -330,6 +332,7 @@ typedef union
int type;
unsigned int msg;
lparam_t lparam;
union rawinput rawinput;
} hw;
} hw_input_t;
......@@ -6233,7 +6236,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 698
#define SERVER_PROTOCOL_VERSION 699
/* ### protocol_version end ### */
......
......@@ -278,14 +278,8 @@ struct hw_msg_source
unsigned int origin; /* source origin (IMO_* values) */
};
struct hardware_msg_data
union rawinput
{
lparam_t info; /* extra info */
unsigned int hw_id; /* unique id */
unsigned int flags; /* hook flags */
struct hw_msg_source source; /* message source */
union
{
int type;
struct
{
......@@ -301,7 +295,15 @@ struct hardware_msg_data
int y; /* y coordinate */
unsigned int data; /* mouse data */
} mouse;
} rawinput;
};
struct hardware_msg_data
{
lparam_t info; /* extra info */
unsigned int hw_id; /* unique id */
unsigned int flags; /* hook flags */
struct hw_msg_source source; /* message source */
union rawinput rawinput; /* rawinput message data */
};
struct callback_msg_data
......@@ -346,6 +348,7 @@ typedef union
int type; /* INPUT_HARDWARE */
unsigned int msg; /* message code */
lparam_t lparam; /* message param */
union rawinput rawinput;/* rawinput message data */
} hw;
} hw_input_t;
......
......@@ -395,6 +395,24 @@ static void dump_irp_params( const char *prefix, const irp_params_t *data )
}
}
static void dump_rawinput( const char *prefix, const union rawinput *rawinput )
{
switch (rawinput->type)
{
case RIM_TYPEMOUSE:
fprintf( stderr, "%s{type=MOUSE,x=%d,y=%d,data=%08x}", prefix, rawinput->mouse.x,
rawinput->mouse.y, rawinput->mouse.data );
break;
case RIM_TYPEKEYBOARD:
fprintf( stderr, "%s{type=KEYBOARD,message=%04x,vkey=%04hx,scan=%04hx}", prefix,
rawinput->kbd.message, rawinput->kbd.vkey, rawinput->kbd.scan );
break;
default:
fprintf( stderr, "%s{type=%04x}", prefix, rawinput->type );
break;
}
}
static void dump_hw_input( const char *prefix, const hw_input_t *input )
{
switch (input->type)
......@@ -415,6 +433,11 @@ static void dump_hw_input( const char *prefix, const hw_input_t *input )
case INPUT_HARDWARE:
fprintf( stderr, "%s{type=HARDWARE,msg=%04x", prefix, input->hw.msg );
dump_uint64( ",lparam=", &input->hw.lparam );
switch (input->hw.msg)
{
case WM_INPUT_DEVICE_CHANGE:
dump_rawinput( ",rawinput=", &input->hw.rawinput );
}
fputc( '}', stderr );
break;
default:
......
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