From 0c8d7065325d84cb2521c0b52f383561d2541415 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 2 Feb 2018 12:10:14 +0100 Subject: 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 Reviewed-by: Eric Blake Message-id: 20180202111022.19269-5-kraxel@redhat.com Signed-off-by: Gerd Hoffmann --- qapi/ui.json | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'qapi') 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' } } -- cgit v1.2.3