summaryrefslogtreecommitdiff
path: root/qapi/ui.json
AgeCommit message (Collapse)Author
2020-08-03schemas: Add vim modelineAndrea Bolognani
The various schemas included in QEMU use a JSON-based format which is, however, strictly speaking not valid JSON. As a consequence, when vim tries to apply syntax highlight rules for JSON (as guessed from the file name), the result is an unreadable mess which mostly consist of red markers pointing out supposed errors in, well, pretty much everything. Using Python syntax highlighting produces much better results, and in fact these files already start with specially-formatted comments that instruct Emacs to process them as if they were Python files. This commit adds the equivalent special comments for vim. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Message-Id: <20200729185024.121766-1-abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-08-03qapi: Delete unwanted indentation of top-level expressionsMarkus Armbruster
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200730091656.2633334-1-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [One more line de-indented]
2020-02-15qapi: Delete all the "foo: dropped in n.n" notesPeter Maydell
A handful of QAPI doc comments include lines like "ppcemb: dropped in 3.1". The doc comment parser will just put these into whatever the preceding section was; sometimes that's "Notes", and sometimes it's some random other section, as with "NetClientDriver" where the "'dump': dropped in 2.12" line ends up in the "Since:" section. This tends to render wrongly, more so in the upcoming rST generator, but sometimes even in the Texinfo, as in the case of QKeyCode: ac_bookmarks since 2.10 altgr, altgr_r: dropped in 2.10 Since commit 3264ffced3 (v4.2.0), we have a better place to tell users about deprecated and deleted functionality -- qemu-deprecated.texi. These "dropped in" remarks all predate it, and other feature drops of that vintage are not documented anywhere, so moving these to qemu-deprecated.texi makes little sense. Drop them instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200213175647.17628-19-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-15qapi: Add blank lines before bulleted listsPeter Maydell
We would like to switch the doc comments to rST format. rST insists on a blank line before and after a bulleted list, but our Texinfo doc generator did not. Add some extra blank lines in the doc comments so they're acceptable rST input. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200213175647.17628-17-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-15qapi: Use explicit bulleted listsPeter Maydell
A JSON block comment like this: Returns: nothing on success If @node is not a valid block device, DeviceNotFound If @name is not found, GenericError with an explanation renders like this: Returns: nothing on success If node is not a valid block device, DeviceNotFound If name is not found, GenericError with an explanation because whitespace is not significant. Use an actual bulleted list, so that the formatting is correct. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200213175647.17628-14-peter.maydell@linaro.org> Message-Id: <20200213175647.17628-15-peter.maydell@linaro.org> Message-Id: <20200213175647.17628-16-peter.maydell@linaro.org> [Three commits squashed into one] Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-15qapi/ui.json: Avoid `...' Texinfo style quotingPeter Maydell
Avoid Texinfo style quoting with `...', because we would like to switch the doc comments to rST format, and rST treats it as a syntax error. Use '...' instead, as we do in other doc comments. This looks OK in Texinfo, and rST formats it as paired-quotation-marks. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200213175647.17628-13-peter.maydell@linaro.org> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-15qapi/ui.json: Put input-send-event body text in the right placePeter Maydell
In the doc comment for input-send-event, there is a multi-line chunk of text ("The @device...take precedence") which is intended to be the main body text describing the event. However it has been placed after the arguments and Returns: section, which means that the parser actually thinks that this text is part of the "Returns" section text. Move the body text up to the top so that the parser correctly classifies it as body. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200213175647.17628-12-peter.maydell@linaro.org> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-15qapi: Fix indent level on doc comments in json filesPeter Maydell
The current doc generation doesn't care much about indentation levels, but we would like to switch to an rST format, and rST does care about indentation. Make the doc comments more strongly consistent about indentation for multiline constructs like: @arg: description line 1 description line 2 Returns: line one line 2 so that there is always exactly one space after the colon, and subsequent lines align with the first. This commit is a purely whitespace change, and it does not alter the generated .texi files (because the texi generation code strips away all the extra whitespace). This does mean that we end up with some over-length lines. Note that when the documentation for an argument fits on a single line like this: @arg: one line only then stray extra spaces after the ':' don't affect the rST output, so I have not attempted to methodically fix them, though the preference is a single space here too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200213175647.17628-10-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-12ui: add show-cursor optionGerd Hoffmann
When enabled, this forces showing the mouse cursor, i.e. do not hide the pointer on mouse grabs. Defaults to off. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-08-21input-linux: add shift+shift as a grab toggleNiklas Haas
We have ctrl-ctrl and alt-alt; why not shift-shift? That's my preferred grab binding, personally. Signed-off-by: Niklas Haas <git@haasn.xyz> Message-id: 20190818105038.19520-1-qemu@haasn.xyz Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-13curses: add option to specify VGA font encodingSamuel Thibault
This uses iconv to convert glyphs from the specified VGA font encoding to unicode, and makes use of cchar_t instead of chtype when using ncursesw, which allows to store all wide char as well as the WACS values. The default charset is made CP437 since that is the charset of the hardware default VGA font. This also makes the curses backend set the LC_CTYPE locale to "" to allow curses to emit wide characters. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Eddie Kohler <ekohler@gmail.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190311135127.2229-3-samuel.thibault@ens-lyon.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-22display: add -display spice-app launching a Spice clientMarc-André Lureau
Add a new display backend that will configure Spice to allow a remote client to control QEMU in a similar fashion as other QEMU display backend/UI like GTK. For this to work, it will set up Spice server with a unix socket, and register a VC chardev that will be exposed as Spice ports. A QMP monitor is also exposed as a Spice port, this allows the remote client fuller qemu control and state handling. - doesn't handle VC set_echo() - this doesn't seem a strong requirement, very few front-end use it - spice options can be tweaked with other -spice arguments - Windows support shouldn't be hard to do, but will probably use a TCP port instead - we may want to watch the child process to quit automatically if it crashed Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Victor Toso <victortoso@redhat.com> Message-id: 20190221110703.5775-12-marcandre.lureau@redhat.com [ kraxel: squash incremental fix ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-02-21qapi: document DisplayType enumMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Victor Toso <victortoso@redhat.com> Message-id: 20190221110703.5775-10-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-24input-linux: customizable grab toggle keysRyan El Kochta
This patch adds a new option to the input-linux object: grab-toggle=[key-combo] The key combination can be one of the following: * ctrl-ctrl * alt-alt * meta-meta * scrolllock * ctrl-scrolllock The user can pick any of these key combinations. The VM's grab of the evdev device will be toggled when the key combination is pressed. Any invalid setting will result in an error. No setting will result in the current default of ctrl-ctrl. The right and left ctrl key both work for Ctrl-Scrolllock. If scrolllock is selected as one of the grab-toggle keys, it will be entirely disabled and not passed to the guest at all. This is to prevent enabling it while attempting to leave or enter the VM. On the host, scrolllock can be disabled using xmodmap. First, find the modifier that Scroll_Lock is bound to: $ xmodmap -pm Then, remove Scroll_Lock from it, replacing modX with the modifier: $ xmodmap -e 'remove modX = Scroll_Lock' If Scroll_Lock is not bound to any modifier, it is already disabled. To save the changes, add them to your xinitrc. Ryan El Kochta (1): input-linux: customizable grab toggle keys v5 Signed-off-by: Ryan El Kochta <relkochta@gmail.com> Message-id: 20190123214555.12712-2-relkochta@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-12-13qapi: break long lines at 'data' memberMarc-André Lureau
Let's break the line before 'data'. While at it, improve a bit indentation/spacing. (I removed some alignment which are not helping much readability and become quickly inconsistent) Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20181208111606.8505-26-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-11-27qapi: add query-display-options commandGerd Hoffmann
Add query-display-options command, which allows querying the qemu display configuration. This isn't particularly useful, except it exposes QAPI type DisplayOptions in query-qmp-schema, so that libvirt can discover recently added -display parameter rendernode (commit d4dc4ab133b). Works around lack of sufficiently powerful command line introspection. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Tested-by: Erik Skultety <eskultet@redhat.com> Message-id: 20181122071613.2889-1-kraxel@redhat.com [ kraxel: reworded commit message as suggested by armbru ]
2018-11-16qapi: Add "rendernode" display option for egl-headlessErik Skultety
Unlike SPICE, egl-headless doesn't offer a way of specifying the DRM node used for OpenGL, hence QEMU always selecting the first one that is available. Thus, add the 'rendernode' option for egl-headless to QAPI. Signed-off-by: Erik Skultety <eskultet@redhat.com> Message-id: 7658e15eca72d520e7a5fb1c2e724702d83d4f7f.1542362949.git.eskultet@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-10-01gtk: add zoom-to-fit to gtk options.Gerd Hoffmann
This allows to set the option on the command line, i.e. "-display gtk,zoom-to-fit={on,off}", overriding the default chosen by qemu. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20180827095620.26774-1-kraxel@redhat.com
2018-07-03qapi: add conditions to SPICE type/commands/events on the schemaMarc-André Lureau
Add #if defined(CONFIG_SPICE) in generated code, and adjust the qmp/hmp code accordingly. query-qmp-schema no longer reports the command/events etc as available when disabled at compile time. Commands made conditional: * query-spice Before the patch, the command for !CONFIG_SPICE is unregistered. It will fail with the same error. Events made conditional: * SPICE_CONNECTED, SPICE_INITIALIZED, SPICE_DISCONNECTED, SPICE_MIGRATE_COMPLETED Add TODO for conditional SPICE chardevs, delayed until the supports for conditional members lands. No HMP change, the code was already conditional. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-15-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-07-03qapi: add conditions to VNC type/commands/events on the schemaMarc-André Lureau
Add #if defined(CONFIG_VNC) in generated code, and adjust the qmp/hmp code accordingly. query-qmp-schema no longer reports the command/events etc as available when disabled at compile. Commands made conditional: * query-vnc, query-vnc-servers, change-vnc-password Before the patch, the commands for !CONFIG_VNC are stubs that fail like this: {"error": {"class": "GenericError", "desc": "The feature 'vnc' is not enabled"}} Afterwards, they fail like this: {"error": {"class": "CommandNotFound", "desc": "The command FOO has not been found"}} I call that an improvement, because it lets clients distinguish between command unavailable (class CommandNotFound) and command failed (class GenericError). Events made conditional: * VNC_CONNECTED, VNC_INITIALIZED, VNC_DISCONNECTED HMP change: * info vnc Will return "unknown command: 'info vnc'" when VNC is compiled out (same as error for spice when --disable-spice) Occurrences of VNC (case insensitive) in the schema that aren't covered by this change: * add_client Command has other uses, including "socket bases character devices". These are unconditional as far as I can tell. * set_password, expire_password In theory, these commands could be used for managing any service's password. In practice, they're used for VNC and SPICE services. They're documented for "remote display session" / "remote display server". The service is selected by argument @protocol. The code special-cases protocol-specific argument checking, then calls a protocol-specific function to do the work. If it fails, the command fails with "Could not set password". It does when the service isn't compiled in (it's a stub then). We could make these commands conditional on the conjunction of all services [currently: defined(CONFIG_VNC) || defined(CONFIG_SPICE)], but I doubt it's worthwhile. * change Command has other uses, namely changing media. This patch inlines a stub; no functional change. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-14-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-06-22qapi: remove empty flat union branches and typesAnton Nefedov
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1529311206-76847-3-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-05-29qapi: Change "since 2.13" annotations to "since 3.0"Peter Maydell
We're going to make the next release be 3.0, not 2.13; change the annotations in our json appropriately. Changes produced with sed -i -e 's/2\.13/3.0/g' qapi/*.json Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20180522104000.9044-2-peter.maydell@linaro.org
2018-04-27qapi: Parameter gl of DisplayType now accept an enumElie Tournier
v2: Rebase on top of master v3: Fix the json format (Eric Blake) Fix a comparison issue (Gerd Hoffmann) Signed-off-by: Elie Tournier <elie.tournier@collabora.com> Message-id: 20180413135842.21325-2-tournier.elie@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-03-12qapi: Add device ID and head parameters to screendumpThomas Huth
QEMU's screendump command can only take dumps from the primary display. When using multiple VGA cards, there is no way to get a dump from a secondary card or other display heads yet. So let's add a 'device' and a 'head' parameter to the HMP and QMP commands to be able to specify alternative devices and heads with the screendump command, too. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1520267868-31778-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20vl: drop display_type variableGerd Hoffmann
Switch over all leftover users to qapi DisplayType. Then delete the unused display_type variable. Add 'default' DisplayType, which isn't an actual display type but a placeholder for "user didn't specify a display". It will be replaced by the DisplayType actually used, which in turn depends on the DisplayTypes availabel in the particular build. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-13-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20cocoa: use DisplayOptionsGerd Hoffmann
Switch cocoa ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-10-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20curses: use DisplayOptionsGerd Hoffmann
Switch curses ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-9-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20egl-headless: use DisplayOptionsGerd Hoffmann
Switch egl-headless ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-8-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20sdl: use DisplayOptionsGerd Hoffmann
Switch sdl ui to use qapi DisplayOptions for configuration. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180202111022.19269-6-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-02-20gtk: add and use DisplayOptions + DisplayGTKGerd Hoffmann
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>
2018-02-05input: add missing JIS keys to virtio inputMiika S
keycodemapdb updated to add the QKeyCodes muhenkan and katakanahiragana Signed-off-by: Miika S <miika9764@gmail.com> Message-Id: <20180116134217.8725-12-berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-10-23ui: normalize the 'sysrq' key into the 'print' keyDaniel P. Berrange
The 'sysrq' key was mistakenly added to QEMU to deal with incorrect handling of the 'print' key in the ps2 device: commit f2289cb6924afc97b2a75d21bfc9217024d11741 Author: balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> Date: Wed Jun 4 10:14:16 2008 +0000 Add sysrq to key names known by "sendkey". Adding sysrq keycode to the table enabling running sysrq debugging in the guest via the monitor sendkey command, like: (qemu) sendkey alt-sysrq-t Tested on x86-64 target and Linux guest. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> The ps2 device is now fixed wrt modifiers and the 'print' key. Further the handling of the 'sysrq' key has some problems of its own, documented in the previous commit. To cleanup this mess, we convert any use of 'sysrq' into 'print' prior to dispatching the event to device models. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20171019142848.572-9-berrange@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-09-04qapi-schema: Collect UI stuff in qapi/ui.jsonMarkus Armbruster
UI stuff is remote desktop stuff (Spice, VNC) and input stuff (mouse, keyboard). Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1503602048-12268-9-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>