aboutsummaryrefslogtreecommitdiff
path: root/ui/dbus-display1.xml
blob: ce35d64eea18ea2783b70216246d5c457477a18f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
<?xml version="1.0" encoding="utf-8"?>
<node>
  <!--
      org.qemu.Display1.VM:

      This interface is implemented on ``/org/qemu/Display1/VM``.
  -->
  <interface name="org.qemu.Display1.VM">
    <!--
        Name:

        The name of the VM.
    -->
    <property name="Name" type="s" access="read"/>

    <!--
        UUID:

        The UUID of the VM.
    -->
    <property name="UUID" type="s" access="read"/>

    <!--
        ConsoleIDs:

        The list of consoles available on ``/org/qemu/Display1/Console_$id``.
    -->
    <property name="ConsoleIDs" type="au" access="read"/>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        /org/qemu/Display1/VM object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Console:

      This interface is implemented on ``/org/qemu/Display1/Console_$id``. You
      may discover available consoles through introspection or with the
      :dbus:prop:`org.qemu.Display1.VM.ConsoleIDs` property.

      A console is attached to a video device head. It may be "Graphic" or
      "Text" (see :dbus:prop:`Type` and other properties).

      Interactions with a console may be done with
      :dbus:iface:`org.qemu.Display1.Keyboard`,
      :dbus:iface:`org.qemu.Display1.Mouse` and
      :dbus:iface:`org.qemu.Display1.MultiTouch` interfaces when available.
  -->
  <interface name="org.qemu.Display1.Console">
    <!--
        RegisterListener:
        @listener: a Unix socket FD, for peer-to-peer D-Bus communication.

        Register a console listener, which will receive display updates, until
        it is disconnected.

        Multiple listeners may be registered simultaneously.

        The listener is expected to implement the
        :dbus:iface:`org.qemu.Display1.Listener` interface.
    -->
    <method name="RegisterListener">
      <?if $(env.HOST_OS) == windows?>
      <arg type="ay" name="listener" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
      <?else?>
      <arg type="h" name="listener" direction="in"/>
      <?endif?>
    </method>

    <!--
        SetUIInfo:
        @width_mm: the physical display width in millimeters.
        @height_mm: the physical display height in millimeters.
        @xoff: horizontal offset, in pixels.
        @yoff: vertical offset, in pixels.
        @width: console width, in pixels.
        @height: console height, in pixels.

        Modify the dimensions and display settings.
    -->
    <method name="SetUIInfo">
      <arg name="width_mm" type="q" direction="in"/>
      <arg name="height_mm" type="q" direction="in"/>
      <arg name="xoff" type="i" direction="in"/>
      <arg name="yoff" type="i" direction="in"/>
      <arg name="width" type="u" direction="in"/>
      <arg name="height" type="u" direction="in"/>
    </method>

    <!--
        Label:

        A user-friendly name for the console (for ex: "VGA").
    -->
    <property name="Label" type="s" access="read"/>

    <!--
        Head:

        Graphical device head number.
    -->
    <property name="Head" type="u" access="read"/>

    <!--
        Type:

        Console type ("Graphic" or "Text").
    -->
    <property name="Type" type="s" access="read"/>

    <!--
        Width:

        Console width, in pixels.
    -->
    <property name="Width" type="u" access="read"/>

    <!--
        Height:

        Console height, in pixels.
    -->
    <property name="Height" type="u" access="read"/>

    <!--
        DeviceAddress:

        The device address (ex: "pci/0000/02.0").
    -->
    <property name="DeviceAddress" type="s" access="read"/>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        ``/org/qemu/Display1/Console_$id`` object, and can be used to detect the
        capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Keyboard:

      This interface is optionally implemented on
      ``/org/qemu/Display1/Console_$id`` (see
      :dbus:iface:`~org.qemu.Display1.Console`).
  -->
  <interface name="org.qemu.Display1.Keyboard">
    <!--
        Press:
        @keycode: QEMU key number (xtkbd + special re-encoding of high bit)

        Send a key press event.
    -->
    <method name="Press">
      <arg type="u" name="keycode" direction="in"/>
    </method>

    <!--
        Release:
        @keycode: QEMU key number (xtkbd + special re-encoding of high bit)

        Send a key release event.
    -->
    <method name="Release">
      <arg type="u" name="keycode" direction="in"/>
    </method>

    <!--
        Modifiers:

        The active keyboard modifiers::

          Scroll = 1 << 0
          Num    = 1 << 1
          Caps   = 1 << 2
    -->
    <property name="Modifiers" type="u" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Mouse:

      This interface is optionally implemented on
      ``/org/qemu/Display1/Console_$id`` (see
      :dbus:iface:`~org.qemu.Display1.Console` documentation).

      .. _dbus-button-values:

      **Button values**::

        Left       = 0
        Middle     = 1
        Right      = 2
        Wheel-up   = 3
        Wheel-down = 4
        Side       = 5
        Extra      = 6
  -->
  <interface name="org.qemu.Display1.Mouse">
    <!--
        Press:
        @button: :ref:`button value<dbus-button-values>`.

        Send a mouse button press event.
    -->
    <method name="Press">
      <arg type="u" name="button" direction="in"/>
    </method>

    <!--
        Release:
        @button: :ref:`button value<dbus-button-values>`.

        Send a mouse button release event.
    -->
    <method name="Release">
      <arg type="u" name="button" direction="in"/>
    </method>

    <!--
        SetAbsPosition:
        @x: X position, in pixels.
        @y: Y position, in pixels.

        Set the mouse pointer position.

        Returns an error if not :dbus:prop:`IsAbsolute`.
    -->
    <method name="SetAbsPosition">
      <arg type="u" name="x" direction="in"/>
      <arg type="u" name="y" direction="in"/>
    </method>

    <!--
        RelMotion:
        @dx: X-delta, in pixels.
        @dy: Y-delta, in pixels.

        Move the mouse pointer position, relative to the current position.

        Returns an error if :dbus:prop:`IsAbsolute`.
    -->
    <method name="RelMotion">
      <arg type="i" name="dx" direction="in"/>
      <arg type="i" name="dy" direction="in"/>
    </method>

    <!--
        IsAbsolute:

        Whether the mouse is using absolute movements.
    -->
    <property name="IsAbsolute" type="b" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.MultiTouch:

      This interface in implemented on ``/org/qemu/Display1/Console_$id`` (see
      :dbus:iface:`~org.qemu.Display1.Console` documentation).

      .. _dbus-kind-values:

      **Kind values**::

        Begin       = 0
        Update      = 1
        End         = 2
        Cancel      = 3
  -->
  <interface name="org.qemu.Display1.MultiTouch">
    <!--
        SendEvent:
        @kind: The touch event kind
        @num_slot: The slot number.
        @x: The x coordinates.
        @y: The y coordinates.

        Send a touch gesture event.
    -->
    <method name="SendEvent">
      <arg type="u" name="kind" direction="in"/>
      <arg type="t" name="num_slot" direction="in"/>
      <arg type="d" name="x" direction="in"/>
      <arg type="d" name="y" direction="in"/>
    </method>

    <!--
        MaxSlots:

        The maximum number of slots.
    -->
    <property name="MaxSlots" type="i" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Listener:

      This client-side interface must be available on
      ``/org/qemu/Display1/Listener`` when registering the peer-to-peer
      connection with :dbus:meth:`~org.qemu.Display1.Console.Register`.
  -->
  <interface name="org.qemu.Display1.Listener">
    <!--
        Scanout:
        @width: display width, in pixels.
        @height: display height, in pixels.
        @stride: data stride, in bytes.
        @pixman_format: image format (ex: ``PIXMAN_X8R8G8B8``).
        @data: image data.

        Resize and update the display content.

        The data to transfer for the display update may be large. The preferred
        scanout method is :dbus:meth:`ScanoutDMABUF`, used whenever possible.
    -->
    <method name="Scanout">
      <arg type="u" name="width" direction="in"/>
      <arg type="u" name="height" direction="in"/>
      <arg type="u" name="stride" direction="in"/>
      <arg type="u" name="pixman_format" direction="in"/>
      <arg type="ay" name="data" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Update:
        @x: X update position, in pixels.
        @y: Y update position, in pixels.
        @width: update width, in pixels.
        @height: update height, in pixels.
        @stride: data stride, in bytes.
        @pixman_format: image format (ex: ``PIXMAN_X8R8G8B8``).
        @data: display image data.

        Update the display content.

        This method is only called after a :dbus:meth:`Scanout` call.
    -->
    <method name="Update">
      <arg type="i" name="x" direction="in"/>
      <arg type="i" name="y" direction="in"/>
      <arg type="i" name="width" direction="in"/>
      <arg type="i" name="height" direction="in"/>
      <arg type="u" name="stride" direction="in"/>
      <arg type="u" name="pixman_format" direction="in"/>
      <arg type="ay" name="data" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <?if $(env.HOST_OS) != windows?>
    <!--
        ScanoutDMABUF:
        @dmabuf: the DMABUF file descriptor.
        @width: display width, in pixels.
        @height: display height, in pixels.
        @stride: stride, in bytes.
        @fourcc: DMABUF fourcc.
        @modifier: DMABUF modifier.
        @y0_top: whether Y position 0 is the top or not.

        Resize and update the display content with a DMABUF.
    -->
    <method name="ScanoutDMABUF">
      <arg type="h" name="dmabuf" direction="in"/>
      <arg type="u" name="width" direction="in"/>
      <arg type="u" name="height" direction="in"/>
      <arg type="u" name="stride" direction="in"/>
      <arg type="u" name="fourcc" direction="in"/>
      <!-- xywh? -->
      <arg type="t" name="modifier" direction="in"/>
      <arg type="b" name="y0_top" direction="in"/>
    </method>

    <!--
        UpdateDMABUF:
        @x: the X update position, in pixels.
        @y: the Y update position, in pixels.
        @width: the update width, in pixels.
        @height: the update height, in pixels.

        Update the display content with the current DMABUF and the given region.
    -->
    <method name="UpdateDMABUF">
      <arg type="i" name="x" direction="in"/>
      <arg type="i" name="y" direction="in"/>
      <arg type="i" name="width" direction="in"/>
      <arg type="i" name="height" direction="in"/>
    </method>
    <?endif?>

    <!--
        Disable:

        Disable the display (turn it off).
    -->
    <method name="Disable">
    </method>

    <!--
        MouseSet:
        @x: X mouse position, in pixels.
        @y: Y mouse position, in pixels.
        @on: whether the mouse is visible or not.

        Set the mouse position and visibility.
    -->
    <method name="MouseSet">
      <arg type="i" name="x" direction="in"/>
      <arg type="i" name="y" direction="in"/>
      <arg type="i" name="on" direction="in"/>
    </method>

    <!--
        CursorDefine:
        @width: cursor width, in pixels.
        @height: cursor height, in pixels.
        @hot_x: hot-spot X position, in pixels.
        @hot_y: hot-spot Y position, in pixels.
        @data: the cursor data.

        Set the mouse cursor shape and hot-spot. The "data" must be ARGB, 32-bit
        per pixel.
    -->
    <method name="CursorDefine">
      <arg type="i" name="width" direction="in"/>
      <arg type="i" name="height" direction="in"/>
      <arg type="i" name="hot_x" direction="in"/>
      <arg type="i" name="hot_y" direction="in"/>
      <arg type="ay" name="data" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        /org/qemu/Display1/Listener object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Listener.Win32.Map:

      This optional client-side interface can complement
      org.qemu.Display1.Listener on ``/org/qemu/Display1/Listener`` for Windows
      specific shared memory scanouts.
  -->
  <interface name="org.qemu.Display1.Listener.Win32.Map">
    <!--
        ScanoutMap:
        @handle: the shared map handle value.
        @offset: mapping offset.
        @width: display width, in pixels.
        @height: display height, in pixels.
        @stride: stride, in bytes.
        @pixman_format: image format (ex: ``PIXMAN_X8R8G8B8``).

        Resize and update the display content with a shared map.
    -->
    <method name="ScanoutMap">
      <arg type="t" name="handle" direction="in"/>
      <arg type="u" name="offset" direction="in"/>
      <arg type="u" name="width" direction="in"/>
      <arg type="u" name="height" direction="in"/>
      <arg type="u" name="stride" direction="in"/>
      <arg type="u" name="pixman_format" direction="in"/>
    </method>

    <!--
        UpdateMap:
        @x: the X update position, in pixels.
        @y: the Y update position, in pixels.
        @width: the update width, in pixels.
        @height: the update height, in pixels.

        Update the display content with the current shared map and the given region.
    -->
    <method name="UpdateMap">
      <arg type="i" name="x" direction="in"/>
      <arg type="i" name="y" direction="in"/>
      <arg type="i" name="width" direction="in"/>
      <arg type="i" name="height" direction="in"/>
    </method>
  </interface>

  <!--
      org.qemu.Display1.Listener.Win32.D3d11:

      This optional client-side interface can complement
      org.qemu.Display1.Listener on ``/org/qemu/Display1/Listener`` for Windows
      specific Direct3D texture sharing of the scanouts.
  -->
  <interface name="org.qemu.Display1.Listener.Win32.D3d11">
    <!--
        ScanoutTexture2d:
        @handle: the NT handle for the shared texture (to be opened back with ID3D11Device1::OpenSharedResource1).
        @texture_width: texture width, in pixels.
        @texture_height: texture height, in pixels.
        @y0_top: whether Y position 0 is the top or not.
        @x: the X scanout position, in pixels.
        @y: the Y scanout position, in pixels.
        @width: the scanout width, in pixels.
        @height: the scanout height, in pixels.

        Resize and update the display content with a Direct3D 11 2D texture.
        You must acquire and release the associated KeyedMutex 0 during rendering.
    -->
    <method name="ScanoutTexture2d">
      <arg type="t" name="handle" direction="in"/>
      <arg type="u" name="texture_width" direction="in"/>
      <arg type="u" name="texture_height" direction="in"/>
      <arg type="b" name="y0_top" direction="in"/>
      <arg type="u" name="x" direction="in"/>
      <arg type="u" name="y" direction="in"/>
      <arg type="u" name="width" direction="in"/>
      <arg type="u" name="height" direction="in"/>
    </method>

    <!--
        UpdateTexture2d:
        @x: the X update position, in pixels.
        @y: the Y update position, in pixels.
        @width: the update width, in pixels.
        @height: the update height, in pixels.

        Update the display content with the current Direct3D 2D texture and the given region.
        You must acquire and release the associated KeyedMutex 0 during rendering.
    -->
    <method name="UpdateTexture2d">
      <arg type="i" name="x" direction="in"/>
      <arg type="i" name="y" direction="in"/>
      <arg type="i" name="width" direction="in"/>
      <arg type="i" name="height" direction="in"/>
    </method>
  </interface>

  <!--
      org.qemu.Display1.Clipboard:

      This interface must be implemented by both the client and the server on
      ``/org/qemu/Display1/Clipboard`` to support clipboard sharing between
      the client and the guest.

      Once :dbus:meth:`Register`'ed, method calls may be sent and received in both
      directions. Unregistered callers will get error replies.

      .. _dbus-clipboard-selection:

      **Selection values**::

        Clipboard   = 0
        Primary     = 1
        Secondary   = 2

      .. _dbus-clipboard-serial:

      **Serial counter**

      To solve potential clipboard races, clipboard grabs have an associated
      serial counter. It is set to 0 on registration, and incremented by 1 for
      each grab. The peer with the highest serial is the clipboard grab owner.

      When a grab with a lower serial is received, it should be discarded.

      When a grab is attempted with the same serial number as the current grab,
      the one coming from the client should have higher priority, and the client
      should gain clipboard grab ownership.
  -->
  <interface name="org.qemu.Display1.Clipboard">
    <!--
        Register:

        Register a clipboard session and reinitialize the serial counter.

        The client must register itself, and is granted an exclusive
        access for handling the clipboard.

        The server can reinitialize the session as well (to reset the counter).
    -->
    <method name="Register"/>

    <!--
        Unregister:

        Unregister the clipboard session.
    -->
    <method name="Unregister"/>
    <!--
        Grab:
        @selection: a :ref:`selection value<dbus-clipboard-selection>`.
        @serial: the current grab :ref:`serial<dbus-clipboard-serial>`.
        @mimes: the list of available content MIME types.

        Grab the clipboard, claiming current clipboard content.
    -->
    <method name="Grab">
      <arg type="u" name="selection"/>
      <arg type="u" name="serial"/>
      <arg type="as" name="mimes"/>
    </method>

    <!--
        Release:
        @selection: a :ref:`selection value<dbus-clipboard-selection>`.

        Release the clipboard (does nothing if not the current owner).
    -->
    <method name="Release">
      <arg type="u" name="selection"/>
    </method>

    <!--
        Request:
        @selection: a :ref:`selection value<dbus-clipboard-selection>`
        @mimes: requested MIME types (by order of preference).
        @reply_mime: the returned data MIME type.
        @data: the clipboard data.

        Request the clipboard content.

        Return an error if the clipboard is empty, or the requested MIME types
        are unavailable.
    -->
    <method name="Request">
      <arg type="u" name="selection"/>
      <arg type="as" name="mimes"/>
      <arg type="s" name="reply_mime" direction="out"/>
      <arg type="ay" name="data" direction="out">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        /org/qemu/Display1/Clipboard object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Audio:

      Audio backend may be available on ``/org/qemu/Display1/Audio``.
  -->
  <interface name="org.qemu.Display1.Audio">
    <!--
        RegisterOutListener:
        @listener: a Unix socket FD, for peer-to-peer D-Bus communication.

        Register an audio backend playback handler.

        Multiple listeners may be registered simultaneously.

        The listener is expected to implement the
        :dbus:iface:`org.qemu.Display1.AudioOutListener` interface.
    -->
    <method name="RegisterOutListener">
      <?if $(env.HOST_OS) == windows?>
      <arg type="ay" name="listener" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
      <?else?>
      <arg type="h" name="listener" direction="in"/>
      <?endif?>
    </method>

    <!--
        RegisterInListener:
        @listener: a Unix socket FD, for peer-to-peer D-Bus communication.

        Register an audio backend record handler.

        Multiple listeners may be registered simultaneously.

        The listener is expected to implement the
        :dbus:iface:`org.qemu.Display1.AudioInListener` interface.
    -->
    <method name="RegisterInListener">
      <?if $(env.HOST_OS) == windows?>
      <arg type="ay" name="listener" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
      <?else?>
      <arg type="h" name="listener" direction="in"/>
      <?endif?>
    </method>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        /org/qemu/Display1/Audio object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.AudioOutListener:

      This client-side interface must be available on
      ``/org/qemu/Display1/AudioOutListener`` when registering the peer-to-peer
      connection with :dbus:meth:`~org.qemu.Display1.Audio.RegisterOutListener`.
  -->
  <interface name="org.qemu.Display1.AudioOutListener">
    <!--
        Init:
        @id: the stream ID.
        @bits: PCM bits per sample.
        @is_signed: whether the PCM data is signed.
        @is_float: PCM floating point format.
        @freq: the PCM frequency in Hz.
        @nchannels: the number of channels.
        @bytes_per_frame: the bytes per frame.
        @bytes_per_second: the bytes per second.
        @be: whether using big-endian format.

        Initializes a PCM playback stream.
    -->
    <method name="Init">
      <arg name="id" type="t" direction="in"/>
      <arg name="bits" type="y" direction="in"/>
      <arg name="is_signed" type="b" direction="in"/>
      <arg name="is_float" type="b" direction="in"/>
      <arg name="freq" type="u" direction="in"/>
      <arg name="nchannels" type="y" direction="in"/>
      <arg name="bytes_per_frame" type="u" direction="in"/>
      <arg name="bytes_per_second" type="u" direction="in"/>
      <arg name="be" type="b" direction="in"/>
    </method>

    <!--
        Fini:
        @id: the stream ID.

        Finish & close a playback stream.
    -->
    <method name="Fini">
      <arg name="id" type="t" direction="in"/>
    </method>

    <!--
        SetEnabled:
        @id: the stream ID.

        Resume or suspend the playback stream.
    -->
    <method name="SetEnabled">
      <arg name="id" type="t" direction="in"/>
      <arg name="enabled" type="b" direction="in"/>
    </method>

    <!--
        SetVolume:
        @id: the stream ID.
        @mute: whether the stream is muted.
        @volume: the volume per-channel.

        Set the stream volume and mute state (volume without unit, 0-255).
    -->
    <method name="SetVolume">
      <arg name="id" type="t" direction="in"/>
      <arg name="mute" type="b" direction="in"/>
      <arg name="volume" type="ay" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Write:
        @id: the stream ID.
        @data: the PCM data.

        PCM stream to play.
    -->
    <method name="Write">
      <arg name="id" type="t" direction="in"/>
      <arg type="ay" name="data" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        /org/qemu/Display1/AudioOutListener object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.AudioInListener:

      This client-side interface must be available on
      ``/org/qemu/Display1/AudioInListener`` when registering the peer-to-peer
      connection with :dbus:meth:`~org.qemu.Display1.Audio.RegisterInListener`.
  -->
  <interface name="org.qemu.Display1.AudioInListener">
    <!--
        Init:
        @id: the stream ID.
        @bits: PCM bits per sample.
        @is_signed: whether the PCM data is signed.
        @is_float: PCM floating point format.
        @freq: the PCM frequency in Hz.
        @nchannels: the number of channels.
        @bytes_per_frame: the bytes per frame.
        @bytes_per_second: the bytes per second.
        @be: whether using big-endian format.

        Initializes a PCM record stream.
    -->
    <method name="Init">
      <arg name="id" type="t" direction="in"/>
      <arg name="bits" type="y" direction="in"/>
      <arg name="is_signed" type="b" direction="in"/>
      <arg name="is_float" type="b" direction="in"/>
      <arg name="freq" type="u" direction="in"/>
      <arg name="nchannels" type="y" direction="in"/>
      <arg name="bytes_per_frame" type="u" direction="in"/>
      <arg name="bytes_per_second" type="u" direction="in"/>
      <arg name="be" type="b" direction="in"/>
    </method>

    <!--
        Fini:
        @id: the stream ID.

        Finish & close a record stream.
    -->
    <method name="Fini">
      <arg name="id" type="t" direction="in"/>
    </method>

    <!--
        SetEnabled:
        @id: the stream ID.

        Resume or suspend the record stream.
    -->
    <method name="SetEnabled">
      <arg name="id" type="t" direction="in"/>
      <arg name="enabled" type="b" direction="in"/>
    </method>

    <!--
        SetVolume:
        @id: the stream ID.
        @mute: whether the stream is muted.
        @volume: the volume per-channel.

        Set the stream volume and mute state (volume without unit, 0-255).
    -->
    <method name="SetVolume">
      <arg name="id" type="t" direction="in"/>
      <arg name="mute" type="b" direction="in"/>
      <arg name="volume" type="ay" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Read:
        @id: the stream ID.
        @size: the amount to read, in bytes.
        @data: the recorded data (which may be less than requested).

        Read "size" bytes from the record stream.
    -->
    <method name="Read">
      <arg name="id" type="t" direction="in"/>
      <arg name="size" type="t" direction="in"/>
      <arg type="ay" name="data" direction="out">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
    </method>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        /org/qemu/Display1/AudioInListener object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>

  <!--
      org.qemu.Display1.Chardev:

      Character devices may be available on ``/org/qemu/Display1/Chardev_$id``.

      They may be used for different kind of streams, which are identified via
      their FQDN :dbus:prop:`Name`.

      .. _dbus-chardev-fqdn:

      Here are some known reserved kind names (the ``org.qemu`` prefix is
      reserved by QEMU):

      org.qemu.console.serial.0
        A serial console stream.

      org.qemu.monitor.hmp.0
        A QEMU HMP human monitor.

      org.qemu.monitor.qmp.0
        A QEMU QMP monitor.

      org.qemu.usbredir
        A usbredir stream.
  -->
  <interface name="org.qemu.Display1.Chardev">
    <!--
        Register:
        @stream: a Unix FD to redirect the stream to.

        Register a file-descriptor for the stream handling.

        The current handler, if any, will be replaced.
    -->
    <method name="Register">
      <?if $(env.HOST_OS) == windows?>
      <arg type="ay" name="listener" direction="in">
        <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
      </arg>
      <?else?>
      <arg type="h" name="stream" direction="in"/>
      <?endif?>
    </method>

    <!--
        SendBreak:

        Send a break event to the character device.
    -->
    <method name="SendBreak"/>

    <!--
        Name:

        The FQDN name to identify the kind of stream. See :ref:`reserved
        names<dbus-chardev-fqdn>`.
    -->
    <property name="Name" type="s" access="read"/>

    <!--
        FEOpened:

        Whether the front-end side is opened.
    -->
    <property name="FEOpened" type="b" access="read"/>

    <!--
        Echo:

        Whether the input should be echo'ed (for serial streams).
    -->
    <property name="Echo" type="b" access="read"/>

    <!--
        Owner:

        The D-Bus unique name of the registered handler.
    -->
    <property name="Owner" type="s" access="read"/>

    <!--
        Interfaces:

        This property lists extra interfaces provided by the
        ``/org/qemu/Display1/Chardev_$i`` object, and can be used to detect
        the capabilities with which they are communicating.

        Unlike the standard D-Bus Introspectable interface, querying this
        property does not require parsing XML.

        (earlier version of the display interface do not provide this property)
    -->
    <property name="Interfaces" type="as" access="read"/>
  </interface>
</node>