hw/arm: xlnx-zynqmp: Connect a Xilinx CSU DMA module for QSPI
[qemu/ar7.git] / qapi / ui.json
blobd08d72b439235313cfc57acac0a3b624f9a2da1a
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
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
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
93 # Example:
95 # -> { "execute": "screendump",
96 #      "arguments": { "filename": "/tmp/image" } }
97 # <- { "return": {} }
100 { 'command': 'screendump',
101   'data': {'filename': 'str', '*device': 'str', '*head': 'int'},
102   'coroutine': true }
105 # == Spice
109 # @SpiceBasicInfo:
111 # The basic information for SPICE network connection
113 # @host: IP address
115 # @port: port number
117 # @family: address family
119 # Since: 2.1
121 { 'struct': 'SpiceBasicInfo',
122   'data': { 'host': 'str',
123             'port': 'str',
124             'family': 'NetworkAddressFamily' },
125   'if': 'defined(CONFIG_SPICE)' }
128 # @SpiceServerInfo:
130 # Information about a SPICE server
132 # @auth: authentication method
134 # Since: 2.1
136 { 'struct': 'SpiceServerInfo',
137   'base': 'SpiceBasicInfo',
138   'data': { '*auth': 'str' },
139   'if': 'defined(CONFIG_SPICE)' }
142 # @SpiceChannel:
144 # Information about a SPICE client channel.
146 # @connection-id: SPICE connection id number.  All channels with the same id
147 #                 belong to the same SPICE session.
149 # @channel-type: SPICE channel type number.  "1" is the main control
150 #                channel, filter for this one if you want to track spice
151 #                sessions only
153 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
154 #              multiple channels of the same type exist, such as multiple
155 #              display channels in a multihead setup
157 # @tls: true if the channel is encrypted, false otherwise.
159 # Since: 0.14
161 { 'struct': 'SpiceChannel',
162   'base': 'SpiceBasicInfo',
163   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
164            'tls': 'bool'},
165   'if': 'defined(CONFIG_SPICE)' }
168 # @SpiceQueryMouseMode:
170 # An enumeration of Spice mouse states.
172 # @client: Mouse cursor position is determined by the client.
174 # @server: Mouse cursor position is determined by the server.
176 # @unknown: No information is available about mouse mode used by
177 #           the spice server.
179 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
181 # Since: 1.1
183 { 'enum': 'SpiceQueryMouseMode',
184   'data': [ 'client', 'server', 'unknown' ],
185   'if': 'defined(CONFIG_SPICE)' }
188 # @SpiceInfo:
190 # Information about the SPICE session.
192 # @enabled: true if the SPICE server is enabled, false otherwise
194 # @migrated: true if the last guest migration completed and spice
195 #            migration had completed as well. false otherwise. (since 1.4)
197 # @host: The hostname the SPICE server is bound to.  This depends on
198 #        the name resolution on the host and may be an IP address.
200 # @port: The SPICE server's port number.
202 # @compiled-version: SPICE server version.
204 # @tls-port: The SPICE server's TLS port number.
206 # @auth: the current authentication type used by the server
208 #        - 'none'  if no authentication is being used
209 #        - 'spice' uses SASL or direct TLS authentication, depending on command
210 #          line options
212 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
213 #              be determined by the client or the server, or unknown if spice
214 #              server doesn't provide this information. (since: 1.1)
216 # @channels: a list of @SpiceChannel for each active spice channel
218 # Since: 0.14
220 { 'struct': 'SpiceInfo',
221   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
222            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
223            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
224   'if': 'defined(CONFIG_SPICE)' }
227 # @query-spice:
229 # Returns information about the current SPICE server
231 # Returns: @SpiceInfo
233 # Since: 0.14
235 # Example:
237 # -> { "execute": "query-spice" }
238 # <- { "return": {
239 #          "enabled": true,
240 #          "auth": "spice",
241 #          "port": 5920,
242 #          "tls-port": 5921,
243 #          "host": "0.0.0.0",
244 #          "channels": [
245 #             {
246 #                "port": "54924",
247 #                "family": "ipv4",
248 #                "channel-type": 1,
249 #                "connection-id": 1804289383,
250 #                "host": "127.0.0.1",
251 #                "channel-id": 0,
252 #                "tls": true
253 #             },
254 #             {
255 #                "port": "36710",
256 #                "family": "ipv4",
257 #                "channel-type": 4,
258 #                "connection-id": 1804289383,
259 #                "host": "127.0.0.1",
260 #                "channel-id": 0,
261 #                "tls": false
262 #             },
263 #             [ ... more channels follow ... ]
264 #          ]
265 #       }
266 #    }
269 { 'command': 'query-spice', 'returns': 'SpiceInfo',
270   'if': 'defined(CONFIG_SPICE)' }
273 # @SPICE_CONNECTED:
275 # Emitted when a SPICE client establishes a connection
277 # @server: server information
279 # @client: client information
281 # Since: 0.14
283 # Example:
285 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
286 #      "event": "SPICE_CONNECTED",
287 #      "data": {
288 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
289 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
290 #    }}
293 { 'event': 'SPICE_CONNECTED',
294   'data': { 'server': 'SpiceBasicInfo',
295             'client': 'SpiceBasicInfo' },
296   'if': 'defined(CONFIG_SPICE)' }
299 # @SPICE_INITIALIZED:
301 # Emitted after initial handshake and authentication takes place (if any)
302 # and the SPICE channel is up and running
304 # @server: server information
306 # @client: client information
308 # Since: 0.14
310 # Example:
312 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
313 #      "event": "SPICE_INITIALIZED",
314 #      "data": {"server": {"auth": "spice", "port": "5921",
315 #                          "family": "ipv4", "host": "127.0.0.1"},
316 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
317 #                          "connection-id": 1804289383, "host": "127.0.0.1",
318 #                          "channel-id": 0, "tls": true}
319 #    }}
322 { 'event': 'SPICE_INITIALIZED',
323   'data': { 'server': 'SpiceServerInfo',
324             'client': 'SpiceChannel' },
325   'if': 'defined(CONFIG_SPICE)' }
328 # @SPICE_DISCONNECTED:
330 # Emitted when the SPICE connection is closed
332 # @server: server information
334 # @client: client information
336 # Since: 0.14
338 # Example:
340 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
341 #      "event": "SPICE_DISCONNECTED",
342 #      "data": {
343 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
344 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
345 #    }}
348 { 'event': 'SPICE_DISCONNECTED',
349   'data': { 'server': 'SpiceBasicInfo',
350             'client': 'SpiceBasicInfo' },
351   'if': 'defined(CONFIG_SPICE)' }
354 # @SPICE_MIGRATE_COMPLETED:
356 # Emitted when SPICE migration has completed
358 # Since: 1.3
360 # Example:
362 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
363 #      "event": "SPICE_MIGRATE_COMPLETED" }
366 { 'event': 'SPICE_MIGRATE_COMPLETED',
367   'if': 'defined(CONFIG_SPICE)' }
370 # == VNC
374 # @VncBasicInfo:
376 # The basic information for vnc network connection
378 # @host: IP address
380 # @service: The service name of the vnc port. This may depend on the host
381 #           system's service database so symbolic names should not be relied
382 #           on.
384 # @family: address family
386 # @websocket: true in case the socket is a websocket (since 2.3).
388 # Since: 2.1
390 { 'struct': 'VncBasicInfo',
391   'data': { 'host': 'str',
392             'service': 'str',
393             'family': 'NetworkAddressFamily',
394             'websocket': 'bool' },
395   'if': 'defined(CONFIG_VNC)' }
398 # @VncServerInfo:
400 # The network connection information for server
402 # @auth: authentication method used for
403 #        the plain (non-websocket) VNC server
405 # Since: 2.1
407 { 'struct': 'VncServerInfo',
408   'base': 'VncBasicInfo',
409   'data': { '*auth': 'str' },
410   'if': 'defined(CONFIG_VNC)' }
413 # @VncClientInfo:
415 # Information about a connected VNC client.
417 # @x509_dname: If x509 authentication is in use, the Distinguished
418 #              Name of the client.
420 # @sasl_username: If SASL authentication is in use, the SASL username
421 #                 used for authentication.
423 # Since: 0.14
425 { 'struct': 'VncClientInfo',
426   'base': 'VncBasicInfo',
427   'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
428   'if': 'defined(CONFIG_VNC)' }
431 # @VncInfo:
433 # Information about the VNC session.
435 # @enabled: true if the VNC server is enabled, false otherwise
437 # @host: The hostname the VNC server is bound to.  This depends on
438 #        the name resolution on the host and may be an IP address.
440 # @family: - 'ipv6' if the host is listening for IPv6 connections
441 #          - 'ipv4' if the host is listening for IPv4 connections
442 #          - 'unix' if the host is listening on a unix domain socket
443 #          - 'unknown' otherwise
445 # @service: The service name of the server's port.  This may depends
446 #           on the host system's service database so symbolic names should not
447 #           be relied on.
449 # @auth: the current authentication type used by the server
451 #        - 'none' if no authentication is being used
452 #        - 'vnc' if VNC authentication is being used
453 #        - 'vencrypt+plain' if VEncrypt is used with plain text authentication
454 #        - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
455 #        - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
456 #        - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
457 #        - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
458 #        - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
459 #        - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
460 #        - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
461 #        - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
463 # @clients: a list of @VncClientInfo of all currently connected clients
465 # Since: 0.14
467 { 'struct': 'VncInfo',
468   'data': {'enabled': 'bool', '*host': 'str',
469            '*family': 'NetworkAddressFamily',
470            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
471   'if': 'defined(CONFIG_VNC)' }
474 # @VncPrimaryAuth:
476 # vnc primary authentication method.
478 # Since: 2.3
480 { 'enum': 'VncPrimaryAuth',
481   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
482             'tls', 'vencrypt', 'sasl' ],
483   'if': 'defined(CONFIG_VNC)' }
486 # @VncVencryptSubAuth:
488 # vnc sub authentication method with vencrypt.
490 # Since: 2.3
492 { 'enum': 'VncVencryptSubAuth',
493   'data': [ 'plain',
494             'tls-none',  'x509-none',
495             'tls-vnc',   'x509-vnc',
496             'tls-plain', 'x509-plain',
497             'tls-sasl',  'x509-sasl' ],
498   'if': 'defined(CONFIG_VNC)' }
501 # @VncServerInfo2:
503 # The network connection information for server
505 # @auth: The current authentication type used by the servers
507 # @vencrypt: The vencrypt sub authentication type used by the
508 #            servers, only specified in case auth == vencrypt.
510 # Since: 2.9
512 { 'struct': 'VncServerInfo2',
513   'base': 'VncBasicInfo',
514   'data': { 'auth'      : 'VncPrimaryAuth',
515             '*vencrypt' : 'VncVencryptSubAuth' },
516   'if': 'defined(CONFIG_VNC)' }
519 # @VncInfo2:
521 # Information about a vnc server
523 # @id: vnc server name.
525 # @server: A list of @VncBasincInfo describing all listening sockets.
526 #          The list can be empty (in case the vnc server is disabled).
527 #          It also may have multiple entries: normal + websocket,
528 #          possibly also ipv4 + ipv6 in the future.
530 # @clients: A list of @VncClientInfo of all currently connected clients.
531 #           The list can be empty, for obvious reasons.
533 # @auth: The current authentication type used by the non-websockets servers
535 # @vencrypt: The vencrypt authentication type used by the servers,
536 #            only specified in case auth == vencrypt.
538 # @display: The display device the vnc server is linked to.
540 # Since: 2.3
542 { 'struct': 'VncInfo2',
543   'data': { 'id'        : 'str',
544             'server'    : ['VncServerInfo2'],
545             'clients'   : ['VncClientInfo'],
546             'auth'      : 'VncPrimaryAuth',
547             '*vencrypt' : 'VncVencryptSubAuth',
548             '*display'  : 'str' },
549   'if': 'defined(CONFIG_VNC)' }
552 # @query-vnc:
554 # Returns information about the current VNC server
556 # Returns: @VncInfo
558 # Since: 0.14
560 # Example:
562 # -> { "execute": "query-vnc" }
563 # <- { "return": {
564 #          "enabled":true,
565 #          "host":"0.0.0.0",
566 #          "service":"50402",
567 #          "auth":"vnc",
568 #          "family":"ipv4",
569 #          "clients":[
570 #             {
571 #                "host":"127.0.0.1",
572 #                "service":"50401",
573 #                "family":"ipv4"
574 #             }
575 #          ]
576 #       }
577 #    }
580 { 'command': 'query-vnc', 'returns': 'VncInfo',
581   'if': 'defined(CONFIG_VNC)' }
583 # @query-vnc-servers:
585 # Returns a list of vnc servers.  The list can be empty.
587 # Returns: a list of @VncInfo2
589 # Since: 2.3
591 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
592   'if': 'defined(CONFIG_VNC)' }
595 # @change-vnc-password:
597 # Change the VNC server password.
599 # @password: the new password to use with VNC authentication
601 # Since: 1.1
603 # Notes: An empty password in this command will set the password to the empty
604 #        string.  Existing clients are unaffected by executing this command.
606 { 'command': 'change-vnc-password',
607   'data': { 'password': 'str' },
608   'if': 'defined(CONFIG_VNC)' }
611 # @VNC_CONNECTED:
613 # Emitted when a VNC client establishes a connection
615 # @server: server information
617 # @client: client information
619 # Note: This event is emitted before any authentication takes place, thus
620 #       the authentication ID is not provided
622 # Since: 0.13
624 # Example:
626 # <- { "event": "VNC_CONNECTED",
627 #      "data": {
628 #            "server": { "auth": "sasl", "family": "ipv4",
629 #                        "service": "5901", "host": "0.0.0.0" },
630 #            "client": { "family": "ipv4", "service": "58425",
631 #                        "host": "127.0.0.1" } },
632 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
635 { 'event': 'VNC_CONNECTED',
636   'data': { 'server': 'VncServerInfo',
637             'client': 'VncBasicInfo' },
638   'if': 'defined(CONFIG_VNC)' }
641 # @VNC_INITIALIZED:
643 # Emitted after authentication takes place (if any) and the VNC session is
644 # made active
646 # @server: server information
648 # @client: client information
650 # Since: 0.13
652 # Example:
654 # <-  { "event": "VNC_INITIALIZED",
655 #       "data": {
656 #            "server": { "auth": "sasl", "family": "ipv4",
657 #                        "service": "5901", "host": "0.0.0.0"},
658 #            "client": { "family": "ipv4", "service": "46089",
659 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
660 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
663 { 'event': 'VNC_INITIALIZED',
664   'data': { 'server': 'VncServerInfo',
665             'client': 'VncClientInfo' },
666   'if': 'defined(CONFIG_VNC)' }
669 # @VNC_DISCONNECTED:
671 # Emitted when the connection is closed
673 # @server: server information
675 # @client: client information
677 # Since: 0.13
679 # Example:
681 # <- { "event": "VNC_DISCONNECTED",
682 #      "data": {
683 #            "server": { "auth": "sasl", "family": "ipv4",
684 #                        "service": "5901", "host": "0.0.0.0" },
685 #            "client": { "family": "ipv4", "service": "58425",
686 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
687 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
690 { 'event': 'VNC_DISCONNECTED',
691   'data': { 'server': 'VncServerInfo',
692             'client': 'VncClientInfo' },
693   'if': 'defined(CONFIG_VNC)' }
696 # = Input
700 # @MouseInfo:
702 # Information about a mouse device.
704 # @name: the name of the mouse device
706 # @index: the index of the mouse device
708 # @current: true if this device is currently receiving mouse events
710 # @absolute: true if this device supports absolute coordinates as input
712 # Since: 0.14
714 { 'struct': 'MouseInfo',
715   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
716            'absolute': 'bool'} }
719 # @query-mice:
721 # Returns information about each active mouse device
723 # Returns: a list of @MouseInfo for each device
725 # Since: 0.14
727 # Example:
729 # -> { "execute": "query-mice" }
730 # <- { "return": [
731 #          {
732 #             "name":"QEMU Microsoft Mouse",
733 #             "index":0,
734 #             "current":false,
735 #             "absolute":false
736 #          },
737 #          {
738 #             "name":"QEMU PS/2 Mouse",
739 #             "index":1,
740 #             "current":true,
741 #             "absolute":true
742 #          }
743 #       ]
744 #    }
747 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
750 # @QKeyCode:
752 # An enumeration of key name.
754 # This is used by the @send-key command.
756 # @unmapped: since 2.0
757 # @pause: since 2.0
758 # @ro: since 2.4
759 # @kp_comma: since 2.4
760 # @kp_equals: since 2.6
761 # @power: since 2.6
762 # @hiragana: since 2.9
763 # @henkan: since 2.9
764 # @yen: since 2.9
766 # @sleep: since 2.10
767 # @wake: since 2.10
768 # @audionext: since 2.10
769 # @audioprev: since 2.10
770 # @audiostop: since 2.10
771 # @audioplay: since 2.10
772 # @audiomute: since 2.10
773 # @volumeup: since 2.10
774 # @volumedown: since 2.10
775 # @mediaselect: since 2.10
776 # @mail: since 2.10
777 # @calculator: since 2.10
778 # @computer: since 2.10
779 # @ac_home: since 2.10
780 # @ac_back: since 2.10
781 # @ac_forward: since 2.10
782 # @ac_refresh: since 2.10
783 # @ac_bookmarks: since 2.10
785 # @muhenkan: since 2.12
786 # @katakanahiragana: since 2.12
788 # 'sysrq' was mistakenly added to hack around the fact that
789 # the ps2 driver was not generating correct scancodes sequences
790 # when 'alt+print' was pressed. This flaw is now fixed and the
791 # 'sysrq' key serves no further purpose. Any further use of
792 # 'sysrq' will be transparently changed to 'print', so they
793 # are effectively synonyms.
795 # Since: 1.3
798 { 'enum': 'QKeyCode',
799   'data': [ 'unmapped',
800             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
801             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
802             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
803             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
804             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
805             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
806             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
807             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
808             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
809             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
810             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
811             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
812             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
813             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
814             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
815             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
816             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
817             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
818             'volumeup', 'volumedown', 'mediaselect',
819             'mail', 'calculator', 'computer',
820             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
823 # @KeyValue:
825 # Represents a keyboard key.
827 # Since: 1.3
829 { 'union': 'KeyValue',
830   'data': {
831     'number': 'int',
832     'qcode': 'QKeyCode' } }
835 # @send-key:
837 # Send keys to guest.
839 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
840 #        simultaneously sent to the guest. A @KeyValue.number value is sent
841 #        directly to the guest, while @KeyValue.qcode must be a valid
842 #        @QKeyCode value
844 # @hold-time: time to delay key up events, milliseconds. Defaults
845 #             to 100
847 # Returns: - Nothing on success
848 #          - If key is unknown or redundant, InvalidParameter
850 # Since: 1.3
852 # Example:
854 # -> { "execute": "send-key",
855 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
856 #                               { "type": "qcode", "data": "alt" },
857 #                               { "type": "qcode", "data": "delete" } ] } }
858 # <- { "return": {} }
861 { 'command': 'send-key',
862   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
865 # @InputButton:
867 # Button of a pointer input device (mouse, tablet).
869 # @side: front side button of a 5-button mouse (since 2.9)
871 # @extra: rear side button of a 5-button mouse (since 2.9)
873 # Since: 2.0
875 { 'enum'  : 'InputButton',
876   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
877   'extra' ] }
880 # @InputAxis:
882 # Position axis of a pointer input device (mouse, tablet).
884 # Since: 2.0
886 { 'enum'  : 'InputAxis',
887   'data'  : [ 'x', 'y' ] }
890 # @InputKeyEvent:
892 # Keyboard input event.
894 # @key:    Which key this event is for.
895 # @down:   True for key-down and false for key-up events.
897 # Since: 2.0
899 { 'struct'  : 'InputKeyEvent',
900   'data'  : { 'key'     : 'KeyValue',
901               'down'    : 'bool' } }
904 # @InputBtnEvent:
906 # Pointer button input event.
908 # @button: Which button this event is for.
909 # @down:   True for key-down and false for key-up events.
911 # Since: 2.0
913 { 'struct'  : 'InputBtnEvent',
914   'data'  : { 'button'  : 'InputButton',
915               'down'    : 'bool' } }
918 # @InputMoveEvent:
920 # Pointer motion input event.
922 # @axis: Which axis is referenced by @value.
923 # @value: Pointer position.  For absolute coordinates the
924 #         valid range is 0 -> 0x7ffff
926 # Since: 2.0
928 { 'struct'  : 'InputMoveEvent',
929   'data'  : { 'axis'    : 'InputAxis',
930               'value'   : 'int' } }
933 # @InputEvent:
935 # Input event union.
937 # @type: the input type, one of:
939 #        - 'key': Input event of Keyboard
940 #        - 'btn': Input event of pointer buttons
941 #        - 'rel': Input event of relative pointer motion
942 #        - 'abs': Input event of absolute pointer motion
944 # Since: 2.0
946 { 'union' : 'InputEvent',
947   'data'  : { 'key'     : 'InputKeyEvent',
948               'btn'     : 'InputBtnEvent',
949               'rel'     : 'InputMoveEvent',
950               'abs'     : 'InputMoveEvent' } }
953 # @input-send-event:
955 # Send input event(s) to guest.
957 # The @device and @head parameters can be used to send the input event
958 # to specific input devices in case (a) multiple input devices of the
959 # same kind are added to the virtual machine and (b) you have
960 # configured input routing (see docs/multiseat.txt) for those input
961 # devices.  The parameters work exactly like the device and head
962 # properties of input devices.  If @device is missing, only devices
963 # that have no input routing config are admissible.  If @device is
964 # specified, both input devices with and without input routing config
965 # are admissible, but devices with input routing config take
966 # precedence.
968 # @device: display device to send event(s) to.
969 # @head: head to send event(s) to, in case the
970 #        display device supports multiple scanouts.
971 # @events: List of InputEvent union.
973 # Returns: Nothing on success.
975 # Since: 2.6
977 # Note: The consoles are visible in the qom tree, under
978 #       /backend/console[$index]. They have a device link and head property,
979 #       so it is possible to map which console belongs to which device and
980 #       display.
982 # Example:
984 # 1. Press left mouse button.
986 # -> { "execute": "input-send-event",
987 #     "arguments": { "device": "video0",
988 #                    "events": [ { "type": "btn",
989 #                    "data" : { "down": true, "button": "left" } } ] } }
990 # <- { "return": {} }
992 # -> { "execute": "input-send-event",
993 #     "arguments": { "device": "video0",
994 #                    "events": [ { "type": "btn",
995 #                    "data" : { "down": false, "button": "left" } } ] } }
996 # <- { "return": {} }
998 # 2. Press ctrl-alt-del.
1000 # -> { "execute": "input-send-event",
1001 #      "arguments": { "events": [
1002 #         { "type": "key", "data" : { "down": true,
1003 #           "key": {"type": "qcode", "data": "ctrl" } } },
1004 #         { "type": "key", "data" : { "down": true,
1005 #           "key": {"type": "qcode", "data": "alt" } } },
1006 #         { "type": "key", "data" : { "down": true,
1007 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
1008 # <- { "return": {} }
1010 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1012 # -> { "execute": "input-send-event" ,
1013 #   "arguments": { "events": [
1014 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1015 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1016 # <- { "return": {} }
1019 { 'command': 'input-send-event',
1020   'data': { '*device': 'str',
1021             '*head'  : 'int',
1022             'events' : [ 'InputEvent' ] } }
1025 # @GrabToggleKeys:
1027 # Keys to toggle input-linux between host and guest.
1029 # Since: 4.0
1032 { 'enum': 'GrabToggleKeys',
1033   'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock',
1034             'ctrl-scrolllock' ] }
1037 # @DisplayGTK:
1039 # GTK display options.
1041 # @grab-on-hover: Grab keyboard input on mouse hover.
1042 # @zoom-to-fit: Zoom guest display to fit into the host window.  When
1043 #               turned off the host window will be resized instead.
1044 #               In case the display device can notify the guest on
1045 #               window resizes (virtio-gpu) this will default to "on",
1046 #               assuming the guest will resize the display to match
1047 #               the window size then.  Otherwise it defaults to "off".
1048 #               Since 3.1
1050 # Since: 2.12
1053 { 'struct'  : 'DisplayGTK',
1054   'data'    : { '*grab-on-hover' : 'bool',
1055                 '*zoom-to-fit'   : 'bool'  } }
1058 # @DisplayEGLHeadless:
1060 # EGL headless display options.
1062 # @rendernode: Which DRM render node should be used. Default is the first
1063 #              available node on the host.
1065 # Since: 3.1
1068 { 'struct'  : 'DisplayEGLHeadless',
1069   'data'    : { '*rendernode' : 'str' } }
1071  ##
1072  # @DisplayGLMode:
1074  # Display OpenGL mode.
1076  # @off: Disable OpenGL (default).
1077  # @on: Use OpenGL, pick context type automatically.
1078  #      Would better be named 'auto' but is called 'on' for backward
1079  #      compatibility with bool type.
1080  # @core: Use OpenGL with Core (desktop) Context.
1081  # @es: Use OpenGL with ES (embedded systems) Context.
1083  # Since: 3.0
1085  ##
1086 { 'enum'    : 'DisplayGLMode',
1087   'data'    : [ 'off', 'on', 'core', 'es' ] }
1090 # @DisplayCurses:
1092 # Curses display options.
1094 # @charset:       Font charset used by guest (default: CP437).
1096 # Since: 4.0
1099 { 'struct'  : 'DisplayCurses',
1100   'data'    : { '*charset'       : 'str' } }
1103 # @DisplayType:
1105 # Display (user interface) type.
1107 # @default: The default user interface, selecting from the first available
1108 #           of gtk, sdl, cocoa, and vnc.
1110 # @none: No user interface or video output display. The guest will
1111 #        still see an emulated graphics card, but its output will not
1112 #        be displayed to the QEMU user.
1114 # @gtk: The GTK user interface.
1116 # @sdl: The SDL user interface.
1118 # @egl-headless: No user interface, offload GL operations to a local
1119 #                DRI device. Graphical display need to be paired with
1120 #                VNC or Spice. (Since 3.1)
1122 # @curses: Display video output via curses.  For graphics device
1123 #          models which support a text mode, QEMU can display this
1124 #          output using a curses/ncurses interface. Nothing is
1125 #          displayed when the graphics device is in graphical mode or
1126 #          if the graphics device does not support a text
1127 #          mode. Generally only the VGA device models support text
1128 #          mode.
1130 # @cocoa: The Cocoa user interface.
1132 # @spice-app: Set up a Spice server and run the default associated
1133 #             application to connect to it. The server will redirect
1134 #             the serial console and QEMU monitors. (Since 4.0)
1136 # Since: 2.12
1139 { 'enum'    : 'DisplayType',
1140   'data'    : [ 'default', 'none', 'gtk', 'sdl',
1141                 'egl-headless', 'curses', 'cocoa',
1142                 'spice-app'] }
1145 # @DisplayOptions:
1147 # Display (user interface) options.
1149 # @type:          Which DisplayType qemu should use.
1150 # @full-screen:   Start user interface in fullscreen mode (default: off).
1151 # @window-close:  Allow to quit qemu with window close button (default: on).
1152 # @show-cursor:   Force showing the mouse cursor (default: off).
1153 #                 (since: 5.0)
1154 # @gl:            Enable OpenGL support (default: off).
1156 # Since: 2.12
1159 { 'union'   : 'DisplayOptions',
1160   'base'    : { 'type'           : 'DisplayType',
1161                 '*full-screen'   : 'bool',
1162                 '*window-close'  : 'bool',
1163                 '*show-cursor'   : 'bool',
1164                 '*gl'            : 'DisplayGLMode' },
1165   'discriminator' : 'type',
1166   'data'    : { 'gtk'            : 'DisplayGTK',
1167                 'curses'         : 'DisplayCurses',
1168                 'egl-headless'   : 'DisplayEGLHeadless'} }
1171 # @query-display-options:
1173 # Returns information about display configuration
1175 # Returns: @DisplayOptions
1177 # Since: 3.1
1180 { 'command': 'query-display-options',
1181   'returns': 'DisplayOptions' }