]> git.ipfire.org Git - thirdparty/qemu.git/blob - qapi/ui.json
linux-user: Update TASK_UNMAPPED_BASE for aarch64
[thirdparty/qemu.git] / qapi / ui.json
1 # -*- Mode: Python -*-
2 #
3
4 ##
5 # = Remote desktop
6 ##
7
8 { 'include': 'sockets.json' }
9
10 ##
11 # @set_password:
12 #
13 # Sets the password of a remote display session.
14 #
15 # @protocol: - 'vnc' to modify the VNC server password
16 # - 'spice' to modify the Spice server password
17 #
18 # @password: the new password
19 #
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
25 #
26 # Returns: - Nothing on success
27 # - If Spice is not enabled, DeviceNotFound
28 #
29 # Since: 0.14.0
30 #
31 # Example:
32 #
33 # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
34 # "password": "secret" } }
35 # <- { "return": {} }
36 #
37 ##
38 { 'command': 'set_password',
39 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
40
41 ##
42 # @expire_password:
43 #
44 # Expire the password of a remote display server.
45 #
46 # @protocol: the name of the remote display protocol 'vnc' or 'spice'
47 #
48 # @time: when to expire the password.
49 #
50 # - 'now' to expire the password immediately
51 # - 'never' to cancel password expiration
52 # - '+INT' where INT is the number of seconds from now (integer)
53 # - 'INT' where INT is the absolute time in seconds
54 #
55 # Returns: - Nothing on success
56 # - If @protocol is 'spice' and Spice is not active, DeviceNotFound
57 #
58 # Since: 0.14.0
59 #
60 # Notes: Time is relative to the server and currently there is no way to
61 # coordinate server time with client time. It is not recommended to
62 # use the absolute time version of the @time parameter unless you're
63 # sure you are on the same machine as the QEMU instance.
64 #
65 # Example:
66 #
67 # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
68 # "time": "+60" } }
69 # <- { "return": {} }
70 #
71 ##
72 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
73
74 ##
75 # @screendump:
76 #
77 # Write a PPM of the VGA screen to a file.
78 #
79 # @filename: the path of a new PPM file to store the image
80 #
81 # @device: ID of the display device that should be dumped. If this parameter
82 # is missing, the primary display will be used. (Since 2.12)
83 #
84 # @head: head to use in case the device supports multiple heads. If this
85 # parameter is missing, head #0 will be used. Also note that the head
86 # can only be specified in conjunction with the device ID. (Since 2.12)
87 #
88 # Returns: Nothing on success
89 #
90 # Since: 0.14.0
91 #
92 # Example:
93 #
94 # -> { "execute": "screendump",
95 # "arguments": { "filename": "/tmp/image" } }
96 # <- { "return": {} }
97 #
98 ##
99 { 'command': 'screendump',
100 'data': {'filename': 'str', '*device': 'str', '*head': 'int'} }
101
102 ##
103 # == Spice
104 ##
105
106 ##
107 # @SpiceBasicInfo:
108 #
109 # The basic information for SPICE network connection
110 #
111 # @host: IP address
112 #
113 # @port: port number
114 #
115 # @family: address family
116 #
117 # Since: 2.1
118 ##
119 { 'struct': 'SpiceBasicInfo',
120 'data': { 'host': 'str',
121 'port': 'str',
122 'family': 'NetworkAddressFamily' },
123 'if': 'defined(CONFIG_SPICE)' }
124
125 ##
126 # @SpiceServerInfo:
127 #
128 # Information about a SPICE server
129 #
130 # @auth: authentication method
131 #
132 # Since: 2.1
133 ##
134 { 'struct': 'SpiceServerInfo',
135 'base': 'SpiceBasicInfo',
136 'data': { '*auth': 'str' },
137 'if': 'defined(CONFIG_SPICE)' }
138
139 ##
140 # @SpiceChannel:
141 #
142 # Information about a SPICE client channel.
143 #
144 # @connection-id: SPICE connection id number. All channels with the same id
145 # belong to the same SPICE session.
146 #
147 # @channel-type: SPICE channel type number. "1" is the main control
148 # channel, filter for this one if you want to track spice
149 # sessions only
150 #
151 # @channel-id: SPICE channel ID number. Usually "0", might be different when
152 # multiple channels of the same type exist, such as multiple
153 # display channels in a multihead setup
154 #
155 # @tls: true if the channel is encrypted, false otherwise.
156 #
157 # Since: 0.14.0
158 ##
159 { 'struct': 'SpiceChannel',
160 'base': 'SpiceBasicInfo',
161 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
162 'tls': 'bool'},
163 'if': 'defined(CONFIG_SPICE)' }
164
165 ##
166 # @SpiceQueryMouseMode:
167 #
168 # An enumeration of Spice mouse states.
169 #
170 # @client: Mouse cursor position is determined by the client.
171 #
172 # @server: Mouse cursor position is determined by the server.
173 #
174 # @unknown: No information is available about mouse mode used by
175 # the spice server.
176 #
177 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
178 #
179 # Since: 1.1
180 ##
181 { 'enum': 'SpiceQueryMouseMode',
182 'data': [ 'client', 'server', 'unknown' ],
183 'if': 'defined(CONFIG_SPICE)' }
184
185 ##
186 # @SpiceInfo:
187 #
188 # Information about the SPICE session.
189 #
190 # @enabled: true if the SPICE server is enabled, false otherwise
191 #
192 # @migrated: true if the last guest migration completed and spice
193 # migration had completed as well. false otherwise. (since 1.4)
194 #
195 # @host: The hostname the SPICE server is bound to. This depends on
196 # the name resolution on the host and may be an IP address.
197 #
198 # @port: The SPICE server's port number.
199 #
200 # @compiled-version: SPICE server version.
201 #
202 # @tls-port: The SPICE server's TLS port number.
203 #
204 # @auth: the current authentication type used by the server
205 #
206 # - 'none' if no authentication is being used
207 # - 'spice' uses SASL or direct TLS authentication, depending on command
208 # line options
209 #
210 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
211 # be determined by the client or the server, or unknown if spice
212 # server doesn't provide this information. (since: 1.1)
213 #
214 # @channels: a list of @SpiceChannel for each active spice channel
215 #
216 # Since: 0.14.0
217 ##
218 { 'struct': 'SpiceInfo',
219 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
220 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
221 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
222 'if': 'defined(CONFIG_SPICE)' }
223
224 ##
225 # @query-spice:
226 #
227 # Returns information about the current SPICE server
228 #
229 # Returns: @SpiceInfo
230 #
231 # Since: 0.14.0
232 #
233 # Example:
234 #
235 # -> { "execute": "query-spice" }
236 # <- { "return": {
237 # "enabled": true,
238 # "auth": "spice",
239 # "port": 5920,
240 # "tls-port": 5921,
241 # "host": "0.0.0.0",
242 # "channels": [
243 # {
244 # "port": "54924",
245 # "family": "ipv4",
246 # "channel-type": 1,
247 # "connection-id": 1804289383,
248 # "host": "127.0.0.1",
249 # "channel-id": 0,
250 # "tls": true
251 # },
252 # {
253 # "port": "36710",
254 # "family": "ipv4",
255 # "channel-type": 4,
256 # "connection-id": 1804289383,
257 # "host": "127.0.0.1",
258 # "channel-id": 0,
259 # "tls": false
260 # },
261 # [ ... more channels follow ... ]
262 # ]
263 # }
264 # }
265 #
266 ##
267 { 'command': 'query-spice', 'returns': 'SpiceInfo',
268 'if': 'defined(CONFIG_SPICE)' }
269
270 ##
271 # @SPICE_CONNECTED:
272 #
273 # Emitted when a SPICE client establishes a connection
274 #
275 # @server: server information
276 #
277 # @client: client information
278 #
279 # Since: 0.14.0
280 #
281 # Example:
282 #
283 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
284 # "event": "SPICE_CONNECTED",
285 # "data": {
286 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
287 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
288 # }}
289 #
290 ##
291 { 'event': 'SPICE_CONNECTED',
292 'data': { 'server': 'SpiceBasicInfo',
293 'client': 'SpiceBasicInfo' },
294 'if': 'defined(CONFIG_SPICE)' }
295
296 ##
297 # @SPICE_INITIALIZED:
298 #
299 # Emitted after initial handshake and authentication takes place (if any)
300 # and the SPICE channel is up and running
301 #
302 # @server: server information
303 #
304 # @client: client information
305 #
306 # Since: 0.14.0
307 #
308 # Example:
309 #
310 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
311 # "event": "SPICE_INITIALIZED",
312 # "data": {"server": {"auth": "spice", "port": "5921",
313 # "family": "ipv4", "host": "127.0.0.1"},
314 # "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
315 # "connection-id": 1804289383, "host": "127.0.0.1",
316 # "channel-id": 0, "tls": true}
317 # }}
318 #
319 ##
320 { 'event': 'SPICE_INITIALIZED',
321 'data': { 'server': 'SpiceServerInfo',
322 'client': 'SpiceChannel' },
323 'if': 'defined(CONFIG_SPICE)' }
324
325 ##
326 # @SPICE_DISCONNECTED:
327 #
328 # Emitted when the SPICE connection is closed
329 #
330 # @server: server information
331 #
332 # @client: client information
333 #
334 # Since: 0.14.0
335 #
336 # Example:
337 #
338 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
339 # "event": "SPICE_DISCONNECTED",
340 # "data": {
341 # "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
342 # "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
343 # }}
344 #
345 ##
346 { 'event': 'SPICE_DISCONNECTED',
347 'data': { 'server': 'SpiceBasicInfo',
348 'client': 'SpiceBasicInfo' },
349 'if': 'defined(CONFIG_SPICE)' }
350
351 ##
352 # @SPICE_MIGRATE_COMPLETED:
353 #
354 # Emitted when SPICE migration has completed
355 #
356 # Since: 1.3
357 #
358 # Example:
359 #
360 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
361 # "event": "SPICE_MIGRATE_COMPLETED" }
362 #
363 ##
364 { 'event': 'SPICE_MIGRATE_COMPLETED',
365 'if': 'defined(CONFIG_SPICE)' }
366
367 ##
368 # == VNC
369 ##
370
371 ##
372 # @VncBasicInfo:
373 #
374 # The basic information for vnc network connection
375 #
376 # @host: IP address
377 #
378 # @service: The service name of the vnc port. This may depend on the host
379 # system's service database so symbolic names should not be relied
380 # on.
381 #
382 # @family: address family
383 #
384 # @websocket: true in case the socket is a websocket (since 2.3).
385 #
386 # Since: 2.1
387 ##
388 { 'struct': 'VncBasicInfo',
389 'data': { 'host': 'str',
390 'service': 'str',
391 'family': 'NetworkAddressFamily',
392 'websocket': 'bool' },
393 'if': 'defined(CONFIG_VNC)' }
394
395 ##
396 # @VncServerInfo:
397 #
398 # The network connection information for server
399 #
400 # @auth: authentication method used for
401 # the plain (non-websocket) VNC server
402 #
403 # Since: 2.1
404 ##
405 { 'struct': 'VncServerInfo',
406 'base': 'VncBasicInfo',
407 'data': { '*auth': 'str' },
408 'if': 'defined(CONFIG_VNC)' }
409
410 ##
411 # @VncClientInfo:
412 #
413 # Information about a connected VNC client.
414 #
415 # @x509_dname: If x509 authentication is in use, the Distinguished
416 # Name of the client.
417 #
418 # @sasl_username: If SASL authentication is in use, the SASL username
419 # used for authentication.
420 #
421 # Since: 0.14.0
422 ##
423 { 'struct': 'VncClientInfo',
424 'base': 'VncBasicInfo',
425 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
426 'if': 'defined(CONFIG_VNC)' }
427
428 ##
429 # @VncInfo:
430 #
431 # Information about the VNC session.
432 #
433 # @enabled: true if the VNC server is enabled, false otherwise
434 #
435 # @host: The hostname the VNC server is bound to. This depends on
436 # the name resolution on the host and may be an IP address.
437 #
438 # @family: - 'ipv6' if the host is listening for IPv6 connections
439 # - 'ipv4' if the host is listening for IPv4 connections
440 # - 'unix' if the host is listening on a unix domain socket
441 # - 'unknown' otherwise
442 #
443 # @service: The service name of the server's port. This may depends
444 # on the host system's service database so symbolic names should not
445 # be relied on.
446 #
447 # @auth: the current authentication type used by the server
448 #
449 # - 'none' if no authentication is being used
450 # - 'vnc' if VNC authentication is being used
451 # - 'vencrypt+plain' if VEncrypt is used with plain text authentication
452 # - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
453 # - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
454 # - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
455 # - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
456 # - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
457 # - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
458 # - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
459 # - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
460 #
461 # @clients: a list of @VncClientInfo of all currently connected clients
462 #
463 # Since: 0.14.0
464 ##
465 { 'struct': 'VncInfo',
466 'data': {'enabled': 'bool', '*host': 'str',
467 '*family': 'NetworkAddressFamily',
468 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
469 'if': 'defined(CONFIG_VNC)' }
470
471 ##
472 # @VncPrimaryAuth:
473 #
474 # vnc primary authentication method.
475 #
476 # Since: 2.3
477 ##
478 { 'enum': 'VncPrimaryAuth',
479 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
480 'tls', 'vencrypt', 'sasl' ],
481 'if': 'defined(CONFIG_VNC)' }
482
483 ##
484 # @VncVencryptSubAuth:
485 #
486 # vnc sub authentication method with vencrypt.
487 #
488 # Since: 2.3
489 ##
490 { 'enum': 'VncVencryptSubAuth',
491 'data': [ 'plain',
492 'tls-none', 'x509-none',
493 'tls-vnc', 'x509-vnc',
494 'tls-plain', 'x509-plain',
495 'tls-sasl', 'x509-sasl' ],
496 'if': 'defined(CONFIG_VNC)' }
497
498 ##
499 # @VncServerInfo2:
500 #
501 # The network connection information for server
502 #
503 # @auth: The current authentication type used by the servers
504 #
505 # @vencrypt: The vencrypt sub authentication type used by the
506 # servers, only specified in case auth == vencrypt.
507 #
508 # Since: 2.9
509 ##
510 { 'struct': 'VncServerInfo2',
511 'base': 'VncBasicInfo',
512 'data': { 'auth' : 'VncPrimaryAuth',
513 '*vencrypt' : 'VncVencryptSubAuth' },
514 'if': 'defined(CONFIG_VNC)' }
515
516 ##
517 # @VncInfo2:
518 #
519 # Information about a vnc server
520 #
521 # @id: vnc server name.
522 #
523 # @server: A list of @VncBasincInfo describing all listening sockets.
524 # The list can be empty (in case the vnc server is disabled).
525 # It also may have multiple entries: normal + websocket,
526 # possibly also ipv4 + ipv6 in the future.
527 #
528 # @clients: A list of @VncClientInfo of all currently connected clients.
529 # The list can be empty, for obvious reasons.
530 #
531 # @auth: The current authentication type used by the non-websockets servers
532 #
533 # @vencrypt: The vencrypt authentication type used by the servers,
534 # only specified in case auth == vencrypt.
535 #
536 # @display: The display device the vnc server is linked to.
537 #
538 # Since: 2.3
539 ##
540 { 'struct': 'VncInfo2',
541 'data': { 'id' : 'str',
542 'server' : ['VncServerInfo2'],
543 'clients' : ['VncClientInfo'],
544 'auth' : 'VncPrimaryAuth',
545 '*vencrypt' : 'VncVencryptSubAuth',
546 '*display' : 'str' },
547 'if': 'defined(CONFIG_VNC)' }
548
549 ##
550 # @query-vnc:
551 #
552 # Returns information about the current VNC server
553 #
554 # Returns: @VncInfo
555 #
556 # Since: 0.14.0
557 #
558 # Example:
559 #
560 # -> { "execute": "query-vnc" }
561 # <- { "return": {
562 # "enabled":true,
563 # "host":"0.0.0.0",
564 # "service":"50402",
565 # "auth":"vnc",
566 # "family":"ipv4",
567 # "clients":[
568 # {
569 # "host":"127.0.0.1",
570 # "service":"50401",
571 # "family":"ipv4"
572 # }
573 # ]
574 # }
575 # }
576 #
577 ##
578 { 'command': 'query-vnc', 'returns': 'VncInfo',
579 'if': 'defined(CONFIG_VNC)' }
580 ##
581 # @query-vnc-servers:
582 #
583 # Returns a list of vnc servers. The list can be empty.
584 #
585 # Returns: a list of @VncInfo2
586 #
587 # Since: 2.3
588 ##
589 { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
590 'if': 'defined(CONFIG_VNC)' }
591
592 ##
593 # @change-vnc-password:
594 #
595 # Change the VNC server password.
596 #
597 # @password: the new password to use with VNC authentication
598 #
599 # Since: 1.1
600 #
601 # Notes: An empty password in this command will set the password to the empty
602 # string. Existing clients are unaffected by executing this command.
603 ##
604 { 'command': 'change-vnc-password',
605 'data': { 'password': 'str' },
606 'if': 'defined(CONFIG_VNC)' }
607
608 ##
609 # @VNC_CONNECTED:
610 #
611 # Emitted when a VNC client establishes a connection
612 #
613 # @server: server information
614 #
615 # @client: client information
616 #
617 # Note: This event is emitted before any authentication takes place, thus
618 # the authentication ID is not provided
619 #
620 # Since: 0.13.0
621 #
622 # Example:
623 #
624 # <- { "event": "VNC_CONNECTED",
625 # "data": {
626 # "server": { "auth": "sasl", "family": "ipv4",
627 # "service": "5901", "host": "0.0.0.0" },
628 # "client": { "family": "ipv4", "service": "58425",
629 # "host": "127.0.0.1" } },
630 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
631 #
632 ##
633 { 'event': 'VNC_CONNECTED',
634 'data': { 'server': 'VncServerInfo',
635 'client': 'VncBasicInfo' },
636 'if': 'defined(CONFIG_VNC)' }
637
638 ##
639 # @VNC_INITIALIZED:
640 #
641 # Emitted after authentication takes place (if any) and the VNC session is
642 # made active
643 #
644 # @server: server information
645 #
646 # @client: client information
647 #
648 # Since: 0.13.0
649 #
650 # Example:
651 #
652 # <- { "event": "VNC_INITIALIZED",
653 # "data": {
654 # "server": { "auth": "sasl", "family": "ipv4",
655 # "service": "5901", "host": "0.0.0.0"},
656 # "client": { "family": "ipv4", "service": "46089",
657 # "host": "127.0.0.1", "sasl_username": "luiz" } },
658 # "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
659 #
660 ##
661 { 'event': 'VNC_INITIALIZED',
662 'data': { 'server': 'VncServerInfo',
663 'client': 'VncClientInfo' },
664 'if': 'defined(CONFIG_VNC)' }
665
666 ##
667 # @VNC_DISCONNECTED:
668 #
669 # Emitted when the connection is closed
670 #
671 # @server: server information
672 #
673 # @client: client information
674 #
675 # Since: 0.13.0
676 #
677 # Example:
678 #
679 # <- { "event": "VNC_DISCONNECTED",
680 # "data": {
681 # "server": { "auth": "sasl", "family": "ipv4",
682 # "service": "5901", "host": "0.0.0.0" },
683 # "client": { "family": "ipv4", "service": "58425",
684 # "host": "127.0.0.1", "sasl_username": "luiz" } },
685 # "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
686 #
687 ##
688 { 'event': 'VNC_DISCONNECTED',
689 'data': { 'server': 'VncServerInfo',
690 'client': 'VncClientInfo' },
691 'if': 'defined(CONFIG_VNC)' }
692
693 ##
694 # = Input
695 ##
696
697 ##
698 # @MouseInfo:
699 #
700 # Information about a mouse device.
701 #
702 # @name: the name of the mouse device
703 #
704 # @index: the index of the mouse device
705 #
706 # @current: true if this device is currently receiving mouse events
707 #
708 # @absolute: true if this device supports absolute coordinates as input
709 #
710 # Since: 0.14.0
711 ##
712 { 'struct': 'MouseInfo',
713 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
714 'absolute': 'bool'} }
715
716 ##
717 # @query-mice:
718 #
719 # Returns information about each active mouse device
720 #
721 # Returns: a list of @MouseInfo for each device
722 #
723 # Since: 0.14.0
724 #
725 # Example:
726 #
727 # -> { "execute": "query-mice" }
728 # <- { "return": [
729 # {
730 # "name":"QEMU Microsoft Mouse",
731 # "index":0,
732 # "current":false,
733 # "absolute":false
734 # },
735 # {
736 # "name":"QEMU PS/2 Mouse",
737 # "index":1,
738 # "current":true,
739 # "absolute":true
740 # }
741 # ]
742 # }
743 #
744 ##
745 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
746
747 ##
748 # @QKeyCode:
749 #
750 # An enumeration of key name.
751 #
752 # This is used by the @send-key command.
753 #
754 # @unmapped: since 2.0
755 # @pause: since 2.0
756 # @ro: since 2.4
757 # @kp_comma: since 2.4
758 # @kp_equals: since 2.6
759 # @power: since 2.6
760 # @hiragana: since 2.9
761 # @henkan: since 2.9
762 # @yen: since 2.9
763 #
764 # @sleep: since 2.10
765 # @wake: since 2.10
766 # @audionext: since 2.10
767 # @audioprev: since 2.10
768 # @audiostop: since 2.10
769 # @audioplay: since 2.10
770 # @audiomute: since 2.10
771 # @volumeup: since 2.10
772 # @volumedown: since 2.10
773 # @mediaselect: since 2.10
774 # @mail: since 2.10
775 # @calculator: since 2.10
776 # @computer: since 2.10
777 # @ac_home: since 2.10
778 # @ac_back: since 2.10
779 # @ac_forward: since 2.10
780 # @ac_refresh: since 2.10
781 # @ac_bookmarks: since 2.10
782 #
783 # @muhenkan: since 2.12
784 # @katakanahiragana: since 2.12
785 #
786 # 'sysrq' was mistakenly added to hack around the fact that
787 # the ps2 driver was not generating correct scancodes sequences
788 # when 'alt+print' was pressed. This flaw is now fixed and the
789 # 'sysrq' key serves no further purpose. Any further use of
790 # 'sysrq' will be transparently changed to 'print', so they
791 # are effectively synonyms.
792 #
793 # Since: 1.3.0
794 #
795 ##
796 { 'enum': 'QKeyCode',
797 'data': [ 'unmapped',
798 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
799 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
800 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
801 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
802 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
803 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
804 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
805 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
806 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
807 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
808 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
809 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
810 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
811 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
812 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
813 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
814 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
815 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
816 'volumeup', 'volumedown', 'mediaselect',
817 'mail', 'calculator', 'computer',
818 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks' ] }
819
820 ##
821 # @KeyValue:
822 #
823 # Represents a keyboard key.
824 #
825 # Since: 1.3.0
826 ##
827 { 'union': 'KeyValue',
828 'data': {
829 'number': 'int',
830 'qcode': 'QKeyCode' } }
831
832 ##
833 # @send-key:
834 #
835 # Send keys to guest.
836 #
837 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
838 # simultaneously sent to the guest. A @KeyValue.number value is sent
839 # directly to the guest, while @KeyValue.qcode must be a valid
840 # @QKeyCode value
841 #
842 # @hold-time: time to delay key up events, milliseconds. Defaults
843 # to 100
844 #
845 # Returns: - Nothing on success
846 # - If key is unknown or redundant, InvalidParameter
847 #
848 # Since: 1.3.0
849 #
850 # Example:
851 #
852 # -> { "execute": "send-key",
853 # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
854 # { "type": "qcode", "data": "alt" },
855 # { "type": "qcode", "data": "delete" } ] } }
856 # <- { "return": {} }
857 #
858 ##
859 { 'command': 'send-key',
860 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
861
862 ##
863 # @InputButton:
864 #
865 # Button of a pointer input device (mouse, tablet).
866 #
867 # @side: front side button of a 5-button mouse (since 2.9)
868 #
869 # @extra: rear side button of a 5-button mouse (since 2.9)
870 #
871 # Since: 2.0
872 ##
873 { 'enum' : 'InputButton',
874 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
875 'extra' ] }
876
877 ##
878 # @InputAxis:
879 #
880 # Position axis of a pointer input device (mouse, tablet).
881 #
882 # Since: 2.0
883 ##
884 { 'enum' : 'InputAxis',
885 'data' : [ 'x', 'y' ] }
886
887 ##
888 # @InputKeyEvent:
889 #
890 # Keyboard input event.
891 #
892 # @key: Which key this event is for.
893 # @down: True for key-down and false for key-up events.
894 #
895 # Since: 2.0
896 ##
897 { 'struct' : 'InputKeyEvent',
898 'data' : { 'key' : 'KeyValue',
899 'down' : 'bool' } }
900
901 ##
902 # @InputBtnEvent:
903 #
904 # Pointer button input event.
905 #
906 # @button: Which button this event is for.
907 # @down: True for key-down and false for key-up events.
908 #
909 # Since: 2.0
910 ##
911 { 'struct' : 'InputBtnEvent',
912 'data' : { 'button' : 'InputButton',
913 'down' : 'bool' } }
914
915 ##
916 # @InputMoveEvent:
917 #
918 # Pointer motion input event.
919 #
920 # @axis: Which axis is referenced by @value.
921 # @value: Pointer position. For absolute coordinates the
922 # valid range is 0 -> 0x7ffff
923 #
924 # Since: 2.0
925 ##
926 { 'struct' : 'InputMoveEvent',
927 'data' : { 'axis' : 'InputAxis',
928 'value' : 'int' } }
929
930 ##
931 # @InputEvent:
932 #
933 # Input event union.
934 #
935 # @type: the input type, one of:
936 #
937 # - 'key': Input event of Keyboard
938 # - 'btn': Input event of pointer buttons
939 # - 'rel': Input event of relative pointer motion
940 # - 'abs': Input event of absolute pointer motion
941 #
942 # Since: 2.0
943 ##
944 { 'union' : 'InputEvent',
945 'data' : { 'key' : 'InputKeyEvent',
946 'btn' : 'InputBtnEvent',
947 'rel' : 'InputMoveEvent',
948 'abs' : 'InputMoveEvent' } }
949
950 ##
951 # @input-send-event:
952 #
953 # Send input event(s) to guest.
954 #
955 # The @device and @head parameters can be used to send the input event
956 # to specific input devices in case (a) multiple input devices of the
957 # same kind are added to the virtual machine and (b) you have
958 # configured input routing (see docs/multiseat.txt) for those input
959 # devices. The parameters work exactly like the device and head
960 # properties of input devices. If @device is missing, only devices
961 # that have no input routing config are admissible. If @device is
962 # specified, both input devices with and without input routing config
963 # are admissible, but devices with input routing config take
964 # precedence.
965 #
966 # @device: display device to send event(s) to.
967 # @head: head to send event(s) to, in case the
968 # display device supports multiple scanouts.
969 # @events: List of InputEvent union.
970 #
971 # Returns: Nothing on success.
972 #
973 # Since: 2.6
974 #
975 # Note: The consoles are visible in the qom tree, under
976 # /backend/console[$index]. They have a device link and head property,
977 # so it is possible to map which console belongs to which device and
978 # display.
979 #
980 # Example:
981 #
982 # 1. Press left mouse button.
983 #
984 # -> { "execute": "input-send-event",
985 # "arguments": { "device": "video0",
986 # "events": [ { "type": "btn",
987 # "data" : { "down": true, "button": "left" } } ] } }
988 # <- { "return": {} }
989 #
990 # -> { "execute": "input-send-event",
991 # "arguments": { "device": "video0",
992 # "events": [ { "type": "btn",
993 # "data" : { "down": false, "button": "left" } } ] } }
994 # <- { "return": {} }
995 #
996 # 2. Press ctrl-alt-del.
997 #
998 # -> { "execute": "input-send-event",
999 # "arguments": { "events": [
1000 # { "type": "key", "data" : { "down": true,
1001 # "key": {"type": "qcode", "data": "ctrl" } } },
1002 # { "type": "key", "data" : { "down": true,
1003 # "key": {"type": "qcode", "data": "alt" } } },
1004 # { "type": "key", "data" : { "down": true,
1005 # "key": {"type": "qcode", "data": "delete" } } } ] } }
1006 # <- { "return": {} }
1007 #
1008 # 3. Move mouse pointer to absolute coordinates (20000, 400).
1009 #
1010 # -> { "execute": "input-send-event" ,
1011 # "arguments": { "events": [
1012 # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1013 # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1014 # <- { "return": {} }
1015 #
1016 ##
1017 { 'command': 'input-send-event',
1018 'data': { '*device': 'str',
1019 '*head' : 'int',
1020 'events' : [ 'InputEvent' ] } }
1021
1022 ##
1023 # @GrabToggleKeys:
1024 #
1025 # Keys to toggle input-linux between host and guest.
1026 #
1027 # Since: 4.0
1028 #
1029 ##
1030 { 'enum': 'GrabToggleKeys',
1031 'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock',
1032 'ctrl-scrolllock' ] }
1033
1034 ##
1035 # @DisplayGTK:
1036 #
1037 # GTK display options.
1038 #
1039 # @grab-on-hover: Grab keyboard input on mouse hover.
1040 # @zoom-to-fit: Zoom guest display to fit into the host window. When
1041 # turned off the host window will be resized instead.
1042 # In case the display device can notify the guest on
1043 # window resizes (virtio-gpu) this will default to "on",
1044 # assuming the guest will resize the display to match
1045 # the window size then. Otherwise it defaults to "off".
1046 # Since 3.1
1047 #
1048 # Since: 2.12
1049 #
1050 ##
1051 { 'struct' : 'DisplayGTK',
1052 'data' : { '*grab-on-hover' : 'bool',
1053 '*zoom-to-fit' : 'bool' } }
1054
1055 ##
1056 # @DisplayEGLHeadless:
1057 #
1058 # EGL headless display options.
1059 #
1060 # @rendernode: Which DRM render node should be used. Default is the first
1061 # available node on the host.
1062 #
1063 # Since: 3.1
1064 #
1065 ##
1066 { 'struct' : 'DisplayEGLHeadless',
1067 'data' : { '*rendernode' : 'str' } }
1068
1069 ##
1070 # @DisplayGLMode:
1071 #
1072 # Display OpenGL mode.
1073 #
1074 # @off: Disable OpenGL (default).
1075 # @on: Use OpenGL, pick context type automatically.
1076 # Would better be named 'auto' but is called 'on' for backward
1077 # compatibility with bool type.
1078 # @core: Use OpenGL with Core (desktop) Context.
1079 # @es: Use OpenGL with ES (embedded systems) Context.
1080 #
1081 # Since: 3.0
1082 #
1083 ##
1084 { 'enum' : 'DisplayGLMode',
1085 'data' : [ 'off', 'on', 'core', 'es' ] }
1086
1087 ##
1088 # @DisplayCurses:
1089 #
1090 # Curses display options.
1091 #
1092 # @charset: Font charset used by guest (default: CP437).
1093 #
1094 # Since: 4.0
1095 #
1096 ##
1097 { 'struct' : 'DisplayCurses',
1098 'data' : { '*charset' : 'str' } }
1099
1100 ##
1101 # @DisplayType:
1102 #
1103 # Display (user interface) type.
1104 #
1105 # @default: The default user interface, selecting from the first available
1106 # of gtk, sdl, cocoa, and vnc.
1107 #
1108 # @none: No user interface or video output display. The guest will
1109 # still see an emulated graphics card, but its output will not
1110 # be displayed to the QEMU user.
1111 #
1112 # @gtk: The GTK user interface.
1113 #
1114 # @sdl: The SDL user interface.
1115 #
1116 # @egl-headless: No user interface, offload GL operations to a local
1117 # DRI device. Graphical display need to be paired with
1118 # VNC or Spice. (Since 3.1)
1119 #
1120 # @curses: Display video output via curses. For graphics device
1121 # models which support a text mode, QEMU can display this
1122 # output using a curses/ncurses interface. Nothing is
1123 # displayed when the graphics device is in graphical mode or
1124 # if the graphics device does not support a text
1125 # mode. Generally only the VGA device models support text
1126 # mode.
1127 #
1128 # @cocoa: The Cocoa user interface.
1129 #
1130 # @spice-app: Set up a Spice server and run the default associated
1131 # application to connect to it. The server will redirect
1132 # the serial console and QEMU monitors. (Since 4.0)
1133 #
1134 # Since: 2.12
1135 #
1136 ##
1137 { 'enum' : 'DisplayType',
1138 'data' : [ 'default', 'none', 'gtk', 'sdl',
1139 'egl-headless', 'curses', 'cocoa',
1140 'spice-app'] }
1141
1142 ##
1143 # @DisplayOptions:
1144 #
1145 # Display (user interface) options.
1146 #
1147 # @type: Which DisplayType qemu should use.
1148 # @full-screen: Start user interface in fullscreen mode (default: off).
1149 # @window-close: Allow to quit qemu with window close button (default: on).
1150 # @show-cursor: Force showing the mouse cursor (default: off).
1151 # (since: 5.0)
1152 # @gl: Enable OpenGL support (default: off).
1153 #
1154 # Since: 2.12
1155 #
1156 ##
1157 { 'union' : 'DisplayOptions',
1158 'base' : { 'type' : 'DisplayType',
1159 '*full-screen' : 'bool',
1160 '*window-close' : 'bool',
1161 '*show-cursor' : 'bool',
1162 '*gl' : 'DisplayGLMode' },
1163 'discriminator' : 'type',
1164 'data' : { 'gtk' : 'DisplayGTK',
1165 'curses' : 'DisplayCurses',
1166 'egl-headless' : 'DisplayEGLHeadless'} }
1167
1168 ##
1169 # @query-display-options:
1170 #
1171 # Returns information about display configuration
1172 #
1173 # Returns: @DisplayOptions
1174 #
1175 # Since: 3.1
1176 #
1177 ##
1178 { 'command': 'query-display-options',
1179 'returns': 'DisplayOptions' }