ui/touch: Move event handling to a common helper
PATCH 1/2 ui/touch: Move event handling to a common helper
To share code between the GTK and DBus UI bakcends see the next commit for details
Signed-off-by Bilal Elmoussaoui <[email protected]>
--- include/ui/console.h | 14 ++++++++++ ui/console.c | 65 ++++++++++++++++++++++++++++++++++++++++++++ ui/gtk.c | 62 ++++-------------------------------------- 3 files changed, 84 insertions(+), 57 deletions(-)
include/ui/console.h +14 -0
@@ -5,6 +5,7 @@#include "qom/object.h" #include "qemu/notify.h" #include "qapi/qapi-types-ui.h" +#include "ui/input.h" #ifdef CONFIG_OPENGL # include <epoxy/gl.h>
@@ -95,6 +96,19 @@ bool kbd_put_qcode_console(QemuConsole *s, int qcode, bool ctrl);void kbd_put_string_console (QemuConsole *s,const char *str,int len);void kbd_put_keysym (int keysym); +/* Touch devices */ +typedef struct touch_slot { +int x; +int y; +int tracking_id; +}touch_slot ; + +bool console_handle_touch_event (QemuConsole *con, +struct touch_slot touch_slots[INPUT_EVENT_SLOTS_MAX ], +uint64_t num_slot, +int width,int height, +double x,double y, +InputMultiTouchType type);/* consoles */ #define TYPE_QEMU_CONSOLE "qemu-console"
ui/console.c +65 -0
71 lines not on this page · raw message
ui/gtk.c +5 -57
88 lines not on this page · raw message
Signature · 1 line
2.40.1