New Input::Event::FOCUS, rename keycode to code

This patch introduces keyboard-focus events to the 'Input::Event' class
and changes the name 'Input::Event::keycode' to 'code'. The 'code'
represents the key code for PRESS/RELEASE events, and the focus state
for FOCUS events (0 - unfocused, 1 - focused).

Furthermore, nitpicker has been adapted to deliver FOCUS events to its
clients.

Fixes #609
This commit is contained in:
Norman Feske
2013-01-12 23:34:49 +01:00
parent 267817c2c5
commit af66043b79
20 changed files with 115 additions and 92 deletions

View File

@@ -45,7 +45,7 @@ namespace Input {
* Input event call-back function
*/
static void input_callback(enum input_event_type type,
unsigned keycode,
unsigned code,
int absolute_x, int absolute_y,
int relative_x, int relative_y)
{
@@ -58,7 +58,7 @@ static void input_callback(enum input_event_type type,
}
try {
ev_queue.add(Input::Event(t, keycode,
ev_queue.add(Input::Event(t, code,
absolute_x, absolute_y,
relative_x, relative_y));
} catch (Input_ring_buffer::Overflow) {

View File

@@ -3036,7 +3036,7 @@ struct input_handle;
* Input event callback
*
* \param type input event type
* \param keycode key code if type is EVENT_TYPE_PRESS or
* \param code key code if type is EVENT_TYPE_PRESS or
* EVENT_TYPE_RELEASE
* \param absolute_x absolute horizontal coordinate if type is
* EVENT_TYPE_MOTION
@@ -3054,7 +3054,7 @@ struct input_handle;
* 0.
*/
typedef void (*genode_input_event_cb)(enum input_event_type type,
unsigned keycode,
unsigned code,
int absolute_x, int absolute_y,
int relative_x, int relative_y);