diff options
author | Sergio Lopez <slp@redhat.com> | 2023-05-26 13:29:21 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-05-28 13:08:25 +0400 |
commit | 2bfb10dff2a21e42708aa4aef4bb64e8e3674858 (patch) | |
tree | d73da317f73335d5c13bb715acbe492a56e04fa3 /qapi | |
parent | 944ae6d9f17c3c6609f8d0832311b7a050d6c4b6 (diff) | |
download | qemu-2bfb10dff2a21e42708aa4aef4bb64e8e3674858.zip qemu-2bfb10dff2a21e42708aa4aef4bb64e8e3674858.tar.gz qemu-2bfb10dff2a21e42708aa4aef4bb64e8e3674858.tar.bz2 |
ui: add the infrastructure to support MT events
Add the required infrastructure to support generating multitouch events.
Signed-off-by: Sergio Lopez <slp@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230526112925.38794-3-slp@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/ui.json | 68 |
1 files changed, 59 insertions, 9 deletions
diff --git a/qapi/ui.json b/qapi/ui.json index d51e340..2755395 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1055,11 +1055,13 @@ # # @extra: rear side button of a 5-button mouse (since 2.9) # +# @touch: screen contact on a multi-touch device (since 8.1) +# # Since: 2.0 ## { 'enum' : 'InputButton', 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side', - 'extra', 'wheel-left', 'wheel-right' ] } + 'extra', 'wheel-left', 'wheel-right', 'touch' ] } ## # @InputAxis: @@ -1072,6 +1074,17 @@ 'data' : [ 'x', 'y' ] } ## +# @InputMultiTouchType: +# +# Type of a multi-touch event. +# +# Since: 8.1 +## +{ 'enum' : 'InputMultiTouchType', + 'data' : [ 'begin', 'update', 'end', 'cancel', 'data' ] } + + +## # @InputKeyEvent: # # Keyboard input event. @@ -1118,12 +1131,45 @@ 'value' : 'int' } } ## +# @InputMultiTouchEvent: +# +# MultiTouch input event. +# +# @slot: Which slot has generated the event. +# +# @tracking-id: ID to correlate this event with previously generated +# events. +# +# @axis: Which axis is referenced by @value. +# +# @value: Contact position. +# +# Since: 8.1 +## +{ 'struct' : 'InputMultiTouchEvent', + 'data' : { 'type' : 'InputMultiTouchType', + 'slot' : 'int', + 'tracking-id': 'int', + 'axis' : 'InputAxis', + 'value' : 'int' } } + +## # @InputEventKind: # +# @key: a keyboard input event +# +# @btn: a pointer button input event +# +# @rel: a relative pointer motion input event +# +# @abs: an absolute pointer motion input event +# +# @mtt: a multi-touch input event +# # Since: 2.0 ## { 'enum': 'InputEventKind', - 'data': [ 'key', 'btn', 'rel', 'abs' ] } + 'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] } ## # @InputKeyEventWrapper: @@ -1150,16 +1196,19 @@ 'data': { 'data': 'InputMoveEvent' } } ## +# @InputMultiTouchEventWrapper: +# +# Since: 8.1 +## +{ 'struct': 'InputMultiTouchEventWrapper', + 'data': { 'data': 'InputMultiTouchEvent' } } + +## # @InputEvent: # # Input event union. # -# @type: the input type, one of: -# -# - 'key': Input event of Keyboard -# - 'btn': Input event of pointer buttons -# - 'rel': Input event of relative pointer motion -# - 'abs': Input event of absolute pointer motion +# @type: the type of input event # # Since: 2.0 ## @@ -1169,7 +1218,8 @@ 'data' : { 'key' : 'InputKeyEventWrapper', 'btn' : 'InputBtnEventWrapper', 'rel' : 'InputMoveEventWrapper', - 'abs' : 'InputMoveEventWrapper' } } + 'abs' : 'InputMoveEventWrapper', + 'mtt' : 'InputMultiTouchEventWrapper' } } ## # @input-send-event: |