aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-02-02 12:10:14 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-02-20 12:12:04 +0100
commit0c8d7065325d84cb2521c0b52f383561d2541415 (patch)
treec99d887272a8f4713cb293323508091f1e734ad0 /qapi
parentbe045e6bb8c63ea4d7b4d7775febe18ccdf8dd24 (diff)
gtk: add and use DisplayOptions + DisplayGTK
Add QAPI DisplayType enum, DisplayOptions union and DisplayGTK struct. Switch gtk configuration to use the qapi type. Some bookkeeping (fullscreen for example) is done twice now, this is temporary until more/all UIs are switched over to qapi configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-5-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/ui.json58
1 files changed, 58 insertions, 0 deletions
diff --git a/qapi/ui.json b/qapi/ui.json
index d6679aa8f5..878a3bd2a6 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -985,3 +985,61 @@
'data': { '*device': 'str',
'*head' : 'int',
'events' : [ 'InputEvent' ] } }
+
+
+##
+# @DisplayNoOpts:
+#
+# Empty struct for displays without config options.
+#
+# Since: 2.12
+#
+##
+{ 'struct' : 'DisplayNoOpts',
+ 'data' : { } }
+
+##
+# @DisplayGTK:
+#
+# GTK display options.
+#
+# @grab-on-hover: Grab keyboard input on mouse hover.
+#
+# Since: 2.12
+#
+##
+{ 'struct' : 'DisplayGTK',
+ 'data' : { '*grab-on-hover' : 'bool' } }
+
+##
+# @DisplayType:
+#
+# Display (user interface) type.
+#
+# Since: 2.12
+#
+##
+{ 'enum' : 'DisplayType',
+ 'data' : [ 'none', 'gtk' ] }
+
+##
+# @DisplayOptions:
+#
+# Display (user interface) options.
+#
+# @type: Which DisplayType qemu should use.
+# @full-screen: Start user interface in fullscreen mode (default: off).
+# @window-close: Allow to quit qemu with window close button (default: on).
+# @gl: Enable OpenGL support (default: off).
+#
+# Since: 2.12
+#
+##
+{ 'union' : 'DisplayOptions',
+ 'base' : { 'type' : 'DisplayType',
+ '*full-screen' : 'bool',
+ '*window-close' : 'bool',
+ '*gl' : 'bool' },
+ 'discriminator' : 'type',
+ 'data' : { 'none' : 'DisplayNoOpts',
+ 'gtk' : 'DisplayGTK' } }