diff mbox series

[v2,10/12] qapi: document DisplayType enum

Message ID 20181220141553.24098-11-marcandre.lureau@redhat.com
State New
Headers show
Series spice: add -display spice-app, setup and launch a Spice client | expand

Commit Message

Marc-André Lureau Dec. 20, 2018, 2:15 p.m. UTC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 qapi/ui.json | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Eric Blake Dec. 20, 2018, 2:46 p.m. UTC | #1
On 12/20/18 8:15 AM, Marc-André Lureau wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   qapi/ui.json | 24 ++++++++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
> diff --git a/qapi/ui.json b/qapi/ui.json
> index 5ad13248d5..3f2f662dca 100644
> --- a/qapi/ui.json
> +++ b/qapi/ui.json
> @@ -1075,6 +1075,30 @@
>   #
>   # Display (user interface) type.
>   #
> +# @default: The default user interface.

Any more hints on how this default is determined?  Is it a compile-time 
decision, based on what libraries were linked in?  Does the work on 
adding #if support to qapi make it introspectible what the default is?

> +#
> +# @none: No user interface or video output display. The guest will
> +#        still see an emulated graphics card, but its output will not
> +#        be displayed to the QEMU user.
> +#
> +# @gtk: The GTK user interface.
> +#
> +# @sdl: The SDL user interface.
> +#
> +# @egl-headless: No user interface, offload GL operations to a local
> +#                DRI device. Graphical display need to be paired with
> +#                VNC or Spice. (Since 3.1)

s/need/needs/

> +#
> +# @curses: Display video output via curses.  For graphics device
> +#          models which support a text mode, QEMU can display this
> +#          output using a curses/ncurses interface. Nothing is
> +#          displayed when the graphics device is in graphical mode or
> +#          if the graphics device does not support a text
> +#          mode. Generally only the VGA device models support text
> +#          mode.
> +#
> +# @cocoa: The Cocoa user interface.
> +#
>   # Since: 2.12
>   #
>   ##
>
Gerd Hoffmann Jan. 7, 2019, 9:45 a.m. UTC | #2
On Thu, Dec 20, 2018 at 08:46:13AM -0600, Eric Blake wrote:
> On 12/20/18 8:15 AM, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >   qapi/ui.json | 24 ++++++++++++++++++++++++
> >   1 file changed, 24 insertions(+)
> > 
> > diff --git a/qapi/ui.json b/qapi/ui.json
> > index 5ad13248d5..3f2f662dca 100644
> > --- a/qapi/ui.json
> > +++ b/qapi/ui.json
> > @@ -1075,6 +1075,30 @@
> >   #
> >   # Display (user interface) type.
> >   #
> > +# @default: The default user interface.
> 
> Any more hints on how this default is determined?  Is it a compile-time
> decision, based on what libraries were linked in?

Basically yes.  A bit more complicated due to modules.  gtk, sdl and
cocoa are checked, in that order.  And if none of them is available the
vnc server is enabled.

> Does the work on adding
> #if support to qapi make it introspectible what the default is?

Due to modules it isn't a compile time constant.  With a modular build
and gtk being packaged as separate sub-rpm the default depends on
whenever the sub-rpm is installed or not.

So I guess the answer is "no".

cheers,
  Gerd
Marc-André Lureau Feb. 9, 2019, 1:15 p.m. UTC | #3
Hi

On Mon, Jan 7, 2019 at 10:46 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Thu, Dec 20, 2018 at 08:46:13AM -0600, Eric Blake wrote:
> > On 12/20/18 8:15 AM, Marc-André Lureau wrote:
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > ---
> > >   qapi/ui.json | 24 ++++++++++++++++++++++++
> > >   1 file changed, 24 insertions(+)
> > >
> > > diff --git a/qapi/ui.json b/qapi/ui.json
> > > index 5ad13248d5..3f2f662dca 100644
> > > --- a/qapi/ui.json
> > > +++ b/qapi/ui.json
> > > @@ -1075,6 +1075,30 @@
> > >   #
> > >   # Display (user interface) type.
> > >   #
> > > +# @default: The default user interface.
> >
> > Any more hints on how this default is determined?  Is it a compile-time
> > decision, based on what libraries were linked in?
>
> Basically yes.  A bit more complicated due to modules.  gtk, sdl and
> cocoa are checked, in that order.  And if none of them is available the
> vnc server is enabled.


Eric, should I cram this comment there?: "(gtk, sdl and
cocoa are checked, in that order.  And if none of them is available the
vnc server is enabled)"

thanks

>
> > Does the work on adding
> > #if support to qapi make it introspectible what the default is?
>
> Due to modules it isn't a compile time constant.  With a modular build
> and gtk being packaged as separate sub-rpm the default depends on
> whenever the sub-rpm is installed or not.
>
> So I guess the answer is "no".
>
> cheers,
>   Gerd
>
Eric Blake Feb. 11, 2019, 6:28 p.m. UTC | #4
On 2/9/19 7:15 AM, Marc-André Lureau wrote:

>>>>   # Display (user interface) type.
>>>>   #
>>>> +# @default: The default user interface.
>>>
>>> Any more hints on how this default is determined?  Is it a compile-time
>>> decision, based on what libraries were linked in?
>>
>> Basically yes.  A bit more complicated due to modules.  gtk, sdl and
>> cocoa are checked, in that order.  And if none of them is available the
>> vnc server is enabled.
> 
> 
> Eric, should I cram this comment there?: "(gtk, sdl and
> cocoa are checked, in that order.  And if none of them is available the
> vnc server is enabled)"

If you think the end user will benefit from reading that, then it is
worth adding.  Wordsmithing a bit:

@default: The default user interface, selecting from the first available
of gtk, sdl, cocoa, and vnc.
diff mbox series

Patch

diff --git a/qapi/ui.json b/qapi/ui.json
index 5ad13248d5..3f2f662dca 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -1075,6 +1075,30 @@ 
 #
 # Display (user interface) type.
 #
+# @default: The default user interface.
+#
+# @none: No user interface or video output display. The guest will
+#        still see an emulated graphics card, but its output will not
+#        be displayed to the QEMU user.
+#
+# @gtk: The GTK user interface.
+#
+# @sdl: The SDL user interface.
+#
+# @egl-headless: No user interface, offload GL operations to a local
+#                DRI device. Graphical display need to be paired with
+#                VNC or Spice. (Since 3.1)
+#
+# @curses: Display video output via curses.  For graphics device
+#          models which support a text mode, QEMU can display this
+#          output using a curses/ncurses interface. Nothing is
+#          displayed when the graphics device is in graphical mode or
+#          if the graphics device does not support a text
+#          mode. Generally only the VGA device models support text
+#          mode.
+#
+# @cocoa: The Cocoa user interface.
+#
 # Since: 2.12
 #
 ##