]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/ui.json
Merge tag 'pull-aspeed-20240201' of https://github.com/legoater/qemu into staging
[mirror_qemu.git] / qapi / ui.json
CommitLineData
608cfed6 1# -*- Mode: Python -*-
f7160f32 2# vim: filetype=python
608cfed6
MA
3#
4
5##
6# = Remote desktop
7##
8
30e863e5 9{ 'include': 'common.json' }
608cfed6
MA
10{ 'include': 'sockets.json' }
11
7277db91
SR
12##
13# @DisplayProtocol:
14#
15# Display protocols which support changing password options.
16#
17# Since: 7.0
7277db91
SR
18##
19{ 'enum': 'DisplayProtocol',
20 'data': [ 'vnc', 'spice' ] }
21
22##
23# @SetPasswordAction:
24#
a937b6aa
MA
25# An action to take on changing a password on a connection with active
26# clients.
7277db91
SR
27#
28# @keep: maintain existing clients
29#
30# @fail: fail the command if clients are connected
31#
32# @disconnect: disconnect existing clients
33#
34# Since: 7.0
7277db91
SR
35##
36{ 'enum': 'SetPasswordAction',
37 'data': [ 'keep', 'fail', 'disconnect' ] }
38
608cfed6 39##
675fd3c9 40# @SetPasswordOptions:
608cfed6 41#
675fd3c9 42# Options for set_password.
608cfed6 43#
a937b6aa
MA
44# @protocol:
45# - 'vnc' to modify the VNC server password
46# - 'spice' to modify the Spice server password
608cfed6
MA
47#
48# @password: the new password
49#
675fd3c9 50# @connected: How to handle existing clients when changing the
a937b6aa
MA
51# password. If nothing is specified, defaults to 'keep'. For VNC,
52# only 'keep' is currently implemented.
675fd3c9
SR
53#
54# Since: 7.0
675fd3c9
SR
55##
56{ 'union': 'SetPasswordOptions',
57 'base': { 'protocol': 'DisplayProtocol',
58 'password': 'str',
59 '*connected': 'SetPasswordAction' },
60 'discriminator': 'protocol',
61 'data': { 'vnc': 'SetPasswordOptionsVnc' } }
62
63##
64# @SetPasswordOptionsVnc:
65#
66# Options for set_password specific to the VNC procotol.
67#
a937b6aa
MA
68# @display: The id of the display where the password should be
69# changed. Defaults to the first.
675fd3c9
SR
70#
71# Since: 7.0
675fd3c9
SR
72##
73{ 'struct': 'SetPasswordOptionsVnc',
74 'data': { '*display': 'str' } }
75
76##
77# @set_password:
78#
79# Set the password of a remote display server.
608cfed6 80#
a937b6aa
MA
81# Returns:
82# - Nothing on success
83# - If Spice is not enabled, DeviceNotFound
608cfed6 84#
9bc6e893 85# Since: 0.14
608cfed6
MA
86#
87# Example:
88#
89# -> { "execute": "set_password", "arguments": { "protocol": "vnc",
90# "password": "secret" } }
91# <- { "return": {} }
608cfed6 92##
675fd3c9 93{ 'command': 'set_password', 'boxed': true, 'data': 'SetPasswordOptions' }
608cfed6
MA
94
95##
675fd3c9 96# @ExpirePasswordOptions:
608cfed6 97#
675fd3c9 98# General options for expire_password.
608cfed6 99#
a937b6aa
MA
100# @protocol:
101# - 'vnc' to modify the VNC server expiration
102# - 'spice' to modify the Spice server expiration
608cfed6
MA
103#
104# @time: when to expire the password.
608cfed6 105#
a937b6aa
MA
106# - 'now' to expire the password immediately
107# - 'never' to cancel password expiration
108# - '+INT' where INT is the number of seconds from now (integer)
109# - 'INT' where INT is the absolute time in seconds
e050e426 110#
a937b6aa
MA
111# Notes: Time is relative to the server and currently there is no way
112# to coordinate server time with client time. It is not
113# recommended to use the absolute time version of the @time
114# parameter unless you're sure you are on the same machine as the
115# QEMU instance.
608cfed6 116#
675fd3c9 117# Since: 7.0
675fd3c9
SR
118##
119{ 'union': 'ExpirePasswordOptions',
120 'base': { 'protocol': 'DisplayProtocol',
121 'time': 'str' },
122 'discriminator': 'protocol',
123 'data': { 'vnc': 'ExpirePasswordOptionsVnc' } }
124
125##
126# @ExpirePasswordOptionsVnc:
127#
128# Options for expire_password specific to the VNC procotol.
129#
a937b6aa
MA
130# @display: The id of the display where the expiration should be
131# changed. Defaults to the first.
675fd3c9
SR
132#
133# Since: 7.0
675fd3c9 134##
675fd3c9
SR
135{ 'struct': 'ExpirePasswordOptionsVnc',
136 'data': { '*display': 'str' } }
137
138##
139# @expire_password:
140#
141# Expire the password of a remote display server.
142#
a937b6aa
MA
143# Returns:
144# - Nothing on success
145# - If @protocol is 'spice' and Spice is not active,
146# DeviceNotFound
675fd3c9
SR
147#
148# Since: 0.14
149#
608cfed6
MA
150# Example:
151#
152# -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
153# "time": "+60" } }
154# <- { "return": {} }
608cfed6 155##
675fd3c9 156{ 'command': 'expire_password', 'boxed': true, 'data': 'ExpirePasswordOptions' }
608cfed6 157
9a0a119a
KS
158##
159# @ImageFormat:
160#
161# Supported image format types.
162#
163# @png: PNG format
164#
165# @ppm: PPM format
166#
167# Since: 7.1
9a0a119a
KS
168##
169{ 'enum': 'ImageFormat',
170 'data': ['ppm', 'png'] }
171
608cfed6
MA
172##
173# @screendump:
174#
9a0a119a 175# Capture the contents of a screen and write it to a file.
608cfed6 176#
9a0a119a 177# @filename: the path of a new file to store the image
608cfed6 178#
a937b6aa
MA
179# @device: ID of the display device that should be dumped. If this
180# parameter is missing, the primary display will be used. (Since
181# 2.12)
f771c544 182#
a937b6aa
MA
183# @head: head to use in case the device supports multiple heads. If
184# this parameter is missing, head #0 will be used. Also note that
185# the head can only be specified in conjunction with the device
186# ID. (Since 2.12)
f771c544 187#
a937b6aa 188# @format: image format for screendump. (default: ppm) (Since 7.1)
9a0a119a 189#
608cfed6
MA
190# Returns: Nothing on success
191#
9bc6e893 192# Since: 0.14
608cfed6
MA
193#
194# Example:
195#
196# -> { "execute": "screendump",
197# "arguments": { "filename": "/tmp/image" } }
198# <- { "return": {} }
608cfed6 199##
f771c544 200{ 'command': 'screendump',
9a0a119a
KS
201 'data': {'filename': 'str', '*device': 'str', '*head': 'int',
202 '*format': 'ImageFormat'},
f38aa2c7
MAL
203 'coroutine': true,
204 'if': 'CONFIG_PIXMAN' }
608cfed6
MA
205
206##
207# == Spice
208##
209
210##
211# @SpiceBasicInfo:
212#
213# The basic information for SPICE network connection
214#
215# @host: IP address
216#
217# @port: port number
218#
219# @family: address family
220#
221# Since: 2.1
222##
223{ 'struct': 'SpiceBasicInfo',
224 'data': { 'host': 'str',
225 'port': 'str',
514337c1 226 'family': 'NetworkAddressFamily' },
8a9f1e1d 227 'if': 'CONFIG_SPICE' }
608cfed6
MA
228
229##
230# @SpiceServerInfo:
231#
232# Information about a SPICE server
233#
234# @auth: authentication method
235#
236# Since: 2.1
237##
238{ 'struct': 'SpiceServerInfo',
239 'base': 'SpiceBasicInfo',
514337c1 240 'data': { '*auth': 'str' },
8a9f1e1d 241 'if': 'CONFIG_SPICE' }
608cfed6
MA
242
243##
244# @SpiceChannel:
245#
246# Information about a SPICE client channel.
247#
a937b6aa
MA
248# @connection-id: SPICE connection id number. All channels with the
249# same id belong to the same SPICE session.
608cfed6
MA
250#
251# @channel-type: SPICE channel type number. "1" is the main control
a937b6aa
MA
252# channel, filter for this one if you want to track spice sessions
253# only
608cfed6 254#
a937b6aa
MA
255# @channel-id: SPICE channel ID number. Usually "0", might be
256# different when multiple channels of the same type exist, such as
257# multiple display channels in a multihead setup
608cfed6
MA
258#
259# @tls: true if the channel is encrypted, false otherwise.
260#
9bc6e893 261# Since: 0.14
608cfed6
MA
262##
263{ 'struct': 'SpiceChannel',
264 'base': 'SpiceBasicInfo',
265 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
514337c1 266 'tls': 'bool'},
8a9f1e1d 267 'if': 'CONFIG_SPICE' }
608cfed6
MA
268
269##
270# @SpiceQueryMouseMode:
271#
272# An enumeration of Spice mouse states.
273#
274# @client: Mouse cursor position is determined by the client.
275#
276# @server: Mouse cursor position is determined by the server.
277#
a937b6aa
MA
278# @unknown: No information is available about mouse mode used by the
279# spice server.
608cfed6
MA
280#
281# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
282#
283# Since: 1.1
284##
285{ 'enum': 'SpiceQueryMouseMode',
514337c1 286 'data': [ 'client', 'server', 'unknown' ],
8a9f1e1d 287 'if': 'CONFIG_SPICE' }
608cfed6
MA
288
289##
290# @SpiceInfo:
291#
292# Information about the SPICE session.
293#
294# @enabled: true if the SPICE server is enabled, false otherwise
295#
296# @migrated: true if the last guest migration completed and spice
a937b6aa 297# migration had completed as well. false otherwise. (since 1.4)
608cfed6
MA
298#
299# @host: The hostname the SPICE server is bound to. This depends on
a937b6aa 300# the name resolution on the host and may be an IP address.
608cfed6
MA
301#
302# @port: The SPICE server's port number.
303#
304# @compiled-version: SPICE server version.
305#
306# @tls-port: The SPICE server's TLS port number.
307#
308# @auth: the current authentication type used by the server
e050e426 309#
a937b6aa
MA
310# - 'none' if no authentication is being used
311# - 'spice' uses SASL or direct TLS authentication, depending on
312# command line options
608cfed6 313#
a937b6aa
MA
314# @mouse-mode: The mode in which the mouse cursor is displayed
315# currently. Can be determined by the client or the server, or
316# unknown if spice server doesn't provide this information.
317# (since: 1.1)
608cfed6
MA
318#
319# @channels: a list of @SpiceChannel for each active spice channel
320#
9bc6e893 321# Since: 0.14
608cfed6
MA
322##
323{ 'struct': 'SpiceInfo',
324 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
325 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
514337c1 326 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
8a9f1e1d 327 'if': 'CONFIG_SPICE' }
608cfed6
MA
328
329##
330# @query-spice:
331#
332# Returns information about the current SPICE server
333#
334# Returns: @SpiceInfo
335#
9bc6e893 336# Since: 0.14
608cfed6
MA
337#
338# Example:
339#
340# -> { "execute": "query-spice" }
341# <- { "return": {
342# "enabled": true,
343# "auth": "spice",
344# "port": 5920,
74dd52e5 345# "migrated":false,
608cfed6
MA
346# "tls-port": 5921,
347# "host": "0.0.0.0",
74dd52e5 348# "mouse-mode":"client",
608cfed6
MA
349# "channels": [
350# {
351# "port": "54924",
352# "family": "ipv4",
353# "channel-type": 1,
354# "connection-id": 1804289383,
355# "host": "127.0.0.1",
356# "channel-id": 0,
357# "tls": true
358# },
359# {
360# "port": "36710",
361# "family": "ipv4",
362# "channel-type": 4,
363# "connection-id": 1804289383,
364# "host": "127.0.0.1",
365# "channel-id": 0,
366# "tls": false
367# },
368# [ ... more channels follow ... ]
369# ]
370# }
371# }
608cfed6 372##
514337c1 373{ 'command': 'query-spice', 'returns': 'SpiceInfo',
8a9f1e1d 374 'if': 'CONFIG_SPICE' }
608cfed6
MA
375
376##
377# @SPICE_CONNECTED:
378#
379# Emitted when a SPICE client establishes a connection
380#
381# @server: server information
382#
383# @client: client information
384#
9bc6e893 385# Since: 0.14
608cfed6
MA
386#
387# Example:
388#
389# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
390# "event": "SPICE_CONNECTED",
391# "data": {
392# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
393# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
394# }}
608cfed6
MA
395##
396{ 'event': 'SPICE_CONNECTED',
397 'data': { 'server': 'SpiceBasicInfo',
514337c1 398 'client': 'SpiceBasicInfo' },
8a9f1e1d 399 'if': 'CONFIG_SPICE' }
608cfed6
MA
400
401##
402# @SPICE_INITIALIZED:
403#
a937b6aa
MA
404# Emitted after initial handshake and authentication takes place (if
405# any) and the SPICE channel is up and running
608cfed6
MA
406#
407# @server: server information
408#
409# @client: client information
410#
9bc6e893 411# Since: 0.14
608cfed6
MA
412#
413# Example:
414#
415# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
416# "event": "SPICE_INITIALIZED",
417# "data": {"server": {"auth": "spice", "port": "5921",
418# "family": "ipv4", "host": "127.0.0.1"},
419# "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
420# "connection-id": 1804289383, "host": "127.0.0.1",
421# "channel-id": 0, "tls": true}
422# }}
608cfed6
MA
423##
424{ 'event': 'SPICE_INITIALIZED',
425 'data': { 'server': 'SpiceServerInfo',
514337c1 426 'client': 'SpiceChannel' },
8a9f1e1d 427 'if': 'CONFIG_SPICE' }
608cfed6
MA
428
429##
430# @SPICE_DISCONNECTED:
431#
432# Emitted when the SPICE connection is closed
433#
434# @server: server information
435#
436# @client: client information
437#
9bc6e893 438# Since: 0.14
608cfed6
MA
439#
440# Example:
441#
442# <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
443# "event": "SPICE_DISCONNECTED",
444# "data": {
445# "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
446# "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
447# }}
608cfed6
MA
448##
449{ 'event': 'SPICE_DISCONNECTED',
450 'data': { 'server': 'SpiceBasicInfo',
514337c1 451 'client': 'SpiceBasicInfo' },
8a9f1e1d 452 'if': 'CONFIG_SPICE' }
608cfed6
MA
453
454##
455# @SPICE_MIGRATE_COMPLETED:
456#
457# Emitted when SPICE migration has completed
458#
459# Since: 1.3
460#
461# Example:
462#
463# <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
464# "event": "SPICE_MIGRATE_COMPLETED" }
608cfed6 465##
514337c1 466{ 'event': 'SPICE_MIGRATE_COMPLETED',
8a9f1e1d 467 'if': 'CONFIG_SPICE' }
608cfed6
MA
468
469##
470# == VNC
471##
472
473##
474# @VncBasicInfo:
475#
476# The basic information for vnc network connection
477#
478# @host: IP address
479#
a937b6aa
MA
480# @service: The service name of the vnc port. This may depend on the
481# host system's service database so symbolic names should not be
482# relied on.
608cfed6
MA
483#
484# @family: address family
485#
486# @websocket: true in case the socket is a websocket (since 2.3).
487#
488# Since: 2.1
489##
490{ 'struct': 'VncBasicInfo',
491 'data': { 'host': 'str',
492 'service': 'str',
493 'family': 'NetworkAddressFamily',
05eb4a25 494 'websocket': 'bool' },
8a9f1e1d 495 'if': 'CONFIG_VNC' }
608cfed6
MA
496
497##
498# @VncServerInfo:
499#
500# The network connection information for server
501#
a937b6aa
MA
502# @auth: authentication method used for the plain (non-websocket) VNC
503# server
608cfed6
MA
504#
505# Since: 2.1
506##
507{ 'struct': 'VncServerInfo',
508 'base': 'VncBasicInfo',
05eb4a25 509 'data': { '*auth': 'str' },
8a9f1e1d 510 'if': 'CONFIG_VNC' }
608cfed6
MA
511
512##
513# @VncClientInfo:
514#
515# Information about a connected VNC client.
516#
517# @x509_dname: If x509 authentication is in use, the Distinguished
a937b6aa 518# Name of the client.
608cfed6
MA
519#
520# @sasl_username: If SASL authentication is in use, the SASL username
a937b6aa 521# used for authentication.
608cfed6 522#
9bc6e893 523# Since: 0.14
608cfed6
MA
524##
525{ 'struct': 'VncClientInfo',
526 'base': 'VncBasicInfo',
05eb4a25 527 'data': { '*x509_dname': 'str', '*sasl_username': 'str' },
8a9f1e1d 528 'if': 'CONFIG_VNC' }
608cfed6
MA
529
530##
531# @VncInfo:
532#
533# Information about the VNC session.
534#
535# @enabled: true if the VNC server is enabled, false otherwise
536#
a937b6aa
MA
537# @host: The hostname the VNC server is bound to. This depends on the
538# name resolution on the host and may be an IP address.
608cfed6 539#
a937b6aa
MA
540# @family:
541# - 'ipv6' if the host is listening for IPv6 connections
542# - 'ipv4' if the host is listening for IPv4 connections
543# - 'unix' if the host is listening on a unix domain socket
544# - 'unknown' otherwise
608cfed6
MA
545#
546# @service: The service name of the server's port. This may depends
a937b6aa
MA
547# on the host system's service database so symbolic names should
548# not be relied on.
608cfed6
MA
549#
550# @auth: the current authentication type used by the server
e050e426 551#
a937b6aa
MA
552# - 'none' if no authentication is being used
553# - 'vnc' if VNC authentication is being used
554# - 'vencrypt+plain' if VEncrypt is used with plain text
555# authentication
556# - 'vencrypt+tls+none' if VEncrypt is used with TLS and no
557# authentication
558# - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC
559# authentication
560# - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain
561# text auth
562# - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
563# - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
564# - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain
565# text auth
566# - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
567# - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL
568# auth
569#
570# @clients: a list of @VncClientInfo of all currently connected
571# clients
608cfed6 572#
9bc6e893 573# Since: 0.14
608cfed6
MA
574##
575{ 'struct': 'VncInfo',
576 'data': {'enabled': 'bool', '*host': 'str',
577 '*family': 'NetworkAddressFamily',
05eb4a25 578 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']},
8a9f1e1d 579 'if': 'CONFIG_VNC' }
608cfed6
MA
580
581##
582# @VncPrimaryAuth:
583#
584# vnc primary authentication method.
585#
586# Since: 2.3
587##
588{ 'enum': 'VncPrimaryAuth',
589 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
05eb4a25 590 'tls', 'vencrypt', 'sasl' ],
8a9f1e1d 591 'if': 'CONFIG_VNC' }
608cfed6
MA
592
593##
594# @VncVencryptSubAuth:
595#
596# vnc sub authentication method with vencrypt.
597#
598# Since: 2.3
599##
600{ 'enum': 'VncVencryptSubAuth',
601 'data': [ 'plain',
602 'tls-none', 'x509-none',
603 'tls-vnc', 'x509-vnc',
604 'tls-plain', 'x509-plain',
05eb4a25 605 'tls-sasl', 'x509-sasl' ],
8a9f1e1d 606 'if': 'CONFIG_VNC' }
608cfed6
MA
607
608##
609# @VncServerInfo2:
610#
611# The network connection information for server
612#
613# @auth: The current authentication type used by the servers
614#
a937b6aa
MA
615# @vencrypt: The vencrypt sub authentication type used by the servers,
616# only specified in case auth == vencrypt.
608cfed6
MA
617#
618# Since: 2.9
619##
620{ 'struct': 'VncServerInfo2',
621 'base': 'VncBasicInfo',
622 'data': { 'auth' : 'VncPrimaryAuth',
05eb4a25 623 '*vencrypt' : 'VncVencryptSubAuth' },
8a9f1e1d 624 'if': 'CONFIG_VNC' }
608cfed6
MA
625
626##
627# @VncInfo2:
628#
629# Information about a vnc server
630#
631# @id: vnc server name.
632#
633# @server: A list of @VncBasincInfo describing all listening sockets.
a937b6aa
MA
634# The list can be empty (in case the vnc server is disabled). It
635# also may have multiple entries: normal + websocket, possibly
636# also ipv4 + ipv6 in the future.
608cfed6 637#
a937b6aa
MA
638# @clients: A list of @VncClientInfo of all currently connected
639# clients. The list can be empty, for obvious reasons.
608cfed6 640#
a937b6aa
MA
641# @auth: The current authentication type used by the non-websockets
642# servers
608cfed6
MA
643#
644# @vencrypt: The vencrypt authentication type used by the servers,
a937b6aa 645# only specified in case auth == vencrypt.
608cfed6
MA
646#
647# @display: The display device the vnc server is linked to.
648#
649# Since: 2.3
650##
651{ 'struct': 'VncInfo2',
652 'data': { 'id' : 'str',
653 'server' : ['VncServerInfo2'],
654 'clients' : ['VncClientInfo'],
655 'auth' : 'VncPrimaryAuth',
656 '*vencrypt' : 'VncVencryptSubAuth',
05eb4a25 657 '*display' : 'str' },
8a9f1e1d 658 'if': 'CONFIG_VNC' }
608cfed6
MA
659
660##
661# @query-vnc:
662#
663# Returns information about the current VNC server
664#
665# Returns: @VncInfo
666#
9bc6e893 667# Since: 0.14
608cfed6
MA
668#
669# Example:
670#
671# -> { "execute": "query-vnc" }
672# <- { "return": {
673# "enabled":true,
674# "host":"0.0.0.0",
675# "service":"50402",
676# "auth":"vnc",
677# "family":"ipv4",
678# "clients":[
679# {
680# "host":"127.0.0.1",
681# "service":"50401",
5be07b3e
VT
682# "family":"ipv4",
683# "websocket":false
608cfed6
MA
684# }
685# ]
686# }
687# }
608cfed6 688##
05eb4a25 689{ 'command': 'query-vnc', 'returns': 'VncInfo',
8a9f1e1d 690 'if': 'CONFIG_VNC' }
608cfed6
MA
691##
692# @query-vnc-servers:
693#
694# Returns a list of vnc servers. The list can be empty.
695#
696# Returns: a list of @VncInfo2
697#
698# Since: 2.3
699##
05eb4a25 700{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'],
8a9f1e1d 701 'if': 'CONFIG_VNC' }
608cfed6
MA
702
703##
704# @change-vnc-password:
705#
706# Change the VNC server password.
707#
26ec4e53 708# @password: the new password to use with VNC authentication
608cfed6
MA
709#
710# Since: 1.1
711#
a937b6aa
MA
712# Notes: An empty password in this command will set the password to
713# the empty string. Existing clients are unaffected by executing
714# this command.
608cfed6 715##
b0ddeba2
MAL
716{ 'command': 'change-vnc-password',
717 'data': { 'password': 'str' },
8a9f1e1d 718 'if': 'CONFIG_VNC' }
608cfed6
MA
719
720##
721# @VNC_CONNECTED:
722#
723# Emitted when a VNC client establishes a connection
724#
725# @server: server information
726#
727# @client: client information
728#
a937b6aa
MA
729# Note: This event is emitted before any authentication takes place,
730# thus the authentication ID is not provided
608cfed6 731#
9bc6e893 732# Since: 0.13
608cfed6
MA
733#
734# Example:
735#
736# <- { "event": "VNC_CONNECTED",
737# "data": {
aecba617 738# "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
608cfed6
MA
739# "service": "5901", "host": "0.0.0.0" },
740# "client": { "family": "ipv4", "service": "58425",
aecba617 741# "host": "127.0.0.1", "websocket": false } },
608cfed6 742# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
608cfed6
MA
743##
744{ 'event': 'VNC_CONNECTED',
745 'data': { 'server': 'VncServerInfo',
05eb4a25 746 'client': 'VncBasicInfo' },
8a9f1e1d 747 'if': 'CONFIG_VNC' }
608cfed6
MA
748
749##
750# @VNC_INITIALIZED:
751#
a937b6aa
MA
752# Emitted after authentication takes place (if any) and the VNC
753# session is made active
608cfed6
MA
754#
755# @server: server information
756#
757# @client: client information
758#
9bc6e893 759# Since: 0.13
608cfed6
MA
760#
761# Example:
762#
763# <- { "event": "VNC_INITIALIZED",
764# "data": {
aecba617 765# "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
608cfed6 766# "service": "5901", "host": "0.0.0.0"},
aecba617 767# "client": { "family": "ipv4", "service": "46089", "websocket": false,
608cfed6
MA
768# "host": "127.0.0.1", "sasl_username": "luiz" } },
769# "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
608cfed6
MA
770##
771{ 'event': 'VNC_INITIALIZED',
772 'data': { 'server': 'VncServerInfo',
05eb4a25 773 'client': 'VncClientInfo' },
8a9f1e1d 774 'if': 'CONFIG_VNC' }
608cfed6
MA
775
776##
777# @VNC_DISCONNECTED:
778#
779# Emitted when the connection is closed
780#
781# @server: server information
782#
783# @client: client information
784#
9bc6e893 785# Since: 0.13
608cfed6
MA
786#
787# Example:
788#
789# <- { "event": "VNC_DISCONNECTED",
790# "data": {
aecba617 791# "server": { "auth": "sasl", "family": "ipv4", "websocket": false,
608cfed6 792# "service": "5901", "host": "0.0.0.0" },
aecba617 793# "client": { "family": "ipv4", "service": "58425", "websocket": false,
608cfed6
MA
794# "host": "127.0.0.1", "sasl_username": "luiz" } },
795# "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
608cfed6
MA
796##
797{ 'event': 'VNC_DISCONNECTED',
798 'data': { 'server': 'VncServerInfo',
05eb4a25 799 'client': 'VncClientInfo' },
8a9f1e1d 800 'if': 'CONFIG_VNC' }
608cfed6
MA
801
802##
803# = Input
804##
805
806##
807# @MouseInfo:
808#
809# Information about a mouse device.
810#
811# @name: the name of the mouse device
812#
813# @index: the index of the mouse device
814#
815# @current: true if this device is currently receiving mouse events
816#
a937b6aa
MA
817# @absolute: true if this device supports absolute coordinates as
818# input
608cfed6 819#
9bc6e893 820# Since: 0.14
608cfed6
MA
821##
822{ 'struct': 'MouseInfo',
823 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
824 'absolute': 'bool'} }
825
826##
827# @query-mice:
828#
829# Returns information about each active mouse device
830#
831# Returns: a list of @MouseInfo for each device
832#
9bc6e893 833# Since: 0.14
608cfed6
MA
834#
835# Example:
836#
837# -> { "execute": "query-mice" }
838# <- { "return": [
839# {
840# "name":"QEMU Microsoft Mouse",
841# "index":0,
842# "current":false,
843# "absolute":false
844# },
845# {
846# "name":"QEMU PS/2 Mouse",
847# "index":1,
848# "current":true,
849# "absolute":true
850# }
851# ]
852# }
608cfed6
MA
853##
854{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
855
856##
857# @QKeyCode:
858#
859# An enumeration of key name.
860#
861# This is used by the @send-key command.
862#
863# @unmapped: since 2.0
a937b6aa 864#
608cfed6 865# @pause: since 2.0
a937b6aa 866#
608cfed6 867# @ro: since 2.4
a937b6aa 868#
608cfed6 869# @kp_comma: since 2.4
a937b6aa 870#
608cfed6 871# @kp_equals: since 2.6
a937b6aa 872#
608cfed6 873# @power: since 2.6
a937b6aa 874#
608cfed6 875# @hiragana: since 2.9
a937b6aa 876#
608cfed6 877# @henkan: since 2.9
a937b6aa 878#
608cfed6
MA
879# @yen: since 2.9
880#
881# @sleep: since 2.10
a937b6aa 882#
608cfed6 883# @wake: since 2.10
a937b6aa 884#
608cfed6 885# @audionext: since 2.10
a937b6aa 886#
608cfed6 887# @audioprev: since 2.10
a937b6aa 888#
608cfed6 889# @audiostop: since 2.10
a937b6aa 890#
608cfed6 891# @audioplay: since 2.10
a937b6aa 892#
608cfed6 893# @audiomute: since 2.10
a937b6aa 894#
608cfed6 895# @volumeup: since 2.10
a937b6aa 896#
608cfed6 897# @volumedown: since 2.10
a937b6aa 898#
608cfed6 899# @mediaselect: since 2.10
a937b6aa 900#
608cfed6 901# @mail: since 2.10
a937b6aa 902#
608cfed6 903# @calculator: since 2.10
a937b6aa 904#
608cfed6 905# @computer: since 2.10
a937b6aa 906#
608cfed6 907# @ac_home: since 2.10
a937b6aa 908#
608cfed6 909# @ac_back: since 2.10
a937b6aa 910#
608cfed6 911# @ac_forward: since 2.10
a937b6aa 912#
608cfed6 913# @ac_refresh: since 2.10
a937b6aa 914#
608cfed6 915# @ac_bookmarks: since 2.10
608cfed6 916#
280b8da3 917# @muhenkan: since 2.12
a937b6aa 918#
280b8da3
M
919# @katakanahiragana: since 2.12
920#
d7696ff8 921# @lang1: since 6.1
a937b6aa 922#
d7696ff8
AO
923# @lang2: since 6.1
924#
ac19b516 925# @f13: since 8.0
a937b6aa 926#
ac19b516 927# @f14: since 8.0
a937b6aa 928#
ac19b516 929# @f15: since 8.0
a937b6aa 930#
ac19b516 931# @f16: since 8.0
a937b6aa 932#
ac19b516 933# @f17: since 8.0
a937b6aa 934#
ac19b516 935# @f18: since 8.0
a937b6aa 936#
ac19b516 937# @f19: since 8.0
a937b6aa 938#
ac19b516 939# @f20: since 8.0
a937b6aa 940#
ac19b516 941# @f21: since 8.0
a937b6aa 942#
ac19b516 943# @f22: since 8.0
a937b6aa 944#
ac19b516 945# @f23: since 8.0
a937b6aa 946#
ac19b516
WV
947# @f24: since 8.0
948#
a937b6aa
MA
949# 'sysrq' was mistakenly added to hack around the fact that the ps2
950# driver was not generating correct scancodes sequences when
951# 'alt+print' was pressed. This flaw is now fixed and the 'sysrq' key
952# serves no further purpose. Any further use of 'sysrq' will be
953# transparently changed to 'print', so they are effectively synonyms.
80b857f0 954#
9bc6e893 955# Since: 1.3
608cfed6
MA
956##
957{ 'enum': 'QKeyCode',
958 'data': [ 'unmapped',
959 'shift', 'shift_r', 'alt', 'alt_r', 'ctrl',
960 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
961 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
962 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
963 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
964 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
965 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
966 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
967 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
968 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
969 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
970 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
971 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
972 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
973 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
280b8da3 974 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiragana',
608cfed6
MA
975 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
976 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
977 'volumeup', 'volumedown', 'mediaselect',
978 'mail', 'calculator', 'computer',
d7696ff8 979 'ac_home', 'ac_back', 'ac_forward', 'ac_refresh', 'ac_bookmarks',
ac19b516 980 'lang1', 'lang2','f13','f14','f15','f16','f17','f18','f19','f20','f21','f22','f23','f24' ] }
608cfed6 981
3cda299d
MA
982##
983# @KeyValueKind:
984#
985# Since: 1.3
986##
987{ 'enum': 'KeyValueKind',
988 'data': [ 'number', 'qcode' ] }
989
990##
991# @IntWrapper:
992#
993# Since: 1.3
994##
995{ 'struct': 'IntWrapper',
996 'data': { 'data': 'int' } }
997
998##
999# @QKeyCodeWrapper:
1000#
1001# Since: 1.3
1002##
1003{ 'struct': 'QKeyCodeWrapper',
1004 'data': { 'data': 'QKeyCode' } }
1005
608cfed6
MA
1006##
1007# @KeyValue:
1008#
1009# Represents a keyboard key.
1010#
9bc6e893 1011# Since: 1.3
608cfed6
MA
1012##
1013{ 'union': 'KeyValue',
3cda299d
MA
1014 'base': { 'type': 'KeyValueKind' },
1015 'discriminator': 'type',
608cfed6 1016 'data': {
3cda299d
MA
1017 'number': 'IntWrapper',
1018 'qcode': 'QKeyCodeWrapper' } }
608cfed6
MA
1019
1020##
1021# @send-key:
1022#
1023# Send keys to guest.
1024#
a937b6aa
MA
1025# @keys: An array of @KeyValue elements. All @KeyValues in this array
1026# are simultaneously sent to the guest. A @KeyValue.number value
1027# is sent directly to the guest, while @KeyValue.qcode must be a
1028# valid @QKeyCode value
608cfed6 1029#
a937b6aa
MA
1030# @hold-time: time to delay key up events, milliseconds. Defaults to
1031# 100
608cfed6 1032#
a937b6aa
MA
1033# Returns:
1034# - Nothing on success
1035# - If key is unknown or redundant, GenericError
608cfed6 1036#
9bc6e893 1037# Since: 1.3
608cfed6
MA
1038#
1039# Example:
1040#
1041# -> { "execute": "send-key",
1042# "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
1043# { "type": "qcode", "data": "alt" },
1044# { "type": "qcode", "data": "delete" } ] } }
1045# <- { "return": {} }
608cfed6
MA
1046##
1047{ 'command': 'send-key',
1048 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
1049
1050##
1051# @InputButton:
1052#
1053# Button of a pointer input device (mouse, tablet).
1054#
1055# @side: front side button of a 5-button mouse (since 2.9)
1056#
1057# @extra: rear side button of a 5-button mouse (since 2.9)
1058#
2bfb10df
SL
1059# @touch: screen contact on a multi-touch device (since 8.1)
1060#
608cfed6
MA
1061# Since: 2.0
1062##
1063{ 'enum' : 'InputButton',
1064 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
2bfb10df 1065 'extra', 'wheel-left', 'wheel-right', 'touch' ] }
608cfed6
MA
1066
1067##
1068# @InputAxis:
1069#
1070# Position axis of a pointer input device (mouse, tablet).
1071#
1072# Since: 2.0
1073##
1074{ 'enum' : 'InputAxis',
1075 'data' : [ 'x', 'y' ] }
1076
2bfb10df
SL
1077##
1078# @InputMultiTouchType:
1079#
1080# Type of a multi-touch event.
1081#
1082# Since: 8.1
1083##
1084{ 'enum' : 'InputMultiTouchType',
1085 'data' : [ 'begin', 'update', 'end', 'cancel', 'data' ] }
1086
1087
608cfed6
MA
1088##
1089# @InputKeyEvent:
1090#
1091# Keyboard input event.
1092#
c0ac533b 1093# @key: Which key this event is for.
a937b6aa 1094#
c0ac533b 1095# @down: True for key-down and false for key-up events.
608cfed6
MA
1096#
1097# Since: 2.0
1098##
1099{ 'struct' : 'InputKeyEvent',
1100 'data' : { 'key' : 'KeyValue',
1101 'down' : 'bool' } }
1102
1103##
1104# @InputBtnEvent:
1105#
1106# Pointer button input event.
1107#
1108# @button: Which button this event is for.
a937b6aa 1109#
c0ac533b 1110# @down: True for key-down and false for key-up events.
608cfed6
MA
1111#
1112# Since: 2.0
1113##
1114{ 'struct' : 'InputBtnEvent',
1115 'data' : { 'button' : 'InputButton',
1116 'down' : 'bool' } }
1117
1118##
1119# @InputMoveEvent:
1120#
1121# Pointer motion input event.
1122#
26ec4e53 1123# @axis: Which axis is referenced by @value.
a937b6aa
MA
1124#
1125# @value: Pointer position. For absolute coordinates the valid range
1126# is 0 -> 0x7ffff
608cfed6
MA
1127#
1128# Since: 2.0
1129##
1130{ 'struct' : 'InputMoveEvent',
1131 'data' : { 'axis' : 'InputAxis',
1132 'value' : 'int' } }
1133
2bfb10df
SL
1134##
1135# @InputMultiTouchEvent:
1136#
1137# MultiTouch input event.
1138#
1139# @slot: Which slot has generated the event.
1140#
1141# @tracking-id: ID to correlate this event with previously generated
1142# events.
1143#
1144# @axis: Which axis is referenced by @value.
1145#
1146# @value: Contact position.
1147#
1148# Since: 8.1
1149##
1150{ 'struct' : 'InputMultiTouchEvent',
1151 'data' : { 'type' : 'InputMultiTouchType',
1152 'slot' : 'int',
1153 'tracking-id': 'int',
1154 'axis' : 'InputAxis',
1155 'value' : 'int' } }
1156
b6fd5434
MA
1157##
1158# @InputEventKind:
1159#
2bfb10df
SL
1160# @key: a keyboard input event
1161#
1162# @btn: a pointer button input event
1163#
1164# @rel: a relative pointer motion input event
1165#
1166# @abs: an absolute pointer motion input event
1167#
1168# @mtt: a multi-touch input event
1169#
b6fd5434
MA
1170# Since: 2.0
1171##
1172{ 'enum': 'InputEventKind',
2bfb10df 1173 'data': [ 'key', 'btn', 'rel', 'abs', 'mtt' ] }
b6fd5434
MA
1174
1175##
1176# @InputKeyEventWrapper:
1177#
1178# Since: 2.0
1179##
1180{ 'struct': 'InputKeyEventWrapper',
1181 'data': { 'data': 'InputKeyEvent' } }
1182
1183##
1184# @InputBtnEventWrapper:
1185#
1186# Since: 2.0
1187##
1188{ 'struct': 'InputBtnEventWrapper',
1189 'data': { 'data': 'InputBtnEvent' } }
1190
1191##
1192# @InputMoveEventWrapper:
1193#
1194# Since: 2.0
1195##
1196{ 'struct': 'InputMoveEventWrapper',
1197 'data': { 'data': 'InputMoveEvent' } }
1198
2bfb10df
SL
1199##
1200# @InputMultiTouchEventWrapper:
1201#
1202# Since: 8.1
1203##
1204{ 'struct': 'InputMultiTouchEventWrapper',
1205 'data': { 'data': 'InputMultiTouchEvent' } }
1206
608cfed6
MA
1207##
1208# @InputEvent:
1209#
1210# Input event union.
1211#
2bfb10df 1212# @type: the type of input event
608cfed6
MA
1213#
1214# Since: 2.0
1215##
1216{ 'union' : 'InputEvent',
b6fd5434
MA
1217 'base': { 'type': 'InputEventKind' },
1218 'discriminator': 'type',
1219 'data' : { 'key' : 'InputKeyEventWrapper',
1220 'btn' : 'InputBtnEventWrapper',
1221 'rel' : 'InputMoveEventWrapper',
2bfb10df
SL
1222 'abs' : 'InputMoveEventWrapper',
1223 'mtt' : 'InputMultiTouchEventWrapper' } }
608cfed6
MA
1224
1225##
1226# @input-send-event:
1227#
1228# Send input event(s) to guest.
1229#
608cfed6
MA
1230# The @device and @head parameters can be used to send the input event
1231# to specific input devices in case (a) multiple input devices of the
1232# same kind are added to the virtual machine and (b) you have
1233# configured input routing (see docs/multiseat.txt) for those input
1234# devices. The parameters work exactly like the device and head
1235# properties of input devices. If @device is missing, only devices
1236# that have no input routing config are admissible. If @device is
1237# specified, both input devices with and without input routing config
1238# are admissible, but devices with input routing config take
1239# precedence.
1240#
43d7c2d0 1241# @device: display device to send event(s) to.
a937b6aa
MA
1242#
1243# @head: head to send event(s) to, in case the display device supports
1244# multiple scanouts.
1245#
43d7c2d0
PM
1246# @events: List of InputEvent union.
1247#
1248# Returns: Nothing on success.
1249#
608cfed6
MA
1250# Since: 2.6
1251#
1252# Note: The consoles are visible in the qom tree, under
a937b6aa
MA
1253# /backend/console[$index]. They have a device link and head
1254# property, so it is possible to map which console belongs to
1255# which device and display.
608cfed6 1256#
37fa48a4 1257# Examples:
608cfed6
MA
1258#
1259# 1. Press left mouse button.
1260#
1261# -> { "execute": "input-send-event",
1262# "arguments": { "device": "video0",
1263# "events": [ { "type": "btn",
1264# "data" : { "down": true, "button": "left" } } ] } }
1265# <- { "return": {} }
1266#
1267# -> { "execute": "input-send-event",
1268# "arguments": { "device": "video0",
1269# "events": [ { "type": "btn",
1270# "data" : { "down": false, "button": "left" } } ] } }
1271# <- { "return": {} }
1272#
1273# 2. Press ctrl-alt-del.
1274#
1275# -> { "execute": "input-send-event",
1276# "arguments": { "events": [
1277# { "type": "key", "data" : { "down": true,
1278# "key": {"type": "qcode", "data": "ctrl" } } },
1279# { "type": "key", "data" : { "down": true,
1280# "key": {"type": "qcode", "data": "alt" } } },
1281# { "type": "key", "data" : { "down": true,
1282# "key": {"type": "qcode", "data": "delete" } } } ] } }
1283# <- { "return": {} }
1284#
1285# 3. Move mouse pointer to absolute coordinates (20000, 400).
1286#
1287# -> { "execute": "input-send-event" ,
1288# "arguments": { "events": [
1289# { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
1290# { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
1291# <- { "return": {} }
608cfed6
MA
1292##
1293{ 'command': 'input-send-event',
1294 'data': { '*device': 'str',
1295 '*head' : 'int',
1296 'events' : [ 'InputEvent' ] } }
0c8d7065 1297
0c8d7065
GH
1298##
1299# @DisplayGTK:
1300#
1301# GTK display options.
1302#
1303# @grab-on-hover: Grab keyboard input on mouse hover.
a937b6aa 1304#
e8b1386e 1305# @zoom-to-fit: Zoom guest display to fit into the host window. When
a937b6aa
MA
1306# turned off the host window will be resized instead. In case the
1307# display device can notify the guest on window resizes
1308# (virtio-gpu) this will default to "on", assuming the guest will
1309# resize the display to match the window size then. Otherwise it
1310# defaults to "off". (Since 3.1)
1311#
1312# @show-tabs: Display the tab bar for switching between the various
9e272073 1313# graphical interfaces (e.g. VGA and virtual console character
a937b6aa
MA
1314# devices) by default. (Since 7.1)
1315#
1316# @show-menubar: Display the main window menubar. Defaults to "on".
1317# (Since 8.0)
0c8d7065
GH
1318#
1319# Since: 2.12
0c8d7065
GH
1320##
1321{ 'struct' : 'DisplayGTK',
e8b1386e 1322 'data' : { '*grab-on-hover' : 'bool',
c34a9338 1323 '*zoom-to-fit' : 'bool',
dbccb1a5
BM
1324 '*show-tabs' : 'bool',
1325 '*show-menubar' : 'bool' } }
0c8d7065 1326
d4dc4ab1
ES
1327##
1328# @DisplayEGLHeadless:
1329#
1330# EGL headless display options.
1331#
a937b6aa
MA
1332# @rendernode: Which DRM render node should be used. Default is the
1333# first available node on the host.
d4dc4ab1
ES
1334#
1335# Since: 3.1
d4dc4ab1
ES
1336##
1337{ 'struct' : 'DisplayEGLHeadless',
1338 'data' : { '*rendernode' : 'str' } }
1339
142ca628
MAL
1340##
1341# @DisplayDBus:
1342#
1343# DBus display options.
1344#
1345# @addr: The D-Bus bus address (default to the session bus).
1346#
a937b6aa
MA
1347# @rendernode: Which DRM render node should be used. Default is the
1348# first available node on the host.
142ca628 1349#
99997823 1350# @p2p: Whether to use peer-to-peer connections (accepted through
a937b6aa 1351# @add_client).
99997823 1352#
739362d4
MAL
1353# @audiodev: Use the specified DBus audiodev to export audio.
1354#
142ca628 1355# Since: 7.0
142ca628
MAL
1356##
1357{ 'struct' : 'DisplayDBus',
1358 'data' : { '*rendernode' : 'str',
99997823 1359 '*addr': 'str',
739362d4
MAL
1360 '*p2p': 'bool',
1361 '*audiodev': 'str' } }
142ca628 1362
406dfba6
AB
1363##
1364# @DisplayGLMode:
1365#
1366# Display OpenGL mode.
1367#
1368# @off: Disable OpenGL (default).
a937b6aa
MA
1369#
1370# @on: Use OpenGL, pick context type automatically. Would better be
1371# named 'auto' but is called 'on' for backward compatibility with
1372# bool type.
1373#
406dfba6 1374# @core: Use OpenGL with Core (desktop) Context.
a937b6aa 1375#
406dfba6
AB
1376# @es: Use OpenGL with ES (embedded systems) Context.
1377#
1378# Since: 3.0
406dfba6 1379##
fbeed197
MA
1380{ 'enum' : 'DisplayGLMode',
1381 'data' : [ 'off', 'on', 'core', 'es' ] }
62f27922 1382
2f8b7cd5
ST
1383##
1384# @DisplayCurses:
1385#
1386# Curses display options.
1387#
23e46452 1388# @charset: Font charset used by guest (default: CP437).
2f8b7cd5
ST
1389#
1390# Since: 4.0
2f8b7cd5
ST
1391##
1392{ 'struct' : 'DisplayCurses',
1393 'data' : { '*charset' : 'str' } }
1394
48941a52
CE
1395##
1396# @DisplayCocoa:
1397#
1398# Cocoa display options.
1399#
1400# @left-command-key: Enable/disable forwarding of left command key to
a937b6aa
MA
1401# guest. Allows command-tab window switching on the host without
1402# sending this key to the guest when "off". Defaults to "on"
48941a52 1403#
a937b6aa
MA
1404# @full-grab: Capture all key presses, including system combos. This
1405# requires accessibility permissions, since it performs a global
1406# grab on key events. (default: off) See
1407# https://support.apple.com/en-in/guide/mac-help/mh32356/mac
f844cdb9 1408#
a937b6aa
MA
1409# @swap-opt-cmd: Swap the Option and Command keys so that their key
1410# codes match their position on non-Mac keyboards and you can use
1411# Meta/Super and Alt where you expect them. (default: off)
4797adce 1412#
5ec0898b
CE
1413# @zoom-to-fit: Zoom guest display to fit into the host window. When
1414# turned off the host window will be resized instead. Defaults to
1415# "off". (Since 8.2)
1416#
48941a52
CE
1417# Since: 7.0
1418##
1419{ 'struct': 'DisplayCocoa',
1420 'data': {
f844cdb9 1421 '*left-command-key': 'bool',
4797adce 1422 '*full-grab': 'bool',
5ec0898b
CE
1423 '*swap-opt-cmd': 'bool',
1424 '*zoom-to-fit': 'bool'
48941a52
CE
1425 } }
1426
9eafdeea
TH
1427##
1428# @HotKeyMod:
1429#
1430# Set of modifier keys that need to be held for shortcut key actions.
1431#
1432# Since: 7.1
1433##
1434{ 'enum' : 'HotKeyMod',
1435 'data' : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] }
1436
1437##
1438# @DisplaySDL:
1439#
1440# SDL2 display options.
1441#
a937b6aa
MA
1442# @grab-mod: Modifier keys that should be pressed together with the
1443# "G" key to release the mouse grab.
9eafdeea
TH
1444#
1445# Since: 7.1
1446##
1447{ 'struct' : 'DisplaySDL',
1448 'data' : { '*grab-mod' : 'HotKeyMod' } }
1449
0c8d7065
GH
1450##
1451# @DisplayType:
1452#
1453# Display (user interface) type.
1454#
a937b6aa
MA
1455# @default: The default user interface, selecting from the first
1456# available of gtk, sdl, cocoa, and vnc.
42176d77 1457#
a937b6aa
MA
1458# @none: No user interface or video output display. The guest will
1459# still see an emulated graphics card, but its output will not be
1460# displayed to the QEMU user.
42176d77
MAL
1461#
1462# @gtk: The GTK user interface.
1463#
1464# @sdl: The SDL user interface.
1465#
1466# @egl-headless: No user interface, offload GL operations to a local
a937b6aa
MA
1467# DRI device. Graphical display need to be paired with VNC or
1468# Spice. (Since 3.1)
42176d77
MAL
1469#
1470# @curses: Display video output via curses. For graphics device
a937b6aa
MA
1471# models which support a text mode, QEMU can display this output
1472# using a curses/ncurses interface. Nothing is displayed when the
1473# graphics device is in graphical mode or if the graphics device
1474# does not support a text mode. Generally only the VGA device
1475# models support text mode.
42176d77
MAL
1476#
1477# @cocoa: The Cocoa user interface.
1478#
d8aec9d9 1479# @spice-app: Set up a Spice server and run the default associated
a937b6aa
MA
1480# application to connect to it. The server will redirect the
1481# serial console and QEMU monitors. (Since 4.0)
d8aec9d9 1482#
a937b6aa 1483# @dbus: Start a D-Bus service for the display. (Since 7.0)
142ca628 1484#
0c8d7065 1485# Since: 2.12
0c8d7065
GH
1486##
1487{ 'enum' : 'DisplayType',
66c2207f
TH
1488 'data' : [
1489 { 'name': 'default' },
1490 { 'name': 'none' },
8a9f1e1d
MAL
1491 { 'name': 'gtk', 'if': 'CONFIG_GTK' },
1492 { 'name': 'sdl', 'if': 'CONFIG_SDL' },
39324b49 1493 { 'name': 'egl-headless', 'if': 'CONFIG_OPENGL' },
8a9f1e1d
MAL
1494 { 'name': 'curses', 'if': 'CONFIG_CURSES' },
1495 { 'name': 'cocoa', 'if': 'CONFIG_COCOA' },
142ca628
MAL
1496 { 'name': 'spice-app', 'if': 'CONFIG_SPICE' },
1497 { 'name': 'dbus', 'if': 'CONFIG_DBUS_DISPLAY' }
1498 ]
1499}
0c8d7065
GH
1500
1501##
1502# @DisplayOptions:
1503#
1504# Display (user interface) options.
1505#
c0ac533b 1506# @type: Which DisplayType qemu should use.
a937b6aa
MA
1507#
1508# @full-screen: Start user interface in fullscreen mode
1509# (default: off).
1510#
1511# @window-close: Allow to quit qemu with window close button
1512# (default: on).
1513#
1514# @show-cursor: Force showing the mouse cursor (default: off).
1515# (since: 5.0)
1516#
c0ac533b 1517# @gl: Enable OpenGL support (default: off).
0c8d7065
GH
1518#
1519# Since: 2.12
0c8d7065
GH
1520##
1521{ 'union' : 'DisplayOptions',
1522 'base' : { 'type' : 'DisplayType',
1523 '*full-screen' : 'bool',
1524 '*window-close' : 'bool',
7027bdd7 1525 '*show-cursor' : 'bool',
62f27922 1526 '*gl' : 'DisplayGLMode' },
0c8d7065 1527 'discriminator' : 'type',
66c2207f 1528 'data' : {
8a9f1e1d 1529 'gtk': { 'type': 'DisplayGTK', 'if': 'CONFIG_GTK' },
48941a52 1530 'cocoa': { 'type': 'DisplayCocoa', 'if': 'CONFIG_COCOA' },
8a9f1e1d 1531 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' },
66c2207f 1532 'egl-headless': { 'type': 'DisplayEGLHeadless',
39324b49 1533 'if': 'CONFIG_OPENGL' },
9eafdeea
TH
1534 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' },
1535 'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' }
66c2207f
TH
1536 }
1537}
e1ca8f7e
GH
1538
1539##
1540# @query-display-options:
1541#
1542# Returns information about display configuration
1543#
1544# Returns: @DisplayOptions
1545#
1546# Since: 3.1
e1ca8f7e
GH
1547##
1548{ 'command': 'query-display-options',
1549 'returns': 'DisplayOptions' }
9cc07651
ZC
1550
1551##
1552# @DisplayReloadType:
1553#
1554# Available DisplayReload types.
1555#
1556# @vnc: VNC display
1557#
1558# Since: 6.0
9cc07651
ZC
1559##
1560{ 'enum': 'DisplayReloadType',
1561 'data': ['vnc'] }
1562
1563##
1564# @DisplayReloadOptionsVNC:
1565#
1566# Specify the VNC reload options.
1567#
1568# @tls-certs: reload tls certs or not.
1569#
1570# Since: 6.0
9cc07651
ZC
1571##
1572{ 'struct': 'DisplayReloadOptionsVNC',
1573 'data': { '*tls-certs': 'bool' } }
1574
1575##
1576# @DisplayReloadOptions:
1577#
1578# Options of the display configuration reload.
1579#
1580# @type: Specify the display type.
1581#
1582# Since: 6.0
9cc07651
ZC
1583##
1584{ 'union': 'DisplayReloadOptions',
1585 'base': {'type': 'DisplayReloadType'},
1586 'discriminator': 'type',
1587 'data': { 'vnc': 'DisplayReloadOptionsVNC' } }
1588
1589##
1590# @display-reload:
1591#
1592# Reload display configuration.
1593#
1594# Returns: Nothing on success.
1595#
1596# Since: 6.0
1597#
1598# Example:
1599#
1600# -> { "execute": "display-reload",
1601# "arguments": { "type": "vnc", "tls-certs": true } }
1602# <- { "return": {} }
9cc07651
ZC
1603##
1604{ 'command': 'display-reload',
1605 'data': 'DisplayReloadOptions',
1606 'boxed' : true }
abea1946
VSO
1607
1608##
1609# @DisplayUpdateType:
1610#
1611# Available DisplayUpdate types.
1612#
1613# @vnc: VNC display
1614#
1615# Since: 7.1
abea1946
VSO
1616##
1617{ 'enum': 'DisplayUpdateType',
1618 'data': ['vnc'] }
1619
1620##
1621# @DisplayUpdateOptionsVNC:
1622#
1623# Specify the VNC reload options.
1624#
a937b6aa
MA
1625# @addresses: If specified, change set of addresses to listen for
1626# connections. Addresses configured for websockets are not
1627# touched.
abea1946
VSO
1628#
1629# Since: 7.1
abea1946
VSO
1630##
1631{ 'struct': 'DisplayUpdateOptionsVNC',
1632 'data': { '*addresses': ['SocketAddress'] } }
1633
1634##
1635# @DisplayUpdateOptions:
1636#
1637# Options of the display configuration reload.
1638#
1639# @type: Specify the display type.
1640#
1641# Since: 7.1
abea1946
VSO
1642##
1643{ 'union': 'DisplayUpdateOptions',
1644 'base': {'type': 'DisplayUpdateType'},
1645 'discriminator': 'type',
1646 'data': { 'vnc': 'DisplayUpdateOptionsVNC' } }
1647
1648##
1649# @display-update:
1650#
1651# Update display configuration.
1652#
1653# Returns: Nothing on success.
1654#
1655# Since: 7.1
1656#
1657# Example:
1658#
1659# -> { "execute": "display-update",
1660# "arguments": { "type": "vnc", "addresses":
1661# [ { "type": "inet", "host": "0.0.0.0",
1662# "port": "5901" } ] } }
1663# <- { "return": {} }
abea1946
VSO
1664##
1665{ 'command': 'display-update',
1666 'data': 'DisplayUpdateOptions',
1667 'boxed' : true }
f9e1ef74
JQ
1668
1669##
1670# @client_migrate_info:
1671#
1672# Set migration information for remote display. This makes the server
1673# ask the client to automatically reconnect using the new parameters
1674# once migration finished successfully. Only implemented for SPICE.
1675#
1676# @protocol: must be "spice"
a937b6aa 1677#
f9e1ef74 1678# @hostname: migration target hostname
a937b6aa 1679#
f9e1ef74 1680# @port: spice tcp port for plaintext channels
a937b6aa 1681#
f9e1ef74 1682# @tls-port: spice tcp port for tls-secured channels
a937b6aa 1683#
f9e1ef74
JQ
1684# @cert-subject: server certificate subject
1685#
1686# Since: 0.14
1687#
1688# Example:
1689#
1690# -> { "execute": "client_migrate_info",
1691# "arguments": { "protocol": "spice",
1692# "hostname": "virt42.lab.kraxel.org",
1693# "port": 1234 } }
1694# <- { "return": {} }
f9e1ef74
JQ
1695##
1696{ 'command': 'client_migrate_info',
1697 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1698 '*tls-port': 'int', '*cert-subject': 'str' } }