Implemented GetLastInputInfo.
This commit is contained in:
parent
086f77a034
commit
abe70f7648
|
@ -264,6 +264,32 @@ BOOL WINAPI GetInputState(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************
|
||||||
|
* GetLastInputInfo (USER32.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
|
||||||
|
{
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
|
TRACE("%p\n", plii);
|
||||||
|
|
||||||
|
if (plii->cbSize != sizeof (*plii) )
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
SERVER_START_REQ( get_last_input_time )
|
||||||
|
{
|
||||||
|
ret = !wine_server_call_err( req );
|
||||||
|
if (ret)
|
||||||
|
plii->dwTime = reply->time;
|
||||||
|
}
|
||||||
|
SERVER_END_REQ;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* AttachThreadInput (USER32.@)
|
* AttachThreadInput (USER32.@)
|
||||||
*
|
*
|
||||||
|
|
|
@ -3441,12 +3441,3 @@ BOOL WINAPI IsHungAppWindow( HWND hWnd )
|
||||||
DWORD dwResult;
|
DWORD dwResult;
|
||||||
return !SendMessageTimeoutA(hWnd, WM_NULL, 0, 0, SMTO_ABORTIFHUNG, 5000, &dwResult);
|
return !SendMessageTimeoutA(hWnd, WM_NULL, 0, 0, SMTO_ABORTIFHUNG, 5000, &dwResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
|
||||||
* GetLastInputInfo (USER32.@)
|
|
||||||
*/
|
|
||||||
BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
|
|
||||||
{
|
|
||||||
FIXME("%p\n", plii);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
|
@ -2862,6 +2862,19 @@ struct get_thread_input_reply
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct get_last_input_time_request
|
||||||
|
{
|
||||||
|
struct request_header __header;
|
||||||
|
};
|
||||||
|
struct get_last_input_time_reply
|
||||||
|
{
|
||||||
|
struct reply_header __header;
|
||||||
|
unsigned int time;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct get_key_state_request
|
struct get_key_state_request
|
||||||
{
|
{
|
||||||
struct request_header __header;
|
struct request_header __header;
|
||||||
|
@ -3485,6 +3498,7 @@ enum request
|
||||||
REQ_get_window_properties,
|
REQ_get_window_properties,
|
||||||
REQ_attach_thread_input,
|
REQ_attach_thread_input,
|
||||||
REQ_get_thread_input,
|
REQ_get_thread_input,
|
||||||
|
REQ_get_last_input_time,
|
||||||
REQ_get_key_state,
|
REQ_get_key_state,
|
||||||
REQ_set_key_state,
|
REQ_set_key_state,
|
||||||
REQ_set_foreground_window,
|
REQ_set_foreground_window,
|
||||||
|
@ -3681,6 +3695,7 @@ union generic_request
|
||||||
struct get_window_properties_request get_window_properties_request;
|
struct get_window_properties_request get_window_properties_request;
|
||||||
struct attach_thread_input_request attach_thread_input_request;
|
struct attach_thread_input_request attach_thread_input_request;
|
||||||
struct get_thread_input_request get_thread_input_request;
|
struct get_thread_input_request get_thread_input_request;
|
||||||
|
struct get_last_input_time_request get_last_input_time_request;
|
||||||
struct get_key_state_request get_key_state_request;
|
struct get_key_state_request get_key_state_request;
|
||||||
struct set_key_state_request set_key_state_request;
|
struct set_key_state_request set_key_state_request;
|
||||||
struct set_foreground_window_request set_foreground_window_request;
|
struct set_foreground_window_request set_foreground_window_request;
|
||||||
|
@ -3875,6 +3890,7 @@ union generic_reply
|
||||||
struct get_window_properties_reply get_window_properties_reply;
|
struct get_window_properties_reply get_window_properties_reply;
|
||||||
struct attach_thread_input_reply attach_thread_input_reply;
|
struct attach_thread_input_reply attach_thread_input_reply;
|
||||||
struct get_thread_input_reply get_thread_input_reply;
|
struct get_thread_input_reply get_thread_input_reply;
|
||||||
|
struct get_last_input_time_reply get_last_input_time_reply;
|
||||||
struct get_key_state_reply get_key_state_reply;
|
struct get_key_state_reply get_key_state_reply;
|
||||||
struct set_key_state_reply set_key_state_reply;
|
struct set_key_state_reply set_key_state_reply;
|
||||||
struct set_foreground_window_reply set_foreground_window_reply;
|
struct set_foreground_window_reply set_foreground_window_reply;
|
||||||
|
@ -3903,6 +3919,6 @@ union generic_reply
|
||||||
struct set_mailslot_info_reply set_mailslot_info_reply;
|
struct set_mailslot_info_reply set_mailslot_info_reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 171
|
#define SERVER_PROTOCOL_VERSION 172
|
||||||
|
|
||||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -2008,6 +2008,14 @@ enum message_type
|
||||||
rectangle_t rect; /* caret rectangle */
|
rectangle_t rect; /* caret rectangle */
|
||||||
@END
|
@END
|
||||||
|
|
||||||
|
|
||||||
|
/* Get the time of the last input event */
|
||||||
|
@REQ(get_last_input_time)
|
||||||
|
@REPLY
|
||||||
|
unsigned int time;
|
||||||
|
@END
|
||||||
|
|
||||||
|
|
||||||
/* Retrieve queue keyboard state for a given thread */
|
/* Retrieve queue keyboard state for a given thread */
|
||||||
@REQ(get_key_state)
|
@REQ(get_key_state)
|
||||||
thread_id_t tid; /* id of thread */
|
thread_id_t tid; /* id of thread */
|
||||||
|
|
|
@ -167,6 +167,7 @@ static const struct object_ops thread_input_ops =
|
||||||
|
|
||||||
/* pointer to input structure of foreground thread */
|
/* pointer to input structure of foreground thread */
|
||||||
static struct thread_input *foreground_input;
|
static struct thread_input *foreground_input;
|
||||||
|
static unsigned int last_input_time;
|
||||||
|
|
||||||
|
|
||||||
/* set the caret window in a given thread input */
|
/* set the caret window in a given thread input */
|
||||||
|
@ -1154,6 +1155,8 @@ static void queue_hardware_message( struct msg_queue *queue, struct message *msg
|
||||||
struct thread_input *input;
|
struct thread_input *input;
|
||||||
unsigned int msg_code;
|
unsigned int msg_code;
|
||||||
|
|
||||||
|
last_input_time = get_tick_count();
|
||||||
|
|
||||||
win = find_hardware_message_window( queue ? queue->input : foreground_input, msg, &msg_code );
|
win = find_hardware_message_window( queue ? queue->input : foreground_input, msg, &msg_code );
|
||||||
if (!win || !(thread = get_window_thread(win)))
|
if (!win || !(thread = get_window_thread(win)))
|
||||||
{
|
{
|
||||||
|
@ -2006,3 +2009,10 @@ DECL_HANDLER(set_caret_info)
|
||||||
else input->caret_state = !!req->state;
|
else input->caret_state = !!req->state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* get the time of the last input event */
|
||||||
|
DECL_HANDLER(get_last_input_time)
|
||||||
|
{
|
||||||
|
reply->time = last_input_time;
|
||||||
|
}
|
||||||
|
|
|
@ -266,6 +266,7 @@ DECL_HANDLER(get_window_property);
|
||||||
DECL_HANDLER(get_window_properties);
|
DECL_HANDLER(get_window_properties);
|
||||||
DECL_HANDLER(attach_thread_input);
|
DECL_HANDLER(attach_thread_input);
|
||||||
DECL_HANDLER(get_thread_input);
|
DECL_HANDLER(get_thread_input);
|
||||||
|
DECL_HANDLER(get_last_input_time);
|
||||||
DECL_HANDLER(get_key_state);
|
DECL_HANDLER(get_key_state);
|
||||||
DECL_HANDLER(set_key_state);
|
DECL_HANDLER(set_key_state);
|
||||||
DECL_HANDLER(set_foreground_window);
|
DECL_HANDLER(set_foreground_window);
|
||||||
|
@ -461,6 +462,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
|
||||||
(req_handler)req_get_window_properties,
|
(req_handler)req_get_window_properties,
|
||||||
(req_handler)req_attach_thread_input,
|
(req_handler)req_attach_thread_input,
|
||||||
(req_handler)req_get_thread_input,
|
(req_handler)req_get_thread_input,
|
||||||
|
(req_handler)req_get_last_input_time,
|
||||||
(req_handler)req_get_key_state,
|
(req_handler)req_get_key_state,
|
||||||
(req_handler)req_set_key_state,
|
(req_handler)req_set_key_state,
|
||||||
(req_handler)req_set_foreground_window,
|
(req_handler)req_set_foreground_window,
|
||||||
|
|
|
@ -2397,6 +2397,15 @@ static void dump_get_thread_input_reply( const struct get_thread_input_reply *re
|
||||||
dump_rectangle( &req->rect );
|
dump_rectangle( &req->rect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dump_get_last_input_time_request( const struct get_last_input_time_request *req )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dump_get_last_input_time_reply( const struct get_last_input_time_reply *req )
|
||||||
|
{
|
||||||
|
fprintf( stderr, " time=%08x", req->time );
|
||||||
|
}
|
||||||
|
|
||||||
static void dump_get_key_state_request( const struct get_key_state_request *req )
|
static void dump_get_key_state_request( const struct get_key_state_request *req )
|
||||||
{
|
{
|
||||||
fprintf( stderr, " tid=%04x,", req->tid );
|
fprintf( stderr, " tid=%04x,", req->tid );
|
||||||
|
@ -2926,6 +2935,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
|
||||||
(dump_func)dump_get_window_properties_request,
|
(dump_func)dump_get_window_properties_request,
|
||||||
(dump_func)dump_attach_thread_input_request,
|
(dump_func)dump_attach_thread_input_request,
|
||||||
(dump_func)dump_get_thread_input_request,
|
(dump_func)dump_get_thread_input_request,
|
||||||
|
(dump_func)dump_get_last_input_time_request,
|
||||||
(dump_func)dump_get_key_state_request,
|
(dump_func)dump_get_key_state_request,
|
||||||
(dump_func)dump_set_key_state_request,
|
(dump_func)dump_set_key_state_request,
|
||||||
(dump_func)dump_set_foreground_window_request,
|
(dump_func)dump_set_foreground_window_request,
|
||||||
|
@ -3118,6 +3128,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
|
||||||
(dump_func)dump_get_window_properties_reply,
|
(dump_func)dump_get_window_properties_reply,
|
||||||
(dump_func)0,
|
(dump_func)0,
|
||||||
(dump_func)dump_get_thread_input_reply,
|
(dump_func)dump_get_thread_input_reply,
|
||||||
|
(dump_func)dump_get_last_input_time_reply,
|
||||||
(dump_func)dump_get_key_state_reply,
|
(dump_func)dump_get_key_state_reply,
|
||||||
(dump_func)0,
|
(dump_func)0,
|
||||||
(dump_func)dump_set_foreground_window_reply,
|
(dump_func)dump_set_foreground_window_reply,
|
||||||
|
@ -3310,6 +3321,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
|
||||||
"get_window_properties",
|
"get_window_properties",
|
||||||
"attach_thread_input",
|
"attach_thread_input",
|
||||||
"get_thread_input",
|
"get_thread_input",
|
||||||
|
"get_last_input_time",
|
||||||
"get_key_state",
|
"get_key_state",
|
||||||
"set_key_state",
|
"set_key_state",
|
||||||
"set_foreground_window",
|
"set_foreground_window",
|
||||||
|
|
Loading…
Reference in New Issue