mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
ui: add the infrastructure to support MT events
Add the required infrastructure to support generating multitouch events. Signed-off-by: Sergio Lopez <slp@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230526112925.38794-3-slp@redhat.com>
This commit is contained in:
parent
944ae6d9f1
commit
2bfb10dff2
5 changed files with 87 additions and 9 deletions
|
@ -212,6 +212,7 @@ static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
|
|||
InputKeyEvent *key;
|
||||
InputBtnEvent *btn;
|
||||
InputMoveEvent *move;
|
||||
InputMultiTouchEvent *mtt;
|
||||
|
||||
if (src) {
|
||||
idx = qemu_console_get_index(src);
|
||||
|
@ -250,6 +251,11 @@ static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
|
|||
name = InputAxis_str(move->axis);
|
||||
trace_input_event_abs(idx, name, move->value);
|
||||
break;
|
||||
case INPUT_EVENT_KIND_MTT:
|
||||
mtt = evt->u.mtt.data;
|
||||
name = InputAxis_str(mtt->axis);
|
||||
trace_input_event_mtt(idx, name, mtt->value);
|
||||
break;
|
||||
case INPUT_EVENT_KIND__MAX:
|
||||
/* keep gcc happy */
|
||||
break;
|
||||
|
|
|
@ -90,6 +90,7 @@ input_event_key_qcode(int conidx, const char *qcode, bool down) "con %d, key qco
|
|||
input_event_btn(int conidx, const char *btn, bool down) "con %d, button %s, down %d"
|
||||
input_event_rel(int conidx, const char *axis, int value) "con %d, axis %s, value %d"
|
||||
input_event_abs(int conidx, const char *axis, int value) "con %d, axis %s, value 0x%x"
|
||||
input_event_mtt(int conidx, const char *axis, int value) "con %d, axis %s, value 0x%x"
|
||||
input_event_sync(void) ""
|
||||
input_mouse_mode(int absolute) "absolute %d"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue