[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v4 03/38] input: qapi: define event types
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL v4 03/38] input: qapi: define event types |
Date: |
Wed, 5 Mar 2014 12:53:05 +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 193e7e4..9d7d7a8 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4566,3 +4566,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] [PULL v4 00/38] rework input handling, sdl2 support, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 03/38] input: qapi: define event types,
Gerd Hoffmann <=
- [Qemu-devel] [PULL v4 02/38] input: rename file to legacy, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 05/38] input: qapi: add pause key, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 18/38] input: mouse: switch legacy handlers to new core, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 01/38] console: export QemuConsole index, width, height, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 09/38] input: keyboard: switch qmp_send_key() to new core., Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 35/38] input: remove index_from_keycode (no users), Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 08/38] input: keyboard: switch legacy handlers to new core, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 16/38] input: mouse: add graphic_rotate support, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 14/38] input: keyboard: switch curses ui to new core, Gerd Hoffmann, 2014/03/05
- [Qemu-devel] [PULL v4 11/38] input: keyboard: switch sdl ui to new core, Gerd Hoffmann, 2014/03/05