ui.json 42 KB

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