Update version for v6.0.0-rc4 release
[qemu/ar7.git] / qapi / ui.json
blob1052ca9c3848dfcfa1de0c9f72d26f63daf29f0a
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Remote desktop
7 ##
9 { 'include': 'common.json' }
10 { 'include': 'sockets.json' }
13 # @set_password:
15 # Sets the password of a remote display session.
17 # @protocol: - 'vnc' to modify the VNC server password
18 #            - 'spice' to modify the Spice server password
20 # @password: the new password
22 # @connected: how to handle existing clients when changing the
23 #             password.  If nothing is specified, defaults to 'keep'
24 #             'fail' to fail the command if clients are connected
25 #             'disconnect' to disconnect existing clients
26 #             'keep' to maintain existing clients
28 # Returns: - Nothing on success
29 #          - If Spice is not enabled, DeviceNotFound
31 # Since: 0.14
33 # Example:
35 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
36 #                                                "password": "secret" } }
37 # <- { "return": {} }
40 { 'command': 'set_password',
41   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
44 # @expire_password:
46 # Expire the password of a remote display server.
48 # @protocol: the name of the remote display protocol 'vnc' or 'spice'
50 # @time: when to expire the password.
52 #        - 'now' to expire the password immediately
53 #        - 'never' to cancel password expiration
54 #        - '+INT' where INT is the number of seconds from now (integer)
55 #        - 'INT' where INT is the absolute time in seconds
57 # Returns: - Nothing on success
58 #          - If @protocol is 'spice' and Spice is not active, DeviceNotFound
60 # Since: 0.14
62 # Notes: Time is relative to the server and currently there is no way to
63 #        coordinate server time with client time.  It is not recommended to
64 #        use the absolute time version of the @time parameter unless you're
65 #        sure you are on the same machine as the QEMU instance.
67 # Example:
69 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
70 #                                                   "time": "+60" } }
71 # <- { "return": {} }
74 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
77 # @screendump:
79 # Write a PPM of the VGA screen to a file.
81 # @filename: the path of a new PPM file to store the image
83 # @device: ID of the display device that should be dumped. If this parameter
84 #          is missing, the primary display will be used. (Since 2.12)
86 # @head: head to use in case the device supports multiple heads. If this
87 #        parameter is missing, head #0 will be used. Also note that the head
88 #        can only be specified in conjunction with the device ID. (Since 2.12)
90 # Returns: Nothing on success
92 # Since: 0.14
94 # Example:
96 # -> { "execute": "screendump",
97 #      "arguments": { "filename": "/tmp/image" } }
98 # <- { "return": {} }
101 { 'command': 'screendump',
102   'data': {'filename': 'str', '*device': 'str', '*head': 'int'},
103   'coroutine': true }
106 # == Spice
110 # @SpiceBasicInfo:
112 # The basic information for SPICE network connection
114 # @host: IP address
116 # @port: port number
118 # @family: address family
120 # Since: 2.1
122 { 'struct': 'SpiceBasicInfo',
123   'data': { 'host': 'str',
124             'port': 'str',
125             'family': 'NetworkAddressFamily' },
126   'if': 'defined(CONFIG_SPICE)' }
129 # @SpiceServerInfo:
131 # Information about a SPICE server
133 # @auth: authentication method
135 # Since: 2.1
137 { 'struct': 'SpiceServerInfo',
138   'base': 'SpiceBasicInfo',
139   'data': { '*auth': 'str' },
140   'if': 'defined(CONFIG_SPICE)' }
143 # @SpiceChannel:
145 # Information about a SPICE client channel.
147 # @connection-id: SPICE connection id number.  All channels with the same id
148 #                 belong to the same SPICE session.
150 # @channel-type: SPICE channel type number.  "1" is the main control
151 #                channel, filter for this one if you want to track spice
152 #                sessions only
154 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
155 #              multiple channels of the same type exist, such as multiple
156 #              display channels in a multihead setup
158 # @tls: true if the channel is encrypted, false otherwise.
160 # Since: 0.14
162 { 'struct': 'SpiceChannel',
163   'base': 'SpiceBasicInfo',
164   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
165            'tls': 'bool'},
166   'if': 'defined(CONFIG_SPICE)' }
169 # @SpiceQueryMouseMode:
171 # An enumeration of Spice mouse states.
173 # @client: Mouse cursor position is determined by the client.
175 # @server: Mouse cursor position is determined by the server.
177 # @unknown: No information is available about mouse mode used by
178 #           the spice server.
180 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
182 # Since: 1.1
184 { 'enum': 'SpiceQueryMouseMode',
185   'data': [ 'client', 'server', 'unknown' ],
186   'if': 'defined(CONFIG_SPICE)' }
189 # @SpiceInfo:
191 # Information about the SPICE session.
193 # @enabled: true if the SPICE server is enabled, false otherwise
195 # @migrated: true if the last guest migration completed and spice
196 #            migration had completed as well. false otherwise. (since 1.4)
198 # @host: The hostname the SPICE server is bound to.  This depends on
199 #        the name resolution on the host and may be an IP address.
201 # @port: The SPICE server's port number.
203 # @compiled-version: SPICE server version.
205 # @tls-port: The SPICE server's TLS port number.
207 # @auth: the current authentication type used by the server
209 #        - 'none'  if no authentication is being used
210 #        - 'spice' uses SASL or direct TLS authentication, depending on command
211 #          line options
213 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
214 #              be determined by the client or the server, or unknown if spice
215 #              server doesn't provide this information. (since: 1.1)
217 # @channels: a list of @SpiceChannel for each active spice channel
219 # Since: 0.14
221 { 'struct': 'SpiceInfo',
222   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
223            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
224            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
225   'if': 'defined(CONFIG_SPICE)' }
228 # @query-spice:
230 # Returns information about the current SPICE server
232 # Returns: @SpiceInfo
234 # Since: 0.14
236 # Example:
238 # -> { "execute": "query-spice" }
239 # <- { "return": {
240 #          "enabled": true,
241 #          "auth": "spice",
242 #          "port": 5920,
243 #          "tls-port": 5921,
244 #          "host": "0.0.0.0",
245 #          "channels": [
246 #             {
247 #                "port": "54924",
248 #                "family": "ipv4",
249 #                "channel-type": 1,
250 #                "connection-id": 1804289383,
251 #                "host": "127.0.0.1",
252 #                "channel-id": 0,
253 #                "tls": true
254 #             },
255 #             {
256 #                "port": "36710",
257 #                "family": "ipv4",
258 #                "channel-type": 4,
259 #                "connection-id": 1804289383,
260 #                "host": "127.0.0.1",
261 #                "channel-id": 0,
262 #                "tls": false
263 #             },
264 #             [ ... more channels follow ... ]
265 #          ]
266 #       }
267 #    }
270 { 'command': 'query-spice', 'returns': 'SpiceInfo',
271   'if': 'defined(CONFIG_SPICE)' }
274 # @SPICE_CONNECTED:
276 # Emitted when a SPICE client establishes a connection
278 # @server: server information
280 # @client: client information
282 # Since: 0.14
284 # Example:
286 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
287 #      "event": "SPICE_CONNECTED",
288 #      "data": {
289 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
290 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
291 #    }}
294 { 'event': 'SPICE_CONNECTED',
295   'data': { 'server': 'SpiceBasicInfo',
296             'client': 'SpiceBasicInfo' },
297   'if': 'defined(CONFIG_SPICE)' }
300 # @SPICE_INITIALIZED:
302 # Emitted after initial handshake and authentication takes place (if any)
303 # and the SPICE channel is up and running
305 # @server: server information
307 # @client: client information
309 # Since: 0.14
311 # Example:
313 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
314 #      "event": "SPICE_INITIALIZED",
315 #      "data": {"server": {"auth": "spice", "port": "5921",
316 #                          "family": "ipv4", "host": "127.0.0.1"},
317 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
318 #                          "connection-id": 1804289383, "host": "127.0.0.1",
319 #                          "channel-id": 0, "tls": true}
320 #    }}
323 { 'event': 'SPICE_INITIALIZED',
324   'data': { 'server': 'SpiceServerInfo',
325             'client': 'SpiceChannel' },
326   'if': 'defined(CONFIG_SPICE)' }
329 # @SPICE_DISCONNECTED:
331 # Emitted when the SPICE connection is closed
333 # @server: server information
335 # @client: client information
337 # Since: 0.14
339 # Example:
341 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
342 #      "event": "SPICE_DISCONNECTED",
343 #      "data": {
344 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
345 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
346 #    }}
349 { 'event': 'SPICE_DISCONNECTED',
350   'data': { 'server': 'SpiceBasicInfo',
351             'client': 'SpiceBasicInfo' },
352   'if': 'defined(CONFIG_SPICE)' }
355 # @SPICE_MIGRATE_COMPLETED:
357 # Emitted when SPICE migration has completed
359 # Since: 1.3
361 # Example:
363 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
364 #      "event": "SPICE_MIGRATE_COMPLETED" }
367 { 'event': 'SPICE_MIGRATE_COMPLETED',
368   'if': 'defined(CONFIG_SPICE)' }
371 # == VNC
375 # @VncBasicInfo:
377 # The basic information for vnc network connection
379 # @host: IP address
381 # @service: The service name of the vnc port. This may depend on the host
382 #           system's service database so symbolic names should not be relied
383 #           on.
385 # @family: address family
387 # @websocket: true in case the socket is a websocket (since 2.3).
389 # Since: 2.1
391 { 'struct': 'VncBasicInfo',
392   'data': { 'host': 'str',
393             'service': 'str',
394             'family': 'NetworkAddressFamily',
395             'websocket': 'bool' },
396   'if': 'defined(CONFIG_VNC)' }
399 # @VncServerInfo:
401 # The network connection information for server
403 # @auth: authentication method used for
404 #        the plain (non-websocket) VNC server
406 # Since: 2.1
408 { 'struct': 'VncServerInfo',
409   'base': 'VncBasicInfo',
410   'data': { '*auth': 'str' },
411   'if': 'defined(CONFIG_VNC)' }
414 # @VncClientInfo:
416 # Information about a connected VNC client.
418 # @x509_dname: If x509 authentication is in use, the Distinguished
419 #              Name of the client.
421 # @sasl_username: If SASL authentication is in use, the SASL username
422 #                 used for authentication.
424 # Since: 0.14
426 { 'struct': 'VncClientInfo',
427   'base': 'VncBasicInfo',
428   'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
429   'if': 'defined(CONFIG_VNC)' }
432 # @VncInfo:
434 # Information about the VNC session.
436 # @enabled: true if the VNC server is enabled, false otherwise
438 # @host: The hostname the VNC server is bound to.  This depends on
439 #        the name resolution on the host and may be an IP address.
441 # @family: - 'ipv6' if the host is listening for IPv6 connections
442 #          - 'ipv4' if the host is listening for IPv4 connections
443 #          - 'unix' if the host is listening on a unix domain socket
444 #          - 'unknown' otherwise
446 # @service: The service name of the server's port.  This may depends
447 #           on the host system's service database so symbolic names should not
448 #           be relied on.
450 # @auth: the current authentication type used by the server
452 #        - 'none' if no authentication is being used
453 #        - 'vnc' if VNC authentication is being used
454 #        - 'vencrypt+plain' if VEncrypt is used with plain text authentication
455 #        - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
456 #        - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
457 #        - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
458 #        - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
459 #        - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
460 #        - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
461 #        - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
462 #        - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
464 # @clients: a list of @VncClientInfo of all currently connected clients
466 # Since: 0.14
468 { 'struct': 'VncInfo',
469   'data': {'enabled': 'bool', '*host': 'str',
470            '*family': 'NetworkAddressFamily',
471            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
472   'if': 'defined(CONFIG_VNC)' }
475 # @VncPrimaryAuth:
477 # vnc primary authentication method.
479 # Since: 2.3
481 { 'enum': 'VncPrimaryAuth',
482   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
483             'tls', 'vencrypt', 'sasl' ],
484   'if': 'defined(CONFIG_VNC)' }
487 # @VncVencryptSubAuth:
489 # vnc sub authentication method with vencrypt.
491 # Since: 2.3
493 { 'enum': 'VncVencryptSubAuth',
494   'data': [ 'plain',
495             'tls-none',  'x509-none',
496             'tls-vnc',   'x509-vnc',
497             'tls-plain', 'x509-plain',
498             'tls-sasl',  'x509-sasl' ],
499   'if': 'defined(CONFIG_VNC)' }
502 # @VncServerInfo2:
504 # The network connection information for server
506 # @auth: The current authentication type used by the servers
508 # @vencrypt: The vencrypt sub authentication type used by the
509 #            servers, only specified in case auth == vencrypt.
511 # Since: 2.9
513 { 'struct': 'VncServerInfo2',
514   'base': 'VncBasicInfo',
515   'data': { 'auth'      : 'VncPrimaryAuth',
516             '*vencrypt' : 'VncVencryptSubAuth' },
517   'if': 'defined(CONFIG_VNC)' }
520 # @VncInfo2:
522 # Information about a vnc server
524 # @id: vnc server name.
526 # @server: A list of @VncBasincInfo describing all listening sockets.
527 #          The list can be empty (in case the vnc server is disabled).
528 #          It also may have multiple entries: normal + websocket,
529 #          possibly also ipv4 + ipv6 in the future.
531 # @clients: A list of @VncClientInfo of all currently connected clients.
532 #           The list can be empty, for obvious reasons.
534 # @auth: The current authentication type used by the non-websockets servers
536 # @vencrypt: The vencrypt authentication type used by the servers,
537 #            only specified in case auth == vencrypt.
539 # @display: The display device the vnc server is linked to.
541 # Since: 2.3
543 { 'struct': 'VncInfo2',
544   'data': { 'id'        : 'str',
545             'server'    : ['VncServerInfo2'],
546             'clients'   : ['VncClientInfo'],
547             'auth'      : 'VncPrimaryAuth',
548             '*vencrypt' : 'VncVencryptSubAuth',
549             '*display'  : 'str' },
550   'if': 'defined(CONFIG_VNC)' }
553 # @query-vnc:
555 # Returns information about the current VNC server
557 # Returns: @VncInfo
559 # Since: 0.14
561 # Example:
563 # -> { "execute": "query-vnc" }
564 # <- { "return": {
565 #          "enabled":true,
566 #          "host":"0.0.0.0",
567 #          "service":"50402",
568 #          "auth":"vnc",
569 #          "family":"ipv4",
570 #          "clients":[
571 #             {
572 #                "host":"127.0.0.1",
573 #                "service":"50401",
574 #                "family":"ipv4"
575 #             }
576 #          ]
577 #       }
578 #    }
581 { 'command': 'query-vnc', 'returns': 'VncInfo',
582   'if': 'defined(CONFIG_VNC)' }
584 # @query-vnc-servers:
586 # Returns a list of vnc servers.  The list can be empty.
588 # Returns: a list of @VncInfo2
590 # Since: 2.3
592 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
593   'if': 'defined(CONFIG_VNC)' }
596 # @change-vnc-password:
598 # Change the VNC server password.
600 # @password: the new password to use with VNC authentication
602 # Since: 1.1
604 # Notes: An empty password in this command will set the password to the empty
605 #        string.  Existing clients are unaffected by executing this command.
607 { 'command': 'change-vnc-password',
608   'data': { 'password': 'str' },
609   'if': 'defined(CONFIG_VNC)' }
612 # @VNC_CONNECTED:
614 # Emitted when a VNC client establishes a connection
616 # @server: server information
618 # @client: client information
620 # Note: This event is emitted before any authentication takes place, thus
621 #       the authentication ID is not provided
623 # Since: 0.13
625 # Example:
627 # <- { "event": "VNC_CONNECTED",
628 #      "data": {
629 #            "server": { "auth": "sasl", "family": "ipv4",
630 #                        "service": "5901", "host": "0.0.0.0" },
631 #            "client": { "family": "ipv4", "service": "58425",
632 #                        "host": "127.0.0.1" } },
633 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
636 { 'event': 'VNC_CONNECTED',
637   'data': { 'server': 'VncServerInfo',
638             'client': 'VncBasicInfo' },
639   'if': 'defined(CONFIG_VNC)' }
642 # @VNC_INITIALIZED:
644 # Emitted after authentication takes place (if any) and the VNC session is
645 # made active
647 # @server: server information
649 # @client: client information
651 # Since: 0.13
653 # Example:
655 # <-  { "event": "VNC_INITIALIZED",
656 #       "data": {
657 #            "server": { "auth": "sasl", "family": "ipv4",
658 #                        "service": "5901", "host": "0.0.0.0"},
659 #            "client": { "family": "ipv4", "service": "46089",
660 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
661 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
664 { 'event': 'VNC_INITIALIZED',
665   'data': { 'server': 'VncServerInfo',
666             'client': 'VncClientInfo' },
667   'if': 'defined(CONFIG_VNC)' }
670 # @VNC_DISCONNECTED:
672 # Emitted when the connection is closed
674 # @server: server information
676 # @client: client information
678 # Since: 0.13
680 # Example:
682 # <- { "event": "VNC_DISCONNECTED",
683 #      "data": {
684 #            "server": { "auth": "sasl", "family": "ipv4",
685 #                        "service": "5901", "host": "0.0.0.0" },
686 #            "client": { "family": "ipv4", "service": "58425",
687 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
688 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
691 { 'event': 'VNC_DISCONNECTED',
692   'data': { 'server': 'VncServerInfo',
693             'client': 'VncClientInfo' },
694   'if': 'defined(CONFIG_VNC)' }
697 # = Input
701 # @MouseInfo:
703 # Information about a mouse device.
705 # @name: the name of the mouse device
707 # @index: the index of the mouse device
709 # @current: true if this device is currently receiving mouse events
711 # @absolute: true if this device supports absolute coordinates as input
713 # Since: 0.14
715 { 'struct': 'MouseInfo',
716   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
717            'absolute': 'bool'} }
720 # @query-mice:
722 # Returns information about each active mouse device
724 # Returns: a list of @MouseInfo for each device
726 # Since: 0.14
728 # Example:
730 # -> { "execute": "query-mice" }
731 # <- { "return": [
732 #          {
733 #             "name":"QEMU Microsoft Mouse",
734 #             "index":0,
735 #             "current":false,
736 #             "absolute":false
737 #          },
738 #          {
739 #             "name":"QEMU PS/2 Mouse",
740 #             "index":1,
741 #             "current":true,
742 #             "absolute":true
743 #          }
744 #       ]
745 #    }
748 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
751 # @QKeyCode:
753 # An enumeration of key name.
755 # This is used by the @send-key command.
757 # @unmapped: since 2.0
758 # @pause: since 2.0
759 # @ro: since 2.4
760 # @kp_comma: since 2.4
761 # @kp_equals: since 2.6
762 # @power: since 2.6
763 # @hiragana: since 2.9
764 # @henkan: since 2.9
765 # @yen: since 2.9
767 # @sleep: since 2.10
768 # @wake: since 2.10
769 # @audionext: since 2.10
770 # @audioprev: since 2.10
771 # @audiostop: since 2.10
772 # @audioplay: since 2.10
773 # @audiomute: since 2.10
774 # @volumeup: since 2.10
775 # @volumedown: since 2.10
776 # @mediaselect: since 2.10
777 # @mail: since 2.10
778 # @calculator: since 2.10
779 # @computer: since 2.10
780 # @ac_home: since 2.10
781 # @ac_back: since 2.10
782 # @ac_forward: since 2.10
783 # @ac_refresh: since 2.10
784 # @ac_bookmarks: since 2.10
786 # @muhenkan: since 2.12
787 # @katakanahiragana: since 2.12
789 # 'sysrq' was mistakenly added to hack around the fact that
790 # the ps2 driver was not generating correct scancodes sequences
791 # when 'alt+print' was pressed. This flaw is now fixed and the
792 # 'sysrq' key serves no further purpose. Any further use of
793 # 'sysrq' will be transparently changed to 'print', so they
794 # are effectively synonyms.
796 # Since: 1.3
799 { 'enum': 'QKeyCode',
800   'data': [ 'unmapped',
801             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
802             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
803             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
804             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
805             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
806             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
807             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
808             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
809             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
810             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
811             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
812             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
813             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
814             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
815             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
816             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
817             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
818             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
819             'volumeup', 'volumedown', 'mediaselect',
820             'mail', 'calculator', 'computer',
821             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
824 # @KeyValue:
826 # Represents a keyboard key.
828 # Since: 1.3
830 { 'union': 'KeyValue',
831   'data': {
832     'number': 'int',
833     'qcode': 'QKeyCode' } }
836 # @send-key:
838 # Send keys to guest.
840 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
841 #        simultaneously sent to the guest. A @KeyValue.number value is sent
842 #        directly to the guest, while @KeyValue.qcode must be a valid
843 #        @QKeyCode value
845 # @hold-time: time to delay key up events, milliseconds. Defaults
846 #             to 100
848 # Returns: - Nothing on success
849 #          - If key is unknown or redundant, InvalidParameter
851 # Since: 1.3
853 # Example:
855 # -> { "execute": "send-key",
856 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
857 #                               { "type": "qcode", "data": "alt" },
858 #                               { "type": "qcode", "data": "delete" } ] } }
859 # <- { "return": {} }
862 { 'command': 'send-key',
863   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
866 # @InputButton:
868 # Button of a pointer input device (mouse, tablet).
870 # @side: front side button of a 5-button mouse (since 2.9)
872 # @extra: rear side button of a 5-button mouse (since 2.9)
874 # Since: 2.0
876 { 'enum'  : 'InputButton',
877   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
878   'extra' ] }
881 # @InputAxis:
883 # Position axis of a pointer input device (mouse, tablet).
885 # Since: 2.0
887 { 'enum'  : 'InputAxis',
888   'data'  : [ 'x', 'y' ] }
891 # @InputKeyEvent:
893 # Keyboard input event.
895 # @key:    Which key this event is for.
896 # @down:   True for key-down and false for key-up events.
898 # Since: 2.0
900 { 'struct'  : 'InputKeyEvent',
901   'data'  : { 'key'     : 'KeyValue',
902               'down'    : 'bool' } }
905 # @InputBtnEvent:
907 # Pointer button input event.
909 # @button: Which button this event is for.
910 # @down:   True for key-down and false for key-up events.
912 # Since: 2.0
914 { 'struct'  : 'InputBtnEvent',
915   'data'  : { 'button'  : 'InputButton',
916               'down'    : 'bool' } }
919 # @InputMoveEvent:
921 # Pointer motion input event.
923 # @axis: Which axis is referenced by @value.
924 # @value: Pointer position.  For absolute coordinates the
925 #         valid range is 0 -> 0x7ffff
927 # Since: 2.0
929 { 'struct'  : 'InputMoveEvent',
930   'data'  : { 'axis'    : 'InputAxis',
931               'value'   : 'int' } }
934 # @InputEvent:
936 # Input event union.
938 # @type: the input type, one of:
940 #        - 'key': Input event of Keyboard
941 #        - 'btn': Input event of pointer buttons
942 #        - 'rel': Input event of relative pointer motion
943 #        - 'abs': Input event of absolute pointer motion
945 # Since: 2.0
947 { 'union' : 'InputEvent',
948   'data'  : { 'key'     : 'InputKeyEvent',
949               'btn'     : 'InputBtnEvent',
950               'rel'     : 'InputMoveEvent',
951               'abs'     : 'InputMoveEvent' } }
954 # @input-send-event:
956 # Send input event(s) to guest.
958 # The @device and @head parameters can be used to send the input event
959 # to specific input devices in case (a) multiple input devices of the
960 # same kind are added to the virtual machine and (b) you have
961 # configured input routing (see docs/multiseat.txt) for those input
962 # devices.  The parameters work exactly like the device and head
963 # properties of input devices.  If @device is missing, only devices
964 # that have no input routing config are admissible.  If @device is
965 # specified, both input devices with and without input routing config
966 # are admissible, but devices with input routing config take
967 # precedence.
969 # @device: display device to send event(s) to.
970 # @head: head to send event(s) to, in case the
971 #        display device supports multiple scanouts.
972 # @events: List of InputEvent union.
974 # Returns: Nothing on success.
976 # Since: 2.6
978 # Note: The consoles are visible in the qom tree, under
979 #       /backend/console[$index]. They have a device link and head property,
980 #       so it is possible to map which console belongs to which device and
981 #       display.
983 # Example:
985 # 1. Press left mouse button.
987 # -> { "execute": "input-send-event",
988 #     "arguments": { "device": "video0",
989 #                    "events": [ { "type": "btn",
990 #                    "data" : { "down": true, "button": "left" } } ] } }
991 # <- { "return": {} }
993 # -> { "execute": "input-send-event",
994 #     "arguments": { "device": "video0",
995 #                    "events": [ { "type": "btn",
996 #                    "data" : { "down": false, "button": "left" } } ] } }
997 # <- { "return": {} }
999 # 2. Press ctrl-alt-del.
1001 # -> { "execute": "input-send-event",
1002 #      "arguments": { "events": [
1003 #         { "type": "key", "data" : { "down": true,
1004 #           "key": {"type": "qcode", "data": "ctrl" } } },
1005 #         { "type": "key", "data" : { "down": true,
1006 #           "key": {"type": "qcode", "data": "alt" } } },
1007 #         { "type": "key", "data" : { "down": true,
1008 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
1009 # <- { "return": {} }
1011 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1013 # -> { "execute": "input-send-event" ,
1014 #   "arguments": { "events": [
1015 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1016 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1017 # <- { "return": {} }
1020 { 'command': 'input-send-event',
1021   'data': { '*device': 'str',
1022             '*head'  : 'int',
1023             'events' : [ 'InputEvent' ] } }
1026 # @DisplayGTK:
1028 # GTK display options.
1030 # @grab-on-hover: Grab keyboard input on mouse hover.
1031 # @zoom-to-fit: Zoom guest display to fit into the host window.  When
1032 #               turned off the host window will be resized instead.
1033 #               In case the display device can notify the guest on
1034 #               window resizes (virtio-gpu) this will default to "on",
1035 #               assuming the guest will resize the display to match
1036 #               the window size then.  Otherwise it defaults to "off".
1037 #               Since 3.1
1039 # Since: 2.12
1042 { 'struct'  : 'DisplayGTK',
1043   'data'    : { '*grab-on-hover' : 'bool',
1044                 '*zoom-to-fit'   : 'bool'  } }
1047 # @DisplayEGLHeadless:
1049 # EGL headless display options.
1051 # @rendernode: Which DRM render node should be used. Default is the first
1052 #              available node on the host.
1054 # Since: 3.1
1057 { 'struct'  : 'DisplayEGLHeadless',
1058   'data'    : { '*rendernode' : 'str' } }
1060  ##
1061  # @DisplayGLMode:
1063  # Display OpenGL mode.
1065  # @off: Disable OpenGL (default).
1066  # @on: Use OpenGL, pick context type automatically.
1067  #      Would better be named 'auto' but is called 'on' for backward
1068  #      compatibility with bool type.
1069  # @core: Use OpenGL with Core (desktop) Context.
1070  # @es: Use OpenGL with ES (embedded systems) Context.
1072  # Since: 3.0
1074  ##
1075 { 'enum'    : 'DisplayGLMode',
1076   'data'    : [ 'off', 'on', 'core', 'es' ] }
1079 # @DisplayCurses:
1081 # Curses display options.
1083 # @charset:       Font charset used by guest (default: CP437).
1085 # Since: 4.0
1088 { 'struct'  : 'DisplayCurses',
1089   'data'    : { '*charset'       : 'str' } }
1092 # @DisplayType:
1094 # Display (user interface) type.
1096 # @default: The default user interface, selecting from the first available
1097 #           of gtk, sdl, cocoa, and vnc.
1099 # @none: No user interface or video output display. The guest will
1100 #        still see an emulated graphics card, but its output will not
1101 #        be displayed to the QEMU user.
1103 # @gtk: The GTK user interface.
1105 # @sdl: The SDL user interface.
1107 # @egl-headless: No user interface, offload GL operations to a local
1108 #                DRI device. Graphical display need to be paired with
1109 #                VNC or Spice. (Since 3.1)
1111 # @curses: Display video output via curses.  For graphics device
1112 #          models which support a text mode, QEMU can display this
1113 #          output using a curses/ncurses interface. Nothing is
1114 #          displayed when the graphics device is in graphical mode or
1115 #          if the graphics device does not support a text
1116 #          mode. Generally only the VGA device models support text
1117 #          mode.
1119 # @cocoa: The Cocoa user interface.
1121 # @spice-app: Set up a Spice server and run the default associated
1122 #             application to connect to it. The server will redirect
1123 #             the serial console and QEMU monitors. (Since 4.0)
1125 # Since: 2.12
1128 { 'enum'    : 'DisplayType',
1129   'data'    : [ 'default', 'none', 'gtk', 'sdl',
1130                 'egl-headless', 'curses', 'cocoa',
1131                 'spice-app'] }
1134 # @DisplayOptions:
1136 # Display (user interface) options.
1138 # @type:          Which DisplayType qemu should use.
1139 # @full-screen:   Start user interface in fullscreen mode (default: off).
1140 # @window-close:  Allow to quit qemu with window close button (default: on).
1141 # @show-cursor:   Force showing the mouse cursor (default: off).
1142 #                 (since: 5.0)
1143 # @gl:            Enable OpenGL support (default: off).
1145 # Since: 2.12
1148 { 'union'   : 'DisplayOptions',
1149   'base'    : { 'type'           : 'DisplayType',
1150                 '*full-screen'   : 'bool',
1151                 '*window-close'  : 'bool',
1152                 '*show-cursor'   : 'bool',
1153                 '*gl'            : 'DisplayGLMode' },
1154   'discriminator' : 'type',
1155   'data'    : { 'gtk'            : 'DisplayGTK',
1156                 'curses'         : 'DisplayCurses',
1157                 'egl-headless'   : 'DisplayEGLHeadless'} }
1160 # @query-display-options:
1162 # Returns information about display configuration
1164 # Returns: @DisplayOptions
1166 # Since: 3.1
1169 { 'command': 'query-display-options',
1170   'returns': 'DisplayOptions' }
1173 # @DisplayReloadType:
1175 # Available DisplayReload types.
1177 # @vnc: VNC display
1179 # Since: 6.0
1182 { 'enum': 'DisplayReloadType',
1183   'data': ['vnc'] }
1186 # @DisplayReloadOptionsVNC:
1188 # Specify the VNC reload options.
1190 # @tls-certs: reload tls certs or not.
1192 # Since: 6.0
1195 { 'struct': 'DisplayReloadOptionsVNC',
1196   'data': { '*tls-certs': 'bool' } }
1199 # @DisplayReloadOptions:
1201 # Options of the display configuration reload.
1203 # @type: Specify the display type.
1205 # Since: 6.0
1208 { 'union': 'DisplayReloadOptions',
1209   'base': {'type': 'DisplayReloadType'},
1210   'discriminator': 'type',
1211   'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1214 # @display-reload:
1216 # Reload display configuration.
1218 # Returns: Nothing on success.
1220 # Since: 6.0
1222 # Example:
1224 # -> { "execute": "display-reload",
1225 #      "arguments": { "type": "vnc", "tls-certs": true  } }
1226 # <- { "return": {} }
1229 { 'command': 'display-reload',
1230   'data': 'DisplayReloadOptions',
1231   'boxed' : true }