[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/44] input: qapi: define event types
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 06/44] input: qapi: define event types |
Date: |
Mon, 24 Feb 2014 12:52:13 +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 a lot 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 split 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>
Reviewed-by: Eric Blake <address@hidden>
---
qapi-schema.json | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index 473c096..b23790b 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4500,3 +4500,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 30/44] input: mouse: switch cocoa ui to new core, (continued)
- [Qemu-devel] [PATCH 30/44] input: mouse: switch cocoa ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 09/44] input: add core bits of the new input layer, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 01/44] ui/sdl2 : initial port to SDL 2.0 (v2.0), Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 25/44] sdl2: switch mouse handling to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 05/44] input: rename file to legacy, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 40/44] input: move qmp_query_mice to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 21/44] input: mouse: add qemu_input_is_absolute(), Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 07/44] input: qapi: add unmapped key, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 29/44] input: keyboard: switch cocoa ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 06/44] input: qapi: define event types,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 15/44] sdl2: switch keyboard handling to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 19/44] input: mouse: add helpers functions to core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 17/44] input: keyboard: switch spice ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 31/44] input: trace events, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 16/44] input: keyboard: switch vnc ui to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 36/44] input: move mouse mode notifier to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 28/44] input: mouse: switch monitor to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 41/44] input: move do_mouse_set to new core, Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 43/44] console: add head to index to qemu consoles., Gerd Hoffmann, 2014/02/24
- [Qemu-devel] [PATCH 03/44] sdl2: remove text console logic, Gerd Hoffmann, 2014/02/24