[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/42] input: qapi: define event types
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 06/42] input: qapi: define event types |
Date: |
Tue, 28 Jan 2014 10:56:59 +0100 |
Define input event types, using qapi. So we get nicely autogenerated
types for our input events. And when it comes to qmp support some day
things will be alot easier.
Types are modeled after the linux input layer. There are separate
event types for each value. There is a sync to indicate the end
of a event group.
Mouse events are splitted into motion events (one for each axis) and
button events, which are grouped by sync.
Keyboard events are using the existing KeyValue type.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
qapi-schema.json | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index 05ced9d..646d64f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4419,3 +4419,79 @@
# Since: 1.7
##
{ 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }
+
+##
+# @InputButton
+#
+# Button of a pointer input device (mouse, tablet).
+#
+# Since: 2.0
+##
+{ 'enum' : 'InputButton',
+ 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
+
+##
+# @InputButton
+#
+# Position axis of a pointer input device (mouse, tablet).
+#
+# Since: 2.0
+##
+{ 'enum' : 'InputAxis',
+ 'data' : [ 'X', 'Y' ] }
+
+##
+# @InputKeyEvent
+#
+# Keyboard input event.
+#
+# @key: Which key this event is for.
+# @down: True for key-down and false for key-up events.
+#
+# Since: 2.0
+##
+{ 'type' : 'InputKeyEvent',
+ 'data' : { 'key' : 'KeyValue',
+ 'down' : 'bool' } }
+
+##
+# @InputBtnEvent
+#
+# Pointer button input event.
+#
+# @button: Which button this event is for.
+# @down: True for key-down and false for key-up events.
+#
+# Since: 2.0
+##
+{ 'type' : 'InputBtnEvent',
+ 'data' : { 'button' : 'InputButton',
+ 'down' : 'bool' } }
+
+##
+# @InputMoveEvent
+#
+# Pointer motion input event.
+#
+# @axis: Which axis is referenced by @value.
+# @value: Pointer position. For absolute coordinates the
+# valid range is 0 -> 0x7ffff
+#
+# Since: 2.0
+##
+{ 'type' : 'InputMoveEvent',
+ 'data' : { 'axis' : 'InputAxis',
+ 'value' : 'int' } }
+
+##
+# @InputEvent
+#
+# Input event union.
+#
+# Since: 2.0
+##
+{ 'union' : 'InputEvent',
+ 'data' : { 'key' : 'InputKeyEvent',
+ 'btn' : 'InputBtnEvent',
+ 'rel' : 'InputMoveEvent',
+ 'abs' : 'InputMoveEvent' } }
--
1.8.3.1
- [Qemu-devel] [PATCH 18/42] input: keyboard: switch curses ui to new core, (continued)
- [Qemu-devel] [PATCH 18/42] input: keyboard: switch curses ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 09/42] input: add core bits of the new input layer, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 23/42] input: mouse: switch gtk ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 05/42] input: rename file to legacy, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 13/42] input: keyboard: switch gtk ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 11/42] input: keyboard: switch legacy handlers to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 25/42] sdl2: switch mouse handling to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 16/42] input: keyboard: switch vnc ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 27/42] input: mouse: switch spice ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 15/42] sdl2: switch keyboard handling to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 06/42] input: qapi: define event types,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 26/42] input: mouse: switch vnc ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 22/42] input: mouse: switch legacy handlers to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 35/42] input-legacy: remove kbd_mouse_event, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 31/42] input: trace events, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 33/42] input-legacy: remove kbd_mouse_has_absolute, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 20/42] input: mouse: add graphic_rotate support, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 34/42] input-legacy: remove kbd_mouse_is_absolute, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 40/42] input: move qmp_query_mice to new core, Gerd Hoffmann, 2014/01/28