diff options
author | Bilal Elmoussaoui <belmouss@redhat.com> | 2023-06-19 11:53:36 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-27 17:08:56 +0200 |
commit | b6596785987d0174d6f413b7a5b695de6aa14483 (patch) | |
tree | 0623d3d016e835948223df8d97e2ee83e87c3ab9 /include | |
parent | 1e0c544673f43cb7ed97020cb9b3b1a915811bac (diff) | |
download | qemu-b6596785987d0174d6f413b7a5b695de6aa14483.zip qemu-b6596785987d0174d6f413b7a5b695de6aa14483.tar.gz qemu-b6596785987d0174d6f413b7a5b695de6aa14483.tar.bz2 |
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 <belmouss@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230619095337.9899-2-belmouss@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ui/console.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index ae5ec46..2093e2a 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -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,20 @@ 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; + +void 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, + Error **errp); /* consoles */ #define TYPE_QEMU_CONSOLE "qemu-console" |