hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl
[qemu/ar7.git] / qapi / ui.json
blob9d6721037f5b76427b7fba3e703408b14da4cd7b
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Remote desktop
7 ##
9 { 'include': 'sockets.json' }
12 # @set_password:
14 # Sets the password of a remote display session.
16 # @protocol: - 'vnc' to modify the VNC server password
17 #            - 'spice' to modify the Spice server password
19 # @password: the new password
21 # @connected: how to handle existing clients when changing the
22 #             password.  If nothing is specified, defaults to 'keep'
23 #             'fail' to fail the command if clients are connected
24 #             'disconnect' to disconnect existing clients
25 #             'keep' to maintain existing clients
27 # Returns: - Nothing on success
28 #          - If Spice is not enabled, DeviceNotFound
30 # Since: 0.14.0
32 # Example:
34 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
35 #                                                "password": "secret" } }
36 # <- { "return": {} }
39 { 'command': 'set_password',
40   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
43 # @expire_password:
45 # Expire the password of a remote display server.
47 # @protocol: the name of the remote display protocol 'vnc' or 'spice'
49 # @time: when to expire the password.
51 #        - 'now' to expire the password immediately
52 #        - 'never' to cancel password expiration
53 #        - '+INT' where INT is the number of seconds from now (integer)
54 #        - 'INT' where INT is the absolute time in seconds
56 # Returns: - Nothing on success
57 #          - If @protocol is 'spice' and Spice is not active, DeviceNotFound
59 # Since: 0.14.0
61 # Notes: Time is relative to the server and currently there is no way to
62 #        coordinate server time with client time.  It is not recommended to
63 #        use the absolute time version of the @time parameter unless you're
64 #        sure you are on the same machine as the QEMU instance.
66 # Example:
68 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
69 #                                                   "time": "+60" } }
70 # <- { "return": {} }
73 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
76 # @screendump:
78 # Write a PPM of the VGA screen to a file.
80 # @filename: the path of a new PPM file to store the image
82 # @device: ID of the display device that should be dumped. If this parameter
83 #          is missing, the primary display will be used. (Since 2.12)
85 # @head: head to use in case the device supports multiple heads. If this
86 #        parameter is missing, head #0 will be used. Also note that the head
87 #        can only be specified in conjunction with the device ID. (Since 2.12)
89 # Returns: Nothing on success
91 # Since: 0.14.0
93 # Example:
95 # -> { "execute": "screendump",
96 #      "arguments": { "filename": "/tmp/image" } }
97 # <- { "return": {} }
100 { 'command': 'screendump',
101   'data': {'filename': 'str', '*device': 'str', '*head': 'int'} }
104 # == Spice
108 # @SpiceBasicInfo:
110 # The basic information for SPICE network connection
112 # @host: IP address
114 # @port: port number
116 # @family: address family
118 # Since: 2.1
120 { 'struct': 'SpiceBasicInfo',
121   'data': { 'host': 'str',
122             'port': 'str',
123             'family': 'NetworkAddressFamily' },
124   'if': 'defined(CONFIG_SPICE)' }
127 # @SpiceServerInfo:
129 # Information about a SPICE server
131 # @auth: authentication method
133 # Since: 2.1
135 { 'struct': 'SpiceServerInfo',
136   'base': 'SpiceBasicInfo',
137   'data': { '*auth': 'str' },
138   'if': 'defined(CONFIG_SPICE)' }
141 # @SpiceChannel:
143 # Information about a SPICE client channel.
145 # @connection-id: SPICE connection id number.  All channels with the same id
146 #                 belong to the same SPICE session.
148 # @channel-type: SPICE channel type number.  "1" is the main control
149 #                channel, filter for this one if you want to track spice
150 #                sessions only
152 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
153 #              multiple channels of the same type exist, such as multiple
154 #              display channels in a multihead setup
156 # @tls: true if the channel is encrypted, false otherwise.
158 # Since: 0.14.0
160 { 'struct': 'SpiceChannel',
161   'base': 'SpiceBasicInfo',
162   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
163            'tls': 'bool'},
164   'if': 'defined(CONFIG_SPICE)' }
167 # @SpiceQueryMouseMode:
169 # An enumeration of Spice mouse states.
171 # @client: Mouse cursor position is determined by the client.
173 # @server: Mouse cursor position is determined by the server.
175 # @unknown: No information is available about mouse mode used by
176 #           the spice server.
178 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
180 # Since: 1.1
182 { 'enum': 'SpiceQueryMouseMode',
183   'data': [ 'client', 'server', 'unknown' ],
184   'if': 'defined(CONFIG_SPICE)' }
187 # @SpiceInfo:
189 # Information about the SPICE session.
191 # @enabled: true if the SPICE server is enabled, false otherwise
193 # @migrated: true if the last guest migration completed and spice
194 #            migration had completed as well. false otherwise. (since 1.4)
196 # @host: The hostname the SPICE server is bound to.  This depends on
197 #        the name resolution on the host and may be an IP address.
199 # @port: The SPICE server's port number.
201 # @compiled-version: SPICE server version.
203 # @tls-port: The SPICE server's TLS port number.
205 # @auth: the current authentication type used by the server
207 #        - 'none'  if no authentication is being used
208 #        - 'spice' uses SASL or direct TLS authentication, depending on command
209 #          line options
211 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
212 #              be determined by the client or the server, or unknown if spice
213 #              server doesn't provide this information. (since: 1.1)
215 # @channels: a list of @SpiceChannel for each active spice channel
217 # Since: 0.14.0
219 { 'struct': 'SpiceInfo',
220   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
221            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
222            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
223   'if': 'defined(CONFIG_SPICE)' }
226 # @query-spice:
228 # Returns information about the current SPICE server
230 # Returns: @SpiceInfo
232 # Since: 0.14.0
234 # Example:
236 # -> { "execute": "query-spice" }
237 # <- { "return": {
238 #          "enabled": true,
239 #          "auth": "spice",
240 #          "port": 5920,
241 #          "tls-port": 5921,
242 #          "host": "0.0.0.0",
243 #          "channels": [
244 #             {
245 #                "port": "54924",
246 #                "family": "ipv4",
247 #                "channel-type": 1,
248 #                "connection-id": 1804289383,
249 #                "host": "127.0.0.1",
250 #                "channel-id": 0,
251 #                "tls": true
252 #             },
253 #             {
254 #                "port": "36710",
255 #                "family": "ipv4",
256 #                "channel-type": 4,
257 #                "connection-id": 1804289383,
258 #                "host": "127.0.0.1",
259 #                "channel-id": 0,
260 #                "tls": false
261 #             },
262 #             [ ... more channels follow ... ]
263 #          ]
264 #       }
265 #    }
268 { 'command': 'query-spice', 'returns': 'SpiceInfo',
269   'if': 'defined(CONFIG_SPICE)' }
272 # @SPICE_CONNECTED:
274 # Emitted when a SPICE client establishes a connection
276 # @server: server information
278 # @client: client information
280 # Since: 0.14.0
282 # Example:
284 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
285 #      "event": "SPICE_CONNECTED",
286 #      "data": {
287 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
288 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
289 #    }}
292 { 'event': 'SPICE_CONNECTED',
293   'data': { 'server': 'SpiceBasicInfo',
294             'client': 'SpiceBasicInfo' },
295   'if': 'defined(CONFIG_SPICE)' }
298 # @SPICE_INITIALIZED:
300 # Emitted after initial handshake and authentication takes place (if any)
301 # and the SPICE channel is up and running
303 # @server: server information
305 # @client: client information
307 # Since: 0.14.0
309 # Example:
311 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
312 #      "event": "SPICE_INITIALIZED",
313 #      "data": {"server": {"auth": "spice", "port": "5921",
314 #                          "family": "ipv4", "host": "127.0.0.1"},
315 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
316 #                          "connection-id": 1804289383, "host": "127.0.0.1",
317 #                          "channel-id": 0, "tls": true}
318 #    }}
321 { 'event': 'SPICE_INITIALIZED',
322   'data': { 'server': 'SpiceServerInfo',
323             'client': 'SpiceChannel' },
324   'if': 'defined(CONFIG_SPICE)' }
327 # @SPICE_DISCONNECTED:
329 # Emitted when the SPICE connection is closed
331 # @server: server information
333 # @client: client information
335 # Since: 0.14.0
337 # Example:
339 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
340 #      "event": "SPICE_DISCONNECTED",
341 #      "data": {
342 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
343 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
344 #    }}
347 { 'event': 'SPICE_DISCONNECTED',
348   'data': { 'server': 'SpiceBasicInfo',
349             'client': 'SpiceBasicInfo' },
350   'if': 'defined(CONFIG_SPICE)' }
353 # @SPICE_MIGRATE_COMPLETED:
355 # Emitted when SPICE migration has completed
357 # Since: 1.3
359 # Example:
361 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
362 #      "event": "SPICE_MIGRATE_COMPLETED" }
365 { 'event': 'SPICE_MIGRATE_COMPLETED',
366   'if': 'defined(CONFIG_SPICE)' }
369 # == VNC
373 # @VncBasicInfo:
375 # The basic information for vnc network connection
377 # @host: IP address
379 # @service: The service name of the vnc port. This may depend on the host
380 #           system's service database so symbolic names should not be relied
381 #           on.
383 # @family: address family
385 # @websocket: true in case the socket is a websocket (since 2.3).
387 # Since: 2.1
389 { 'struct': 'VncBasicInfo',
390   'data': { 'host': 'str',
391             'service': 'str',
392             'family': 'NetworkAddressFamily',
393             'websocket': 'bool' },
394   'if': 'defined(CONFIG_VNC)' }
397 # @VncServerInfo:
399 # The network connection information for server
401 # @auth: authentication method used for
402 #        the plain (non-websocket) VNC server
404 # Since: 2.1
406 { 'struct': 'VncServerInfo',
407   'base': 'VncBasicInfo',
408   'data': { '*auth': 'str' },
409   'if': 'defined(CONFIG_VNC)' }
412 # @VncClientInfo:
414 # Information about a connected VNC client.
416 # @x509_dname: If x509 authentication is in use, the Distinguished
417 #              Name of the client.
419 # @sasl_username: If SASL authentication is in use, the SASL username
420 #                 used for authentication.
422 # Since: 0.14.0
424 { 'struct': 'VncClientInfo',
425   'base': 'VncBasicInfo',
426   'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
427   'if': 'defined(CONFIG_VNC)' }
430 # @VncInfo:
432 # Information about the VNC session.
434 # @enabled: true if the VNC server is enabled, false otherwise
436 # @host: The hostname the VNC server is bound to.  This depends on
437 #        the name resolution on the host and may be an IP address.
439 # @family: - 'ipv6' if the host is listening for IPv6 connections
440 #          - 'ipv4' if the host is listening for IPv4 connections
441 #          - 'unix' if the host is listening on a unix domain socket
442 #          - 'unknown' otherwise
444 # @service: The service name of the server's port.  This may depends
445 #           on the host system's service database so symbolic names should not
446 #           be relied on.
448 # @auth: the current authentication type used by the server
450 #        - 'none' if no authentication is being used
451 #        - 'vnc' if VNC authentication is being used
452 #        - 'vencrypt+plain' if VEncrypt is used with plain text authentication
453 #        - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
454 #        - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
455 #        - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
456 #        - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
457 #        - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
458 #        - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
459 #        - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
460 #        - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
462 # @clients: a list of @VncClientInfo of all currently connected clients
464 # Since: 0.14.0
466 { 'struct': 'VncInfo',
467   'data': {'enabled': 'bool', '*host': 'str',
468            '*family': 'NetworkAddressFamily',
469            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
470   'if': 'defined(CONFIG_VNC)' }
473 # @VncPrimaryAuth:
475 # vnc primary authentication method.
477 # Since: 2.3
479 { 'enum': 'VncPrimaryAuth',
480   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
481             'tls', 'vencrypt', 'sasl' ],
482   'if': 'defined(CONFIG_VNC)' }
485 # @VncVencryptSubAuth:
487 # vnc sub authentication method with vencrypt.
489 # Since: 2.3
491 { 'enum': 'VncVencryptSubAuth',
492   'data': [ 'plain',
493             'tls-none',  'x509-none',
494             'tls-vnc',   'x509-vnc',
495             'tls-plain', 'x509-plain',
496             'tls-sasl',  'x509-sasl' ],
497   'if': 'defined(CONFIG_VNC)' }
500 # @VncServerInfo2:
502 # The network connection information for server
504 # @auth: The current authentication type used by the servers
506 # @vencrypt: The vencrypt sub authentication type used by the
507 #            servers, only specified in case auth == vencrypt.
509 # Since: 2.9
511 { 'struct': 'VncServerInfo2',
512   'base': 'VncBasicInfo',
513   'data': { 'auth'      : 'VncPrimaryAuth',
514             '*vencrypt' : 'VncVencryptSubAuth' },
515   'if': 'defined(CONFIG_VNC)' }
518 # @VncInfo2:
520 # Information about a vnc server
522 # @id: vnc server name.
524 # @server: A list of @VncBasincInfo describing all listening sockets.
525 #          The list can be empty (in case the vnc server is disabled).
526 #          It also may have multiple entries: normal + websocket,
527 #          possibly also ipv4 + ipv6 in the future.
529 # @clients: A list of @VncClientInfo of all currently connected clients.
530 #           The list can be empty, for obvious reasons.
532 # @auth: The current authentication type used by the non-websockets servers
534 # @vencrypt: The vencrypt authentication type used by the servers,
535 #            only specified in case auth == vencrypt.
537 # @display: The display device the vnc server is linked to.
539 # Since: 2.3
541 { 'struct': 'VncInfo2',
542   'data': { 'id'        : 'str',
543             'server'    : ['VncServerInfo2'],
544             'clients'   : ['VncClientInfo'],
545             'auth'      : 'VncPrimaryAuth',
546             '*vencrypt' : 'VncVencryptSubAuth',
547             '*display'  : 'str' },
548   'if': 'defined(CONFIG_VNC)' }
551 # @query-vnc:
553 # Returns information about the current VNC server
555 # Returns: @VncInfo
557 # Since: 0.14.0
559 # Example:
561 # -> { "execute": "query-vnc" }
562 # <- { "return": {
563 #          "enabled":true,
564 #          "host":"0.0.0.0",
565 #          "service":"50402",
566 #          "auth":"vnc",
567 #          "family":"ipv4",
568 #          "clients":[
569 #             {
570 #                "host":"127.0.0.1",
571 #                "service":"50401",
572 #                "family":"ipv4"
573 #             }
574 #          ]
575 #       }
576 #    }
579 { 'command': 'query-vnc', 'returns': 'VncInfo',
580   'if': 'defined(CONFIG_VNC)' }
582 # @query-vnc-servers:
584 # Returns a list of vnc servers.  The list can be empty.
586 # Returns: a list of @VncInfo2
588 # Since: 2.3
590 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
591   'if': 'defined(CONFIG_VNC)' }
594 # @change-vnc-password:
596 # Change the VNC server password.
598 # @password: the new password to use with VNC authentication
600 # Since: 1.1
602 # Notes: An empty password in this command will set the password to the empty
603 #        string.  Existing clients are unaffected by executing this command.
605 { 'command': 'change-vnc-password',
606   'data': { 'password': 'str' },
607   'if': 'defined(CONFIG_VNC)' }
610 # @VNC_CONNECTED:
612 # Emitted when a VNC client establishes a connection
614 # @server: server information
616 # @client: client information
618 # Note: This event is emitted before any authentication takes place, thus
619 #       the authentication ID is not provided
621 # Since: 0.13.0
623 # Example:
625 # <- { "event": "VNC_CONNECTED",
626 #      "data": {
627 #            "server": { "auth": "sasl", "family": "ipv4",
628 #                        "service": "5901", "host": "0.0.0.0" },
629 #            "client": { "family": "ipv4", "service": "58425",
630 #                        "host": "127.0.0.1" } },
631 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
634 { 'event': 'VNC_CONNECTED',
635   'data': { 'server': 'VncServerInfo',
636             'client': 'VncBasicInfo' },
637   'if': 'defined(CONFIG_VNC)' }
640 # @VNC_INITIALIZED:
642 # Emitted after authentication takes place (if any) and the VNC session is
643 # made active
645 # @server: server information
647 # @client: client information
649 # Since: 0.13.0
651 # Example:
653 # <-  { "event": "VNC_INITIALIZED",
654 #       "data": {
655 #            "server": { "auth": "sasl", "family": "ipv4",
656 #                        "service": "5901", "host": "0.0.0.0"},
657 #            "client": { "family": "ipv4", "service": "46089",
658 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
659 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
662 { 'event': 'VNC_INITIALIZED',
663   'data': { 'server': 'VncServerInfo',
664             'client': 'VncClientInfo' },
665   'if': 'defined(CONFIG_VNC)' }
668 # @VNC_DISCONNECTED:
670 # Emitted when the connection is closed
672 # @server: server information
674 # @client: client information
676 # Since: 0.13.0
678 # Example:
680 # <- { "event": "VNC_DISCONNECTED",
681 #      "data": {
682 #            "server": { "auth": "sasl", "family": "ipv4",
683 #                        "service": "5901", "host": "0.0.0.0" },
684 #            "client": { "family": "ipv4", "service": "58425",
685 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
686 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
689 { 'event': 'VNC_DISCONNECTED',
690   'data': { 'server': 'VncServerInfo',
691             'client': 'VncClientInfo' },
692   'if': 'defined(CONFIG_VNC)' }
695 # = Input
699 # @MouseInfo:
701 # Information about a mouse device.
703 # @name: the name of the mouse device
705 # @index: the index of the mouse device
707 # @current: true if this device is currently receiving mouse events
709 # @absolute: true if this device supports absolute coordinates as input
711 # Since: 0.14.0
713 { 'struct': 'MouseInfo',
714   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
715            'absolute': 'bool'} }
718 # @query-mice:
720 # Returns information about each active mouse device
722 # Returns: a list of @MouseInfo for each device
724 # Since: 0.14.0
726 # Example:
728 # -> { "execute": "query-mice" }
729 # <- { "return": [
730 #          {
731 #             "name":"QEMU Microsoft Mouse",
732 #             "index":0,
733 #             "current":false,
734 #             "absolute":false
735 #          },
736 #          {
737 #             "name":"QEMU PS/2 Mouse",
738 #             "index":1,
739 #             "current":true,
740 #             "absolute":true
741 #          }
742 #       ]
743 #    }
746 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
749 # @QKeyCode:
751 # An enumeration of key name.
753 # This is used by the @send-key command.
755 # @unmapped: since 2.0
756 # @pause: since 2.0
757 # @ro: since 2.4
758 # @kp_comma: since 2.4
759 # @kp_equals: since 2.6
760 # @power: since 2.6
761 # @hiragana: since 2.9
762 # @henkan: since 2.9
763 # @yen: since 2.9
765 # @sleep: since 2.10
766 # @wake: since 2.10
767 # @audionext: since 2.10
768 # @audioprev: since 2.10
769 # @audiostop: since 2.10
770 # @audioplay: since 2.10
771 # @audiomute: since 2.10
772 # @volumeup: since 2.10
773 # @volumedown: since 2.10
774 # @mediaselect: since 2.10
775 # @mail: since 2.10
776 # @calculator: since 2.10
777 # @computer: since 2.10
778 # @ac_home: since 2.10
779 # @ac_back: since 2.10
780 # @ac_forward: since 2.10
781 # @ac_refresh: since 2.10
782 # @ac_bookmarks: since 2.10
784 # @muhenkan: since 2.12
785 # @katakanahiragana: since 2.12
787 # 'sysrq' was mistakenly added to hack around the fact that
788 # the ps2 driver was not generating correct scancodes sequences
789 # when 'alt+print' was pressed. This flaw is now fixed and the
790 # 'sysrq' key serves no further purpose. Any further use of
791 # 'sysrq' will be transparently changed to 'print', so they
792 # are effectively synonyms.
794 # Since: 1.3.0
797 { 'enum': 'QKeyCode',
798   'data': [ 'unmapped',
799             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
800             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
801             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
802             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
803             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
804             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
805             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
806             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
807             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
808             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
809             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
810             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
811             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
812             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
813             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
814             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
815             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
816             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
817             'volumeup', 'volumedown', 'mediaselect',
818             'mail', 'calculator', 'computer',
819             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
822 # @KeyValue:
824 # Represents a keyboard key.
826 # Since: 1.3.0
828 { 'union': 'KeyValue',
829   'data': {
830     'number': 'int',
831     'qcode': 'QKeyCode' } }
834 # @send-key:
836 # Send keys to guest.
838 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
839 #        simultaneously sent to the guest. A @KeyValue.number value is sent
840 #        directly to the guest, while @KeyValue.qcode must be a valid
841 #        @QKeyCode value
843 # @hold-time: time to delay key up events, milliseconds. Defaults
844 #             to 100
846 # Returns: - Nothing on success
847 #          - If key is unknown or redundant, InvalidParameter
849 # Since: 1.3.0
851 # Example:
853 # -> { "execute": "send-key",
854 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
855 #                               { "type": "qcode", "data": "alt" },
856 #                               { "type": "qcode", "data": "delete" } ] } }
857 # <- { "return": {} }
860 { 'command': 'send-key',
861   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
864 # @InputButton:
866 # Button of a pointer input device (mouse, tablet).
868 # @side: front side button of a 5-button mouse (since 2.9)
870 # @extra: rear side button of a 5-button mouse (since 2.9)
872 # Since: 2.0
874 { 'enum'  : 'InputButton',
875   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
876   'extra' ] }
879 # @InputAxis:
881 # Position axis of a pointer input device (mouse, tablet).
883 # Since: 2.0
885 { 'enum'  : 'InputAxis',
886   'data'  : [ 'x', 'y' ] }
889 # @InputKeyEvent:
891 # Keyboard input event.
893 # @key:    Which key this event is for.
894 # @down:   True for key-down and false for key-up events.
896 # Since: 2.0
898 { 'struct'  : 'InputKeyEvent',
899   'data'  : { 'key'     : 'KeyValue',
900               'down'    : 'bool' } }
903 # @InputBtnEvent:
905 # Pointer button input event.
907 # @button: Which button this event is for.
908 # @down:   True for key-down and false for key-up events.
910 # Since: 2.0
912 { 'struct'  : 'InputBtnEvent',
913   'data'  : { 'button'  : 'InputButton',
914               'down'    : 'bool' } }
917 # @InputMoveEvent:
919 # Pointer motion input event.
921 # @axis: Which axis is referenced by @value.
922 # @value: Pointer position.  For absolute coordinates the
923 #         valid range is 0 -> 0x7ffff
925 # Since: 2.0
927 { 'struct'  : 'InputMoveEvent',
928   'data'  : { 'axis'    : 'InputAxis',
929               'value'   : 'int' } }
932 # @InputEvent:
934 # Input event union.
936 # @type: the input type, one of:
938 #        - 'key': Input event of Keyboard
939 #        - 'btn': Input event of pointer buttons
940 #        - 'rel': Input event of relative pointer motion
941 #        - 'abs': Input event of absolute pointer motion
943 # Since: 2.0
945 { 'union' : 'InputEvent',
946   'data'  : { 'key'     : 'InputKeyEvent',
947               'btn'     : 'InputBtnEvent',
948               'rel'     : 'InputMoveEvent',
949               'abs'     : 'InputMoveEvent' } }
952 # @input-send-event:
954 # Send input event(s) to guest.
956 # The @device and @head parameters can be used to send the input event
957 # to specific input devices in case (a) multiple input devices of the
958 # same kind are added to the virtual machine and (b) you have
959 # configured input routing (see docs/multiseat.txt) for those input
960 # devices.  The parameters work exactly like the device and head
961 # properties of input devices.  If @device is missing, only devices
962 # that have no input routing config are admissible.  If @device is
963 # specified, both input devices with and without input routing config
964 # are admissible, but devices with input routing config take
965 # precedence.
967 # @device: display device to send event(s) to.
968 # @head: head to send event(s) to, in case the
969 #        display device supports multiple scanouts.
970 # @events: List of InputEvent union.
972 # Returns: Nothing on success.
974 # Since: 2.6
976 # Note: The consoles are visible in the qom tree, under
977 #       /backend/console[$index]. They have a device link and head property,
978 #       so it is possible to map which console belongs to which device and
979 #       display.
981 # Example:
983 # 1. Press left mouse button.
985 # -> { "execute": "input-send-event",
986 #     "arguments": { "device": "video0",
987 #                    "events": [ { "type": "btn",
988 #                    "data" : { "down": true, "button": "left" } } ] } }
989 # <- { "return": {} }
991 # -> { "execute": "input-send-event",
992 #     "arguments": { "device": "video0",
993 #                    "events": [ { "type": "btn",
994 #                    "data" : { "down": false, "button": "left" } } ] } }
995 # <- { "return": {} }
997 # 2. Press ctrl-alt-del.
999 # -> { "execute": "input-send-event",
1000 #      "arguments": { "events": [
1001 #         { "type": "key", "data" : { "down": true,
1002 #           "key": {"type": "qcode", "data": "ctrl" } } },
1003 #         { "type": "key", "data" : { "down": true,
1004 #           "key": {"type": "qcode", "data": "alt" } } },
1005 #         { "type": "key", "data" : { "down": true,
1006 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
1007 # <- { "return": {} }
1009 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1011 # -> { "execute": "input-send-event" ,
1012 #   "arguments": { "events": [
1013 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1014 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1015 # <- { "return": {} }
1018 { 'command': 'input-send-event',
1019   'data': { '*device': 'str',
1020             '*head'  : 'int',
1021             'events' : [ 'InputEvent' ] } }
1024 # @GrabToggleKeys:
1026 # Keys to toggle input-linux between host and guest.
1028 # Since: 4.0
1031 { 'enum': 'GrabToggleKeys',
1032   'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock',
1033             'ctrl-scrolllock' ] }
1036 # @DisplayGTK:
1038 # GTK display options.
1040 # @grab-on-hover: Grab keyboard input on mouse hover.
1041 # @zoom-to-fit: Zoom guest display to fit into the host window.  When
1042 #               turned off the host window will be resized instead.
1043 #               In case the display device can notify the guest on
1044 #               window resizes (virtio-gpu) this will default to "on",
1045 #               assuming the guest will resize the display to match
1046 #               the window size then.  Otherwise it defaults to "off".
1047 #               Since 3.1
1049 # Since: 2.12
1052 { 'struct'  : 'DisplayGTK',
1053   'data'    : { '*grab-on-hover' : 'bool',
1054                 '*zoom-to-fit'   : 'bool'  } }
1057 # @DisplayEGLHeadless:
1059 # EGL headless display options.
1061 # @rendernode: Which DRM render node should be used. Default is the first
1062 #              available node on the host.
1064 # Since: 3.1
1067 { 'struct'  : 'DisplayEGLHeadless',
1068   'data'    : { '*rendernode' : 'str' } }
1070  ##
1071  # @DisplayGLMode:
1073  # Display OpenGL mode.
1075  # @off: Disable OpenGL (default).
1076  # @on: Use OpenGL, pick context type automatically.
1077  #      Would better be named 'auto' but is called 'on' for backward
1078  #      compatibility with bool type.
1079  # @core: Use OpenGL with Core (desktop) Context.
1080  # @es: Use OpenGL with ES (embedded systems) Context.
1082  # Since: 3.0
1084  ##
1085 { 'enum'    : 'DisplayGLMode',
1086   'data'    : [ 'off', 'on', 'core', 'es' ] }
1089 # @DisplayCurses:
1091 # Curses display options.
1093 # @charset:       Font charset used by guest (default: CP437).
1095 # Since: 4.0
1098 { 'struct'  : 'DisplayCurses',
1099   'data'    : { '*charset'       : 'str' } }
1102 # @DisplayType:
1104 # Display (user interface) type.
1106 # @default: The default user interface, selecting from the first available
1107 #           of gtk, sdl, cocoa, and vnc.
1109 # @none: No user interface or video output display. The guest will
1110 #        still see an emulated graphics card, but its output will not
1111 #        be displayed to the QEMU user.
1113 # @gtk: The GTK user interface.
1115 # @sdl: The SDL user interface.
1117 # @egl-headless: No user interface, offload GL operations to a local
1118 #                DRI device. Graphical display need to be paired with
1119 #                VNC or Spice. (Since 3.1)
1121 # @curses: Display video output via curses.  For graphics device
1122 #          models which support a text mode, QEMU can display this
1123 #          output using a curses/ncurses interface. Nothing is
1124 #          displayed when the graphics device is in graphical mode or
1125 #          if the graphics device does not support a text
1126 #          mode. Generally only the VGA device models support text
1127 #          mode.
1129 # @cocoa: The Cocoa user interface.
1131 # @spice-app: Set up a Spice server and run the default associated
1132 #             application to connect to it. The server will redirect
1133 #             the serial console and QEMU monitors. (Since 4.0)
1135 # Since: 2.12
1138 { 'enum'    : 'DisplayType',
1139   'data'    : [ 'default', 'none', 'gtk', 'sdl',
1140                 'egl-headless', 'curses', 'cocoa',
1141                 'spice-app'] }
1144 # @DisplayOptions:
1146 # Display (user interface) options.
1148 # @type:          Which DisplayType qemu should use.
1149 # @full-screen:   Start user interface in fullscreen mode (default: off).
1150 # @window-close:  Allow to quit qemu with window close button (default: on).
1151 # @show-cursor:   Force showing the mouse cursor (default: off).
1152 #                 (since: 5.0)
1153 # @gl:            Enable OpenGL support (default: off).
1155 # Since: 2.12
1158 { 'union'   : 'DisplayOptions',
1159   'base'    : { 'type'           : 'DisplayType',
1160                 '*full-screen'   : 'bool',
1161                 '*window-close'  : 'bool',
1162                 '*show-cursor'   : 'bool',
1163                 '*gl'            : 'DisplayGLMode' },
1164   'discriminator' : 'type',
1165   'data'    : { 'gtk'            : 'DisplayGTK',
1166                 'curses'         : 'DisplayCurses',
1167                 'egl-headless'   : 'DisplayEGLHeadless'} }
1170 # @query-display-options:
1172 # Returns information about display configuration
1174 # Returns: @DisplayOptions
1176 # Since: 3.1
1179 { 'command': 'query-display-options',
1180   'returns': 'DisplayOptions' }