File: switch.xml

package info (click to toggle)
xcffib 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: python: 2,293; haskell: 915; xml: 680; makefile: 84; sh: 14
file content (93 lines) | stat: -rw-r--r-- 2,896 bytes parent folder | download | duplicates (3)
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
<!-- based on xinput and sync -->
<xcb header="switch">

  <xidtype name="COUNTER" />

  <struct name="INT64">
    <field type="INT32" name="hi" />
    <field type="CARD32" name="lo" />
  </struct>

  <request name="GetProperty" opcode="59">
    <field type="CARD32"  name="value_mask" enum="CA" />
    <!-- a switch in a request with field bitcases (see sync) -->
    <switch name="items">
      <fieldref>value_mask</fieldref>
      <bitcase>
        <enumref ref="CA">Counter</enumref>
        <field type="COUNTER" name="counter" />
      </bitcase>
      <bitcase>
        <enumref ref="CA">Value</enumref>
        <field type="switch:INT64" name="value" />
      </bitcase>
      <bitcase>
        <enumref ref="CA">ValueType</enumref>
        <field type="CARD32" name="valueType" />
      </bitcase>
      <bitcase>
        <enumref ref="CA">Events</enumref>
        <field type="CARD32" name="events" />
      </bitcase>
    </switch>
    <reply>
      <field type="CARD32" name="num_items" />
      <field type="CARD8"  name="format" enum="PropertyFormat" />
      <!-- a switch in a reply with list bitcases (see sync) -->
      <switch name="items">
        <fieldref>format</fieldref>
        <bitcase>
          <enumref ref="PropertyFormat">8Bits</enumref>
          <list type="CARD8" name="data8">
            <fieldref>num_items</fieldref>
          </list>
        </bitcase>
        <bitcase>
          <enumref ref="PropertyFormat">16Bits</enumref>
          <list type="CARD16" name="data16">
            <fieldref>num_items</fieldref>
          </list>
        </bitcase>
        <bitcase>
          <enumref ref="PropertyFormat">32Bits</enumref>
          <list type="CARD32" name="data32">
            <fieldref>num_items</fieldref>
          </list>
        </bitcase>
      </switch>
    </reply>
  </request>

  <request name="GetPropertyWithPad" opcode="60">
    <reply>
      <field type="CARD32" name="num_items" />
      <field type="CARD8"  name="format" enum="PropertyFormat" />
      <list type="CARD8" name="names">
        <fieldref>num_items</fieldref>
      </list>
      <!-- a switch in a reply with list bitcases that need pads (see sync) -->
      <switch name="items">
        <fieldref>format</fieldref>
        <bitcase>
          <enumref ref="PropertyFormat">8Bits</enumref>
          <list type="CARD8" name="data8">
            <fieldref>num_items</fieldref>
          </list>
        </bitcase>
        <bitcase>
          <enumref ref="PropertyFormat">16Bits</enumref>
          <list type="CARD16" name="data16">
            <fieldref>num_items</fieldref>
          </list>
        </bitcase>
        <bitcase>
          <enumref ref="PropertyFormat">32Bits</enumref>
          <list type="CARD32" name="data32">
            <fieldref>num_items</fieldref>
          </list>
        </bitcase>
      </switch>
    </reply>
  </request>

</xcb>