qcow2: try load bitmaps only once
[qemu/kevin.git] / qapi / ui.json
blob5d01ad430454c2327dbe5e41995da19b36fdce88
1 # -*- Mode: Python -*-
4 ##
5 # = Remote desktop
6 ##
8 { 'include': 'sockets.json' }
11 # @set_password:
13 # Sets the password of a remote display session.
15 # @protocol: `vnc' to modify the VNC server password
16 #            `spice' to modify the Spice server password
18 # @password: the new password
20 # @connected: how to handle existing clients when changing the
21 #                       password.  If nothing is specified, defaults to `keep'
22 #                       `fail' to fail the command if clients are connected
23 #                       `disconnect' to disconnect existing clients
24 #                       `keep' to maintain existing clients
26 # Returns: Nothing on success
27 #          If Spice is not enabled, DeviceNotFound
29 # Since: 0.14.0
31 # Example:
33 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
34 #                                                "password": "secret" } }
35 # <- { "return": {} }
38 { 'command': 'set_password',
39   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
42 # @expire_password:
44 # Expire the password of a remote display server.
46 # @protocol: the name of the remote display protocol `vnc' or `spice'
48 # @time: when to expire the password.
49 #        `now' to expire the password immediately
50 #        `never' to cancel password expiration
51 #        `+INT' where INT is the number of seconds from now (integer)
52 #        `INT' where INT is the absolute time in seconds
54 # Returns: Nothing on success
55 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
57 # Since: 0.14.0
59 # Notes: Time is relative to the server and currently there is no way to
60 #        coordinate server time with client time.  It is not recommended to
61 #        use the absolute time version of the @time parameter unless you're
62 #        sure you are on the same machine as the QEMU instance.
64 # Example:
66 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
67 #                                                   "time": "+60" } }
68 # <- { "return": {} }
71 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
74 # @screendump:
76 # Write a PPM of the VGA screen to a file.
78 # @filename: the path of a new PPM file to store the image
80 # @device: ID of the display device that should be dumped. If this parameter
81 #          is missing, the primary display will be used. (Since 2.12)
83 # @head: head to use in case the device supports multiple heads. If this
84 #        parameter is missing, head #0 will be used. Also note that the head
85 #        can only be specified in conjunction with the device ID. (Since 2.12)
87 # Returns: Nothing on success
89 # Since: 0.14.0
91 # Example:
93 # -> { "execute": "screendump",
94 #      "arguments": { "filename": "/tmp/image" } }
95 # <- { "return": {} }
98 { 'command': 'screendump',
99   'data': {'filename': 'str', '*device': 'str', '*head': 'int'} }
102 # == Spice
106 # @SpiceBasicInfo:
108 # The basic information for SPICE network connection
110 # @host: IP address
112 # @port: port number
114 # @family: address family
116 # Since: 2.1
118 { 'struct': 'SpiceBasicInfo',
119   'data': { 'host': 'str',
120             'port': 'str',
121             'family': 'NetworkAddressFamily' } }
124 # @SpiceServerInfo:
126 # Information about a SPICE server
128 # @auth: authentication method
130 # Since: 2.1
132 { 'struct': 'SpiceServerInfo',
133   'base': 'SpiceBasicInfo',
134   'data': { '*auth': 'str' } }
137 # @SpiceChannel:
139 # Information about a SPICE client channel.
141 # @connection-id: SPICE connection id number.  All channels with the same id
142 #                 belong to the same SPICE session.
144 # @channel-type: SPICE channel type number.  "1" is the main control
145 #                channel, filter for this one if you want to track spice
146 #                sessions only
148 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
149 #              multiple channels of the same type exist, such as multiple
150 #              display channels in a multihead setup
152 # @tls: true if the channel is encrypted, false otherwise.
154 # Since: 0.14.0
156 { 'struct': 'SpiceChannel',
157   'base': 'SpiceBasicInfo',
158   'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
159            'tls': 'bool'} }
162 # @SpiceQueryMouseMode:
164 # An enumeration of Spice mouse states.
166 # @client: Mouse cursor position is determined by the client.
168 # @server: Mouse cursor position is determined by the server.
170 # @unknown: No information is available about mouse mode used by
171 #           the spice server.
173 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
175 # Since: 1.1
177 { 'enum': 'SpiceQueryMouseMode',
178   'data': [ 'client', 'server', 'unknown' ] }
181 # @SpiceInfo:
183 # Information about the SPICE session.
185 # @enabled: true if the SPICE server is enabled, false otherwise
187 # @migrated: true if the last guest migration completed and spice
188 #            migration had completed as well. false otherwise. (since 1.4)
190 # @host: The hostname the SPICE server is bound to.  This depends on
191 #        the name resolution on the host and may be an IP address.
193 # @port: The SPICE server's port number.
195 # @compiled-version: SPICE server version.
197 # @tls-port: The SPICE server's TLS port number.
199 # @auth: the current authentication type used by the server
200 #        'none'  if no authentication is being used
201 #        'spice' uses SASL or direct TLS authentication, depending on command
202 #                line options
204 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
205 #              be determined by the client or the server, or unknown if spice
206 #              server doesn't provide this information. (since: 1.1)
208 # @channels: a list of @SpiceChannel for each active spice channel
210 # Since: 0.14.0
212 { 'struct': 'SpiceInfo',
213   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
214            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
215            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
218 # @query-spice:
220 # Returns information about the current SPICE server
222 # Returns: @SpiceInfo
224 # Since: 0.14.0
226 # Example:
228 # -> { "execute": "query-spice" }
229 # <- { "return": {
230 #          "enabled": true,
231 #          "auth": "spice",
232 #          "port": 5920,
233 #          "tls-port": 5921,
234 #          "host": "0.0.0.0",
235 #          "channels": [
236 #             {
237 #                "port": "54924",
238 #                "family": "ipv4",
239 #                "channel-type": 1,
240 #                "connection-id": 1804289383,
241 #                "host": "127.0.0.1",
242 #                "channel-id": 0,
243 #                "tls": true
244 #             },
245 #             {
246 #                "port": "36710",
247 #                "family": "ipv4",
248 #                "channel-type": 4,
249 #                "connection-id": 1804289383,
250 #                "host": "127.0.0.1",
251 #                "channel-id": 0,
252 #                "tls": false
253 #             },
254 #             [ ... more channels follow ... ]
255 #          ]
256 #       }
257 #    }
260 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
263 # @SPICE_CONNECTED:
265 # Emitted when a SPICE client establishes a connection
267 # @server: server information
269 # @client: client information
271 # Since: 0.14.0
273 # Example:
275 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
276 #      "event": "SPICE_CONNECTED",
277 #      "data": {
278 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
279 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
280 #    }}
283 { 'event': 'SPICE_CONNECTED',
284   'data': { 'server': 'SpiceBasicInfo',
285             'client': 'SpiceBasicInfo' } }
288 # @SPICE_INITIALIZED:
290 # Emitted after initial handshake and authentication takes place (if any)
291 # and the SPICE channel is up and running
293 # @server: server information
295 # @client: client information
297 # Since: 0.14.0
299 # Example:
301 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
302 #      "event": "SPICE_INITIALIZED",
303 #      "data": {"server": {"auth": "spice", "port": "5921",
304 #                          "family": "ipv4", "host": "127.0.0.1"},
305 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
306 #                          "connection-id": 1804289383, "host": "127.0.0.1",
307 #                          "channel-id": 0, "tls": true}
308 #    }}
311 { 'event': 'SPICE_INITIALIZED',
312   'data': { 'server': 'SpiceServerInfo',
313             'client': 'SpiceChannel' } }
316 # @SPICE_DISCONNECTED:
318 # Emitted when the SPICE connection is closed
320 # @server: server information
322 # @client: client information
324 # Since: 0.14.0
326 # Example:
328 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
329 #      "event": "SPICE_DISCONNECTED",
330 #      "data": {
331 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
332 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
333 #    }}
336 { 'event': 'SPICE_DISCONNECTED',
337   'data': { 'server': 'SpiceBasicInfo',
338             'client': 'SpiceBasicInfo' } }
341 # @SPICE_MIGRATE_COMPLETED:
343 # Emitted when SPICE migration has completed
345 # Since: 1.3
347 # Example:
349 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
350 #      "event": "SPICE_MIGRATE_COMPLETED" }
353 { 'event': 'SPICE_MIGRATE_COMPLETED' }
356 # == VNC
360 # @VncBasicInfo:
362 # The basic information for vnc network connection
364 # @host: IP address
366 # @service: The service name of the vnc port. This may depend on the host
367 #           system's service database so symbolic names should not be relied
368 #           on.
370 # @family: address family
372 # @websocket: true in case the socket is a websocket (since 2.3).
374 # Since: 2.1
376 { 'struct': 'VncBasicInfo',
377   'data': { 'host': 'str',
378             'service': 'str',
379             'family': 'NetworkAddressFamily',
380             'websocket': 'bool' } }
383 # @VncServerInfo:
385 # The network connection information for server
387 # @auth: authentication method used for
388 #        the plain (non-websocket) VNC server
390 # Since: 2.1
392 { 'struct': 'VncServerInfo',
393   'base': 'VncBasicInfo',
394   'data': { '*auth': 'str' } }
397 # @VncClientInfo:
399 # Information about a connected VNC client.
401 # @x509_dname: If x509 authentication is in use, the Distinguished
402 #              Name of the client.
404 # @sasl_username: If SASL authentication is in use, the SASL username
405 #                 used for authentication.
407 # Since: 0.14.0
409 { 'struct': 'VncClientInfo',
410   'base': 'VncBasicInfo',
411   'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
414 # @VncInfo:
416 # Information about the VNC session.
418 # @enabled: true if the VNC server is enabled, false otherwise
420 # @host: The hostname the VNC server is bound to.  This depends on
421 #        the name resolution on the host and may be an IP address.
423 # @family: 'ipv6' if the host is listening for IPv6 connections
424 #                    'ipv4' if the host is listening for IPv4 connections
425 #                    'unix' if the host is listening on a unix domain socket
426 #                    'unknown' otherwise
428 # @service: The service name of the server's port.  This may depends
429 #           on the host system's service database so symbolic names should not
430 #           be relied on.
432 # @auth: the current authentication type used by the server
433 #        'none' if no authentication is being used
434 #        'vnc' if VNC authentication is being used
435 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
436 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
437 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
438 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
439 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
440 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
441 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
442 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
443 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
445 # @clients: a list of @VncClientInfo of all currently connected clients
447 # Since: 0.14.0
449 { 'struct': 'VncInfo',
450   'data': {'enabled': 'bool', '*host': 'str',
451            '*family': 'NetworkAddressFamily',
452            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
455 # @VncPrimaryAuth:
457 # vnc primary authentication method.
459 # Since: 2.3
461 { 'enum': 'VncPrimaryAuth',
462   'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
463             'tls', 'vencrypt', 'sasl' ] }
466 # @VncVencryptSubAuth:
468 # vnc sub authentication method with vencrypt.
470 # Since: 2.3
472 { 'enum': 'VncVencryptSubAuth',
473   'data': [ 'plain',
474             'tls-none',  'x509-none',
475             'tls-vnc',   'x509-vnc',
476             'tls-plain', 'x509-plain',
477             'tls-sasl',  'x509-sasl' ] }
481 # @VncServerInfo2:
483 # The network connection information for server
485 # @auth: The current authentication type used by the servers
487 # @vencrypt: The vencrypt sub authentication type used by the
488 #            servers, only specified in case auth == vencrypt.
490 # Since: 2.9
492 { 'struct': 'VncServerInfo2',
493   'base': 'VncBasicInfo',
494   'data': { 'auth'      : 'VncPrimaryAuth',
495             '*vencrypt' : 'VncVencryptSubAuth' } }
499 # @VncInfo2:
501 # Information about a vnc server
503 # @id: vnc server name.
505 # @server: A list of @VncBasincInfo describing all listening sockets.
506 #          The list can be empty (in case the vnc server is disabled).
507 #          It also may have multiple entries: normal + websocket,
508 #          possibly also ipv4 + ipv6 in the future.
510 # @clients: A list of @VncClientInfo of all currently connected clients.
511 #           The list can be empty, for obvious reasons.
513 # @auth: The current authentication type used by the non-websockets servers
515 # @vencrypt: The vencrypt authentication type used by the servers,
516 #            only specified in case auth == vencrypt.
518 # @display: The display device the vnc server is linked to.
520 # Since: 2.3
522 { 'struct': 'VncInfo2',
523   'data': { 'id'        : 'str',
524             'server'    : ['VncServerInfo2'],
525             'clients'   : ['VncClientInfo'],
526             'auth'      : 'VncPrimaryAuth',
527             '*vencrypt' : 'VncVencryptSubAuth',
528             '*display'  : 'str' } }
531 # @query-vnc:
533 # Returns information about the current VNC server
535 # Returns: @VncInfo
537 # Since: 0.14.0
539 # Example:
541 # -> { "execute": "query-vnc" }
542 # <- { "return": {
543 #          "enabled":true,
544 #          "host":"0.0.0.0",
545 #          "service":"50402",
546 #          "auth":"vnc",
547 #          "family":"ipv4",
548 #          "clients":[
549 #             {
550 #                "host":"127.0.0.1",
551 #                "service":"50401",
552 #                "family":"ipv4"
553 #             }
554 #          ]
555 #       }
556 #    }
559 { 'command': 'query-vnc', 'returns': 'VncInfo' }
562 # @query-vnc-servers:
564 # Returns a list of vnc servers.  The list can be empty.
566 # Returns: a list of @VncInfo2
568 # Since: 2.3
570 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
573 # @change-vnc-password:
575 # Change the VNC server password.
577 # @password:  the new password to use with VNC authentication
579 # Since: 1.1
581 # Notes:  An empty password in this command will set the password to the empty
582 #         string.  Existing clients are unaffected by executing this command.
584 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
587 # @VNC_CONNECTED:
589 # Emitted when a VNC client establishes a connection
591 # @server: server information
593 # @client: client information
595 # Note: This event is emitted before any authentication takes place, thus
596 # the authentication ID is not provided
598 # Since: 0.13.0
600 # Example:
602 # <- { "event": "VNC_CONNECTED",
603 #      "data": {
604 #            "server": { "auth": "sasl", "family": "ipv4",
605 #                        "service": "5901", "host": "0.0.0.0" },
606 #            "client": { "family": "ipv4", "service": "58425",
607 #                        "host": "127.0.0.1" } },
608 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
611 { 'event': 'VNC_CONNECTED',
612   'data': { 'server': 'VncServerInfo',
613             'client': 'VncBasicInfo' } }
616 # @VNC_INITIALIZED:
618 # Emitted after authentication takes place (if any) and the VNC session is
619 # made active
621 # @server: server information
623 # @client: client information
625 # Since: 0.13.0
627 # Example:
629 # <-  { "event": "VNC_INITIALIZED",
630 #       "data": {
631 #            "server": { "auth": "sasl", "family": "ipv4",
632 #                        "service": "5901", "host": "0.0.0.0"},
633 #            "client": { "family": "ipv4", "service": "46089",
634 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
635 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
638 { 'event': 'VNC_INITIALIZED',
639   'data': { 'server': 'VncServerInfo',
640             'client': 'VncClientInfo' } }
643 # @VNC_DISCONNECTED:
645 # Emitted when the connection is closed
647 # @server: server information
649 # @client: client information
651 # Since: 0.13.0
653 # Example:
655 # <- { "event": "VNC_DISCONNECTED",
656 #      "data": {
657 #            "server": { "auth": "sasl", "family": "ipv4",
658 #                        "service": "5901", "host": "0.0.0.0" },
659 #            "client": { "family": "ipv4", "service": "58425",
660 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
661 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
664 { 'event': 'VNC_DISCONNECTED',
665   'data': { 'server': 'VncServerInfo',
666             'client': 'VncClientInfo' } }
669 # = Input
673 # @MouseInfo:
675 # Information about a mouse device.
677 # @name: the name of the mouse device
679 # @index: the index of the mouse device
681 # @current: true if this device is currently receiving mouse events
683 # @absolute: true if this device supports absolute coordinates as input
685 # Since: 0.14.0
687 { 'struct': 'MouseInfo',
688   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
689            'absolute': 'bool'} }
692 # @query-mice:
694 # Returns information about each active mouse device
696 # Returns: a list of @MouseInfo for each device
698 # Since: 0.14.0
700 # Example:
702 # -> { "execute": "query-mice" }
703 # <- { "return": [
704 #          {
705 #             "name":"QEMU Microsoft Mouse",
706 #             "index":0,
707 #             "current":false,
708 #             "absolute":false
709 #          },
710 #          {
711 #             "name":"QEMU PS/2 Mouse",
712 #             "index":1,
713 #             "current":true,
714 #             "absolute":true
715 #          }
716 #       ]
717 #    }
720 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
723 # @QKeyCode:
725 # An enumeration of key name.
727 # This is used by the @send-key command.
729 # @unmapped: since 2.0
730 # @pause: since 2.0
731 # @ro: since 2.4
732 # @kp_comma: since 2.4
733 # @kp_equals: since 2.6
734 # @power: since 2.6
735 # @hiragana: since 2.9
736 # @henkan: since 2.9
737 # @yen: since 2.9
739 # @sleep: since 2.10
740 # @wake: since 2.10
741 # @audionext: since 2.10
742 # @audioprev: since 2.10
743 # @audiostop: since 2.10
744 # @audioplay: since 2.10
745 # @audiomute: since 2.10
746 # @volumeup: since 2.10
747 # @volumedown: since 2.10
748 # @mediaselect: since 2.10
749 # @mail: since 2.10
750 # @calculator: since 2.10
751 # @computer: since 2.10
752 # @ac_home: since 2.10
753 # @ac_back: since 2.10
754 # @ac_forward: since 2.10
755 # @ac_refresh: since 2.10
756 # @ac_bookmarks: since 2.10
757 # altgr, altgr_r: dropped in 2.10
759 # @muhenkan: since 2.12
760 # @katakanahiragana: since 2.12
762 # 'sysrq' was mistakenly added to hack around the fact that
763 # the ps2 driver was not generating correct scancodes sequences
764 # when 'alt+print' was pressed. This flaw is now fixed and the
765 # 'sysrq' key serves no further purpose. Any further use of
766 # 'sysrq' will be transparently changed to 'print', so they
767 # are effectively synonyms.
769 # Since: 1.3.0
772 { 'enum': 'QKeyCode',
773   'data': [ 'unmapped',
774             'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
775             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
776             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
777             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
778             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
779             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
780             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
781             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
782             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
783             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
784             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
785             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
786             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
787             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
788             'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
789             'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
790             'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
791             'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
792             'volumeup', 'volumedown', 'mediaselect',
793             'mail', 'calculator', 'computer',
794             'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
797 # @KeyValue:
799 # Represents a keyboard key.
801 # Since: 1.3.0
803 { 'union': 'KeyValue',
804   'data': {
805     'number': 'int',
806     'qcode': 'QKeyCode' } }
809 # @send-key:
811 # Send keys to guest.
813 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
814 #        simultaneously sent to the guest. A @KeyValue.number value is sent
815 #        directly to the guest, while @KeyValue.qcode must be a valid
816 #        @QKeyCode value
818 # @hold-time: time to delay key up events, milliseconds. Defaults
819 #             to 100
821 # Returns: Nothing on success
822 #          If key is unknown or redundant, InvalidParameter
824 # Since: 1.3.0
826 # Example:
828 # -> { "execute": "send-key",
829 #      "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
830 #                               { "type": "qcode", "data": "alt" },
831 #                               { "type": "qcode", "data": "delete" } ] } }
832 # <- { "return": {} }
835 { 'command': 'send-key',
836   'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
839 # @InputButton:
841 # Button of a pointer input device (mouse, tablet).
843 # @side: front side button of a 5-button mouse (since 2.9)
845 # @extra: rear side button of a 5-button mouse (since 2.9)
847 # Since: 2.0
849 { 'enum'  : 'InputButton',
850   'data'  : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
851   'extra' ] }
854 # @InputAxis:
856 # Position axis of a pointer input device (mouse, tablet).
858 # Since: 2.0
860 { 'enum'  : 'InputAxis',
861   'data'  : [ 'x', 'y' ] }
864 # @InputKeyEvent:
866 # Keyboard input event.
868 # @key:    Which key this event is for.
869 # @down:   True for key-down and false for key-up events.
871 # Since: 2.0
873 { 'struct'  : 'InputKeyEvent',
874   'data'  : { 'key'     : 'KeyValue',
875               'down'    : 'bool' } }
878 # @InputBtnEvent:
880 # Pointer button input event.
882 # @button: Which button this event is for.
883 # @down:   True for key-down and false for key-up events.
885 # Since: 2.0
887 { 'struct'  : 'InputBtnEvent',
888   'data'  : { 'button'  : 'InputButton',
889               'down'    : 'bool' } }
892 # @InputMoveEvent:
894 # Pointer motion input event.
896 # @axis:   Which axis is referenced by @value.
897 # @value:  Pointer position.  For absolute coordinates the
898 #          valid range is 0 -> 0x7ffff
900 # Since: 2.0
902 { 'struct'  : 'InputMoveEvent',
903   'data'  : { 'axis'    : 'InputAxis',
904               'value'   : 'int' } }
907 # @InputEvent:
909 # Input event union.
911 # @type: the input type, one of:
912 #  - 'key': Input event of Keyboard
913 #  - 'btn': Input event of pointer buttons
914 #  - 'rel': Input event of relative pointer motion
915 #  - 'abs': Input event of absolute pointer motion
917 # Since: 2.0
919 { 'union' : 'InputEvent',
920   'data'  : { 'key'     : 'InputKeyEvent',
921               'btn'     : 'InputBtnEvent',
922               'rel'     : 'InputMoveEvent',
923               'abs'     : 'InputMoveEvent' } }
926 # @input-send-event:
928 # Send input event(s) to guest.
930 # @device: display device to send event(s) to.
931 # @head: head to send event(s) to, in case the
932 #        display device supports multiple scanouts.
933 # @events: List of InputEvent union.
935 # Returns: Nothing on success.
937 # The @device and @head parameters can be used to send the input event
938 # to specific input devices in case (a) multiple input devices of the
939 # same kind are added to the virtual machine and (b) you have
940 # configured input routing (see docs/multiseat.txt) for those input
941 # devices.  The parameters work exactly like the device and head
942 # properties of input devices.  If @device is missing, only devices
943 # that have no input routing config are admissible.  If @device is
944 # specified, both input devices with and without input routing config
945 # are admissible, but devices with input routing config take
946 # precedence.
948 # Since: 2.6
950 # Note: The consoles are visible in the qom tree, under
951 # /backend/console[$index]. They have a device link and head property,
952 # so it is possible to map which console belongs to which device and
953 # display.
955 # Example:
957 # 1. Press left mouse button.
959 # -> { "execute": "input-send-event",
960 #     "arguments": { "device": "video0",
961 #                    "events": [ { "type": "btn",
962 #                    "data" : { "down": true, "button": "left" } } ] } }
963 # <- { "return": {} }
965 # -> { "execute": "input-send-event",
966 #     "arguments": { "device": "video0",
967 #                    "events": [ { "type": "btn",
968 #                    "data" : { "down": false, "button": "left" } } ] } }
969 # <- { "return": {} }
971 # 2. Press ctrl-alt-del.
973 # -> { "execute": "input-send-event",
974 #      "arguments": { "events": [
975 #         { "type": "key", "data" : { "down": true,
976 #           "key": {"type": "qcode", "data": "ctrl" } } },
977 #         { "type": "key", "data" : { "down": true,
978 #           "key": {"type": "qcode", "data": "alt" } } },
979 #         { "type": "key", "data" : { "down": true,
980 #           "key": {"type": "qcode", "data": "delete" } } } ] } }
981 # <- { "return": {} }
983 # 3. Move mouse pointer to absolute coordinates (20000, 400).
985 # -> { "execute": "input-send-event" ,
986 #   "arguments": { "events": [
987 #                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
988 #                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
989 # <- { "return": {} }
992 { 'command': 'input-send-event',
993   'data': { '*device': 'str',
994             '*head'  : 'int',
995             'events' : [ 'InputEvent' ] } }
999 # @DisplayNoOpts:
1001 # Empty struct for displays without config options.
1003 # Since: 2.12
1006 { 'struct'  : 'DisplayNoOpts',
1007   'data'    : { } }
1010 # @DisplayGTK:
1012 # GTK display options.
1014 # @grab-on-hover: Grab keyboard input on mouse hover.
1016 # Since: 2.12
1019 { 'struct'  : 'DisplayGTK',
1020   'data'    : { '*grab-on-hover' : 'bool' } }
1023 # @DisplayType:
1025 # Display (user interface) type.
1027 # Since: 2.12
1030 { 'enum'    : 'DisplayType',
1031   'data'    : [ 'default', 'none', 'gtk', 'sdl',
1032                 'egl-headless', 'curses', 'cocoa' ] }
1035 # @DisplayOptions:
1037 # Display (user interface) options.
1039 # @type:          Which DisplayType qemu should use.
1040 # @full-screen:   Start user interface in fullscreen mode (default: off).
1041 # @window-close:  Allow to quit qemu with window close button (default: on).
1042 # @gl:            Enable OpenGL support (default: off).
1044 # Since: 2.12
1047 { 'union'   : 'DisplayOptions',
1048   'base'    : { 'type'           : 'DisplayType',
1049                 '*full-screen'   : 'bool',
1050                 '*window-close'  : 'bool',
1051                 '*gl'            : 'bool' },
1052   'discriminator' : 'type',
1053   'data'    : { 'default'        : 'DisplayNoOpts',
1054                 'none'           : 'DisplayNoOpts',
1055                 'gtk'            : 'DisplayGTK',
1056                 'sdl'            : 'DisplayNoOpts',
1057                 'egl-headless'   : 'DisplayNoOpts',
1058                 'curses'         : 'DisplayNoOpts',
1059                 'cocoa'          : 'DisplayNoOpts' } }