detached ba4ad52

chore(repo): bootstrap module and pinned xcb-proto sources

commit
ba4ad521151d3500de111a037937f8e1dd3922d2
author
brice · · 2026-10-22 06:12 UTC
parent
none (root commit)
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
checks
2/2
21 files · +8123 -0
A .github/workflows/ci.yml +29 -0
@@ -0,0 +1,29 @@
1+name: ci
2+on:
3+ push:
4+ branches: [main]
5+ pull_request:
6+permissions:
7+ contents: read
8+jobs:
9+ check:
10+ runs-on: ubuntu-latest
11+ steps:
12+ - uses: actions/checkout@v4
13+ - uses: actions/setup-go@v5
14+ with:
15+ go-version-file: go.mod
16+ - name: Install X server test tools
17+ run: sudo apt-get update && sudo apt-get install -y xvfb xtrace
18+ - name: Check
19+ run: make check STATICCHECK='go run honnef.co/go/tools/cmd/staticcheck@2026.2.2'
20+ - name: X server tests
21+ run: make xserver
22+ gen-check:
23+ runs-on: ubuntu-latest
24+ steps:
25+ - uses: actions/checkout@v4
26+ - uses: actions/setup-go@v5
27+ with:
28+ go-version-file: go.mod
29+ - run: make gen-check
A .gitignore +1 -0
@@ -0,0 +1,1 @@
1+.worktrees/
A AGENTS.md +17 -0
@@ -0,0 +1,17 @@
1+# Repository rules
2+
3+- Go 1.27; builds use CGO_ENABLED=0. Race tests alone use CGO_ENABLED=1.
4+- Dependencies: standard library and golang.org/x/sys only.
5+- Steady-state request/reply/event/error hot paths must allocate zero times;
6+ enforce with testing.AllocsPerRun tests and benchmarks. Setup and amortized
7+ buffer growth may allocate. Caller-owned buffers and borrowed views are preferred.
8+- Root never imports generated packages. Generated packages import root and,
9+ for extensions, xproto. Wire format is little-endian.
10+- Requests return Seq (0 invalid); sticky Buf errors stop encoding. Reply views
11+ live only through the callback. Event Raw is copied; Tail is borrowed.
12+- Generate bindings from the pinned manifest; do not hand-edit generated code.
13+- Run make check before committing. Use signed conventional commits:
14+ type(scope): description. Feature work belongs in .worktrees/; do not merge
15+ without review. Forge is ermite only; never add or push a GitHub remote.
16+- The binding spec is private; the above summarizes its key public contracts.
17+ Stop and ask before making an unspecified public-contract decision.
A LICENSE +21 -0
@@ -0,0 +1,21 @@
1+MIT License
2+
3+Copyright (c) 2026 bnema
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+SOFTWARE.⏎̸
A LICENSES/xcb-proto-COPYING +30 -0
@@ -0,0 +1,30 @@
1+Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
2+All Rights Reserved.
3+
4+Permission is hereby granted, free of charge, to any person
5+obtaining a copy of this software and associated
6+documentation files (the "Software"), to deal in the
7+Software without restriction, including without limitation
8+the rights to use, copy, modify, merge, publish, distribute,
9+sublicense, and/or sell copies of the Software, and to
10+permit persons to whom the Software is furnished to do so,
11+subject to the following conditions:
12+
13+The above copyright notice and this permission notice shall
14+be included in all copies or substantial portions of the
15+Software.
16+
17+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
18+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
19+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
20+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
21+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+OTHER DEALINGS IN THE SOFTWARE.
25+
26+Except as contained in this notice, the names of the authors
27+or their institutions shall not be used in advertising or
28+otherwise to promote the sale, use or other dealings in this
29+Software without prior written authorization from the
30+authors.
A Makefile +27 -0
@@ -0,0 +1,27 @@
1+export CGO_ENABLED := 0
2+STATICCHECK ?= staticcheck
3+
4+.PHONY: gen gen-check test race alloc poison bench xserver staticcheck vet check
5+
6+gen:
7+ go generate ./...
8+gen-check: gen
9+ git diff --exit-code
10+
11+test:
12+ go test ./...
13+race:
14+ CGO_ENABLED=1 go test -race ./...
15+alloc:
16+ go test -run 'Alloc' ./...
17+poison:
18+ go test -tags xturbo_poison ./...
19+bench:
20+ go test -bench . -benchmem ./...
21+xserver:
22+ PATH="$$PATH:/usr/sbin" go test -tags xserver ./...
23+staticcheck:
24+ $(STATICCHECK) ./...
25+vet:
26+ go vet ./...
27+check: vet staticcheck test race alloc poison gen-check
A cmd/xtgen/main.go +4 -0
@@ -0,0 +1,4 @@
1+// Command xtgen generates bindings from the pinned xcb-proto XML.
2+package main
3+
4+func main() {}
A cmd/xtsync/main.go +126 -0
@@ -0,0 +1,126 @@
1+// Command xtsync vendors the pinned xcb-proto sources. An explicit -source
2+// directory supports offline refreshes; its provenance is retained in manifest.
3+package main
4+
5+import (
6+ "archive/tar"
7+ "bytes"
8+ "compress/gzip"
9+ "crypto/sha256"
10+ "encoding/hex"
11+ "encoding/json"
12+ "flag"
13+ "fmt"
14+ "io"
15+ "net/http"
16+ "os"
17+ "path/filepath"
18+ "time"
19+)
20+
21+const upstream = "https://gitlab.freedesktop.org/xorg/proto/xcbproto"
22+const tag = "xcb-proto-1.17.0"
23+
24+var files = []string{"xproto.xml", "bigreq.xml", "ge.xml", "xc_misc.xml", "composite.xml", "xfixes.xml", "res.xml", "render.xml", "shape.xml", "xcb.xsd", "COPYING"}
25+
26+type entry struct {
27+ Path string `json:"path"`
28+ SHA256 string `json:"sha256"`
29+}
30+type manifest struct {
31+ Upstream string `json:"upstream"`
32+ Tag string `json:"tag"`
33+ Source string `json:"source"`
34+ Files []entry `json:"files"`
35+}
36+
37+func main() {
38+ source := flag.String("source", "", "local source directory (COPYING must be included)")
39+ flag.Parse()
40+ if err := syncFiles(*source); err != nil {
41+ fmt.Fprintln(os.Stderr, err)
42+ os.Exit(1)
43+ }
44+}
45+func syncFiles(source string) error {
46+ data := make(map[string][]byte)
47+ provenance := source
48+ if source != "" {
49+ for _, name := range files {
50+ b, err := os.ReadFile(filepath.Join(source, name))
51+ if err != nil {
52+ return err
53+ }
54+ data[name] = b
55+ }
56+ } else {
57+ provenance = upstream + "/-/archive/" + tag + "/xcbproto-" + tag + ".tar.gz"
58+ client := http.Client{Timeout: 30 * time.Second}
59+ resp, err := client.Get(provenance)
60+ if err != nil {
61+ return err
62+ }
63+ defer resp.Body.Close()
64+ if resp.StatusCode != http.StatusOK {
65+ return fmt.Errorf("download: %s", resp.Status)
66+ }
67+ gz, err := gzip.NewReader(io.LimitReader(resp.Body, 16<<20))
68+ if err != nil {
69+ return err
70+ }
71+ defer gz.Close()
72+ tr := tar.NewReader(gz)
73+ for {
74+ h, err := tr.Next()
75+ if err == io.EOF {
76+ break
77+ }
78+ if err != nil {
79+ return err
80+ }
81+ for _, name := range files {
82+ if h.Name == "xcbproto-"+tag+"/src/"+name || name == "COPYING" && h.Name == "xcbproto-"+tag+"/COPYING" {
83+ b, err := io.ReadAll(io.LimitReader(tr, 4<<20))
84+ if err != nil {
85+ return err
86+ }
87+ data[name] = b
88+ }
89+ }
90+ }
91+ }
92+ m := manifest{Upstream: upstream, Tag: tag, Source: provenance}
93+ for _, name := range files {
94+ if len(data[name]) == 0 {
95+ return fmt.Errorf("missing source %s", name)
96+ }
97+ }
98+ for _, name := range files {
99+ dest := filepath.Join("spec", "xml", name)
100+ if name == "xcb.xsd" {
101+ dest = "spec/xcb.xsd"
102+ }
103+ if name == "COPYING" {
104+ dest = "LICENSES/xcb-proto-COPYING"
105+ }
106+ if err := os.MkdirAll(filepath.Dir(dest), 0755); err != nil {
107+ return err
108+ }
109+ if err := os.WriteFile(dest, data[name], 0644); err != nil {
110+ return err
111+ }
112+ sum := sha256.Sum256(data[name])
113+ m.Files = append(m.Files, entry{filepath.ToSlash(dest), hex.EncodeToString(sum[:])})
114+ }
115+ b, err := json.MarshalIndent(m, "", " ")
116+ if err != nil {
117+ return err
118+ }
119+ b = append(b, '\n')
120+ // Keep refresh deterministic, including when invoked repeatedly from CI.
121+ old, _ := os.ReadFile("spec/manifest.json")
122+ if bytes.Equal(old, b) {
123+ return nil
124+ }
125+ return os.WriteFile("spec/manifest.json", b, 0644)
126+}
A go.mod +5 -0
@@ -0,0 +1,5 @@
1+module bnema.dev/xturbo
2+
3+go 1.27
4+
5+require golang.org/x/sys v0.49.0
A go.sum +2 -0 generated file: collapsed
A spec/manifest.json +51 -0
@@ -0,0 +1,51 @@
1+{
2+ "upstream": "https://gitlab.freedesktop.org/xorg/proto/xcbproto",
3+ "tag": "xcb-proto-1.17.0",
4+ "source": "https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/archive/xcb-proto-1.17.0/xcbproto-xcb-proto-1.17.0.tar.gz",
5+ "files": [
6+ {
7+ "path": "spec/xml/xproto.xml",
8+ "sha256": "bb8c060a8ea009a5d08a57c0c6daa1d3dd7e9d743d46d055109505c344a1f4c9"
9+ },
10+ {
11+ "path": "spec/xml/bigreq.xml",
12+ "sha256": "1e7d984a443455a995a1c4eb3850bf03fb5e349183f6d1e183cb026ab53d5f94"
13+ },
14+ {
15+ "path": "spec/xml/ge.xml",
16+ "sha256": "ae0fe359d4213d3734143fec51b6956a1b0921b598f92d00be786c35e732a0a4"
17+ },
18+ {
19+ "path": "spec/xml/xc_misc.xml",
20+ "sha256": "44d3b2350637746985b0165e13fd1a010dc98df4e9fa64264d2d6dea697ce628"
21+ },
22+ {
23+ "path": "spec/xml/composite.xml",
24+ "sha256": "6938a33bf1fc255f711b5bee0f3980fcaa010d81a271eb5bb3ba7680ac10de18"
25+ },
26+ {
27+ "path": "spec/xml/xfixes.xml",
28+ "sha256": "8c375ffe83ef73b38cb7fed1f859c262374917202c2ef8046d828405f7d71835"
29+ },
30+ {
31+ "path": "spec/xml/res.xml",
32+ "sha256": "9c0f9432143a79e851fc1f43b562d9f29e5e78a750d74c2b0356f17bc43e7710"
33+ },
34+ {
35+ "path": "spec/xml/render.xml",
36+ "sha256": "4a4c261d1f4746430c6296378d59474d6fbfb2c9cd45e9f0d60faf459d265218"
37+ },
38+ {
39+ "path": "spec/xml/shape.xml",
40+ "sha256": "bb079d0051aed81c785b42d12377709b945ad79e33df8c6b537ed99a0e7a6191"
41+ },
42+ {
43+ "path": "spec/xcb.xsd",
44+ "sha256": "8332e309d0259213f924825a606b36c7ef86acd6260a6ba0319b1a902ce04275"
45+ },
46+ {
47+ "path": "LICENSES/xcb-proto-COPYING",
48+ "sha256": "c5ffbfeaa501071ceeb97b7de2c0d703fdaa35de01c0fb6cbac1c28453a3e9fd"
49+ }
50+ ]
51+}
A spec/xcb.xsd +424 -0
@@ -0,0 +1,424 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2004 Josh Triplett. All Rights Reserved.
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the names of the authors or their
23+institutions shall not be used in advertising or otherwise to promote the
24+sale, use or other dealings in this Software without prior written
25+authorization from the authors.
26+-->
27+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
28+
29+ <!-- The root element -->
30+ <xsd:element name="xcb">
31+ <xsd:complexType>
32+ <xsd:group ref="macro" minOccurs="0" maxOccurs="unbounded" />
33+ <xsd:attribute name="header" type="xsd:string" use="required" />
34+ <xsd:attribute name="extension-xname" type="xsd:string" use="optional" />
35+ <xsd:attribute name="extension-name" type="xsd:string" use="optional" />
36+ <xsd:attribute name="extension-multiword" type="xsd:boolean" use="optional" default="false" />
37+ <xsd:attribute name="major-version" type="xsd:integer" use="optional" />
38+ <xsd:attribute name="minor-version" type="xsd:integer" use="optional" />
39+ </xsd:complexType>
40+ </xsd:element>
41+
42+ <!-- Padding -->
43+ <xsd:element name="pad">
44+ <xsd:complexType>
45+ <xsd:attribute name="bytes" type="xsd:integer" use="optional" />
46+ <xsd:attribute name="align" type="xsd:integer" use="optional" />
47+ <xsd:attribute name="serialize" type="xsd:boolean" use="optional" />
48+ </xsd:complexType>
49+ </xsd:element>
50+
51+ <!-- Alignment -->
52+ <xsd:element name="required_start_align" >
53+ <xsd:complexType>
54+ <xsd:attribute name="align" type="xsd:integer" use="required" />
55+ <xsd:attribute name="offset" type="xsd:integer" use="optional" />
56+ </xsd:complexType>
57+ </xsd:element>
58+
59+ <!-- Type for fields or parameters with attributes "name" and "type" -->
60+ <xsd:complexType name="var">
61+ <xsd:attribute name="name" type="xsd:string" use="required" />
62+ <xsd:attribute name="type" type="xsd:string" use="required" />
63+ <xsd:attribute name="enum" type="xsd:string" use="optional" />
64+ <xsd:attribute name="altenum" type="xsd:string" use="optional" />
65+ <xsd:attribute name="mask" type="xsd:string" use="optional" />
66+ <xsd:attribute name="altmask" type="xsd:string" use="optional" />
67+ </xsd:complexType>
68+
69+ <!-- case expression -->
70+ <xsd:complexType name="caseexpr">
71+ <xsd:sequence>
72+ <!-- case expression: -->
73+ <xsd:group ref="expression" minOccurs="1" maxOccurs="unbounded" />
74+ <!-- match -->
75+ <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
76+ <xsd:choice>
77+ <xsd:element ref="switch" minOccurs="0" maxOccurs="unbounded" />
78+ </xsd:choice>
79+ </xsd:sequence>
80+ <xsd:attribute name="name" type="xsd:string" use="optional" />
81+ </xsd:complexType>
82+
83+ <!-- switch expression -->
84+ <xsd:complexType name="switchexpr">
85+ <xsd:sequence>
86+ <!-- switch(expression) -->
87+ <xsd:group ref="expression" minOccurs="1" maxOccurs="1" />
88+ <xsd:element ref="required_start_align" minOccurs="0" maxOccurs="1" />
89+ <xsd:choice>
90+ <!-- bitcase expression - bit test -->
91+ <xsd:element name="bitcase" type="caseexpr" minOccurs="0" maxOccurs="unbounded" />
92+ <!-- case expression - value test -->
93+ <xsd:element name="case" type="caseexpr" minOccurs="0" maxOccurs="unbounded" />
94+ </xsd:choice>
95+ </xsd:sequence>
96+ <xsd:attribute name="name" type="xsd:string" use="required" />
97+ </xsd:complexType>
98+
99+ <xsd:element name="switch" type="switchexpr" />
100+
101+ <!-- field replaces FIELD, PARAM, and REPLY. -->
102+ <xsd:element name="field" type="var" />
103+
104+ <!-- Length of data structures -->
105+ <xsd:element name="length">
106+ <xsd:complexType>
107+ <xsd:group ref="expression" />
108+ </xsd:complexType>
109+ </xsd:element>
110+
111+ <!-- fd passing parameter -->
112+ <xsd:element name="fd">
113+ <xsd:complexType>
114+ <xsd:attribute name="name" type="xsd:string" use="required" />
115+ </xsd:complexType>
116+ </xsd:element>
117+
118+ <!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY. The name and type
119+ are specified as attributes. The content is an expression giving the
120+ length. -->
121+ <xsd:element name="list">
122+ <xsd:complexType>
123+ <xsd:complexContent>
124+ <xsd:extension base="var">
125+ <xsd:group ref="expression" minOccurs="0" maxOccurs="1" />
126+ </xsd:extension>
127+ </xsd:complexContent>
128+ </xsd:complexType>
129+ </xsd:element>
130+
131+ <!-- Expressions -->
132+ <xsd:group name="expression">
133+ <xsd:choice>
134+ <xsd:element name="op">
135+ <xsd:complexType>
136+ <xsd:sequence>
137+ <xsd:group ref="expression" />
138+ <xsd:group ref="expression" />
139+ </xsd:sequence>
140+ <xsd:attribute name="op" use="required">
141+ <xsd:simpleType>
142+ <xsd:restriction base="xsd:string">
143+ <xsd:pattern value="\+|-|\*|/|&amp;|&lt;&lt;" />
144+ </xsd:restriction>
145+ </xsd:simpleType>
146+ </xsd:attribute>
147+ </xsd:complexType>
148+ </xsd:element>
149+ <xsd:element name="unop">
150+ <xsd:complexType>
151+ <xsd:sequence>
152+ <xsd:group ref="expression" />
153+ </xsd:sequence>
154+ <xsd:attribute name="op" use="required">
155+ <xsd:simpleType>
156+ <xsd:restriction base="xsd:string">
157+ <xsd:pattern value="~" />
158+ </xsd:restriction>
159+ </xsd:simpleType>
160+ </xsd:attribute>
161+ </xsd:complexType>
162+ </xsd:element>
163+ <xsd:element name="fieldref" type="xsd:string" />
164+ <xsd:element name="paramref">
165+ <xsd:complexType>
166+ <xsd:simpleContent>
167+ <xsd:extension base="xsd:string">
168+ <xsd:attribute name="type" use="required" type="xsd:string" />
169+ </xsd:extension>
170+ </xsd:simpleContent>
171+ </xsd:complexType>
172+ </xsd:element>
173+ <xsd:element name="enumref">
174+ <xsd:complexType>
175+ <xsd:simpleContent>
176+ <xsd:extension base="xsd:string">
177+ <xsd:attribute name="ref" use="required" type="xsd:string" />
178+ </xsd:extension>
179+ </xsd:simpleContent>
180+ </xsd:complexType>
181+ </xsd:element>
182+ <xsd:element name="popcount">
183+ <xsd:complexType>
184+ <xsd:group ref="expression" />
185+ </xsd:complexType>
186+ </xsd:element>
187+ <xsd:element name="sumof">
188+ <xsd:complexType>
189+ <xsd:sequence>
190+ <xsd:group ref="expression" minOccurs="0" maxOccurs="1"/>
191+ </xsd:sequence>
192+ <xsd:attribute name="ref" use="required" type="xsd:string" />
193+ </xsd:complexType>
194+ </xsd:element>
195+ <xsd:element name="listelement-ref" />
196+ <xsd:element name="value" type="xsd:integer" />
197+ <xsd:element name="bit" type="bitType" />
198+ </xsd:choice>
199+ </xsd:group>
200+
201+ <!-- Fields in requests that are calculated from other information, not
202+ supplied by the caller. -->
203+ <xsd:element name="exprfield" >
204+ <xsd:complexType>
205+ <xsd:complexContent>
206+ <xsd:extension base="var">
207+ <xsd:group ref="expression" />
208+ </xsd:extension>
209+ </xsd:complexContent>
210+ </xsd:complexType>
211+ </xsd:element>
212+
213+ <xsd:group name="fields">
214+ <xsd:choice>
215+ <xsd:element ref="pad" />
216+ <xsd:element ref="field" />
217+ <xsd:element ref="list" />
218+ <xsd:element ref="fd" />
219+ <xsd:element ref="required_start_align" />
220+ <xsd:element ref="length" />
221+ </xsd:choice>
222+ </xsd:group>
223+
224+ <!-- Type for a structure -->
225+ <xsd:complexType name="struct">
226+ <xsd:sequence>
227+ <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
228+ <xsd:choice minOccurs="0" maxOccurs="1">
229+ <xsd:element ref="switch" />
230+ </xsd:choice>
231+ </xsd:sequence>
232+ <xsd:attribute name="name" type="xsd:string" use="required" />
233+ </xsd:complexType>
234+
235+ <!-- Type for a packet structure -->
236+ <xsd:complexType name="packet-struct">
237+ <xsd:sequence>
238+ <xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" />
239+ </xsd:sequence>
240+ <xsd:attribute name="name" type="xsd:string" use="required" />
241+ <xsd:attribute name="number" type="xsd:integer" use="required" />
242+ </xsd:complexType>
243+
244+ <!-- Type for a packet structure copy -->
245+ <xsd:complexType name="packet-struct-copy">
246+ <xsd:attribute name="name" type="xsd:string" use="required" />
247+ <xsd:attribute name="number" type="xsd:integer" use="required" />
248+ <xsd:attribute name="ref" type="xsd:string" use="required" />
249+ </xsd:complexType>
250+
251+ <!-- Type for a structure that is an event
252+ which can be of an event type from a set of event types -->
253+ <xsd:complexType name="eventstruct">
254+ <xsd:sequence>
255+ <xsd:element name="allowed">
256+ <xsd:complexType>
257+ <xsd:attribute name="extension" type="xsd:string" use="required" />
258+ <xsd:attribute name="xge" type="xsd:boolean" use="required" />
259+ <xsd:attribute name="opcode-min" type="xsd:integer" use="required" />
260+ <xsd:attribute name="opcode-max" type="xsd:integer" use="required" />
261+ </xsd:complexType>
262+ </xsd:element>
263+ </xsd:sequence>
264+ <xsd:attribute name="name" type="xsd:string" use="required" />
265+ </xsd:complexType>
266+
267+ <!-- Type for bit values -->
268+ <xsd:simpleType name="bitType">
269+ <xsd:restriction base="xsd:integer">
270+ <xsd:minInclusive value="0" />
271+ <xsd:maxExclusive value="32" />
272+ </xsd:restriction>
273+ </xsd:simpleType>
274+
275+ <!-- Type for documentation -->
276+ <xsd:group name="doc-fields">
277+ <xsd:sequence>
278+ <xsd:element name="field">
279+ <xsd:complexType>
280+ <xsd:simpleContent>
281+ <xsd:extension base="xsd:string">
282+ <xsd:attribute name="name" type="xsd:string" />
283+ </xsd:extension>
284+ </xsd:simpleContent>
285+ </xsd:complexType>
286+ </xsd:element>
287+ </xsd:sequence>
288+ </xsd:group>
289+
290+ <xsd:group name="error-fields">
291+ <xsd:sequence>
292+ <xsd:element name="error">
293+ <xsd:complexType>
294+ <xsd:simpleContent>
295+ <xsd:extension base="xsd:string">
296+ <xsd:attribute name="type" type="xsd:string" />
297+ </xsd:extension>
298+ </xsd:simpleContent>
299+ </xsd:complexType>
300+ </xsd:element>
301+ </xsd:sequence>
302+ </xsd:group>
303+
304+ <xsd:group name="see-fields">
305+ <xsd:sequence>
306+ <xsd:element name="see">
307+ <xsd:complexType>
308+ <xsd:attribute name="name" type="xsd:string" />
309+ <xsd:attribute name="type" type="xsd:string" />
310+ </xsd:complexType>
311+ </xsd:element>
312+ </xsd:sequence>
313+ </xsd:group>
314+
315+ <xsd:element name="doc">
316+ <xsd:complexType mixed="true">
317+ <xsd:sequence>
318+ <xsd:element name="brief" type="xsd:string" minOccurs="0" maxOccurs="1" />
319+ <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
320+ <xsd:element name="example" type="xsd:string" minOccurs="0" maxOccurs="1" />
321+ <xsd:group ref="doc-fields" minOccurs="0" maxOccurs="unbounded" />
322+ <xsd:group ref="error-fields" minOccurs="0" maxOccurs="unbounded" />
323+ <xsd:group ref="see-fields" minOccurs="0" maxOccurs="unbounded" />
324+ </xsd:sequence>
325+ </xsd:complexType>
326+ </xsd:element>
327+
328+ <xsd:group name="macro">
329+ <xsd:choice>
330+ <xsd:element name="request">
331+ <xsd:complexType>
332+ <xsd:sequence>
333+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
334+ <xsd:group ref="fields" />
335+ <xsd:element ref="exprfield" />
336+ </xsd:choice>
337+ <xsd:choice minOccurs="0" maxOccurs="1">
338+ <xsd:element ref="switch" />
339+ </xsd:choice>
340+ <xsd:element name="reply" minOccurs="0" maxOccurs="1">
341+ <xsd:complexType>
342+ <xsd:sequence>
343+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
344+ <xsd:group ref="fields" />
345+ </xsd:choice>
346+ <xsd:choice minOccurs="0" maxOccurs="1">
347+ <xsd:element ref="switch" />
348+ </xsd:choice>
349+ <xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
350+ </xsd:sequence>
351+ </xsd:complexType>
352+ </xsd:element>
353+ <xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
354+ </xsd:sequence>
355+ <xsd:attribute name="name" type="xsd:string" use="required" />
356+ <xsd:attribute name="opcode" type="xsd:integer" use="required" />
357+ <xsd:attribute name="combine-adjacent" type="xsd:boolean"
358+ use="optional" default="false" />
359+ </xsd:complexType>
360+ </xsd:element>
361+ <xsd:element name="event">
362+ <xsd:complexType>
363+ <xsd:complexContent>
364+ <xsd:extension base="packet-struct">
365+ <xsd:sequence>
366+ <xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
367+ </xsd:sequence>
368+ <xsd:attribute name="no-sequence-number" type="xsd:boolean"
369+ use="optional" default="false" />
370+ <xsd:attribute name="xge" type="xsd:boolean"
371+ use="optional" default="false" />
372+ </xsd:extension>
373+ </xsd:complexContent>
374+ </xsd:complexType>
375+ </xsd:element>
376+ <xsd:element name="eventcopy" type="packet-struct-copy" />
377+ <xsd:element name="error" type="packet-struct" />
378+ <xsd:element name="errorcopy" type="packet-struct-copy" />
379+ <xsd:element name="struct" type="struct" />
380+ <xsd:element name="union" type="struct" />
381+ <xsd:element name="eventstruct" type="eventstruct" />
382+ <xsd:element name="xidtype">
383+ <xsd:complexType>
384+ <xsd:attribute name="name" type="xsd:string" use="required" />
385+ </xsd:complexType>
386+ </xsd:element>
387+ <xsd:element name="xidunion">
388+ <xsd:complexType>
389+ <xsd:sequence>
390+ <xsd:element name="type" type="xsd:string"
391+ minOccurs="1" maxOccurs="unbounded" />
392+ </xsd:sequence>
393+ <xsd:attribute name="name" type="xsd:string" use="required" />
394+ </xsd:complexType>
395+ </xsd:element>
396+ <xsd:element name="enum">
397+ <xsd:complexType>
398+ <xsd:sequence minOccurs="1" maxOccurs="unbounded">
399+ <xsd:element name="item">
400+ <xsd:complexType>
401+ <xsd:choice minOccurs="1" maxOccurs="1">
402+ <xsd:element name="value" type="xsd:unsignedInt" />
403+ <xsd:element name="bit" type="bitType" />
404+ </xsd:choice>
405+ <xsd:attribute name="name" type="xsd:string" use="required" />
406+ </xsd:complexType>
407+ </xsd:element>
408+ <xsd:element ref="doc" minOccurs="0" maxOccurs="1" />
409+ </xsd:sequence>
410+ <xsd:attribute name="name" type="xsd:string" use="required" />
411+ </xsd:complexType>
412+ </xsd:element>
413+ <xsd:element name="typedef">
414+ <xsd:complexType>
415+ <xsd:attribute name="oldname" type="xsd:string" use="required" />
416+ <xsd:attribute name="newname" type="xsd:string" use="required" />
417+ </xsd:complexType>
418+ </xsd:element>
419+ <!-- The import element allows a protocol description to reference the
420+ declarations of another protocol description. -->
421+ <xsd:element name="import" type="xsd:string" />
422+ </xsd:choice>
423+ </xsd:group>
424+</xsd:schema>
A spec/xml/bigreq.xml +52 -0
@@ -0,0 +1,52 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2001-2004 Bart Massey, Jamey Sharp, and Josh Triplett.
4+All Rights Reserved.
5+
6+Permission is hereby granted, free of charge, to any person obtaining a copy
7+of this software and associated documentation files (the "Software"), to deal
8+in the Software without restriction, including without limitation the rights
9+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+copies of the Software, and to permit persons to whom the Software is
11+furnished to do so, subject to the following conditions:
12+
13+The above copyright notice and this permission notice shall be included in all
14+copies or substantial portions of the Software.
15+
16+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+Except as contained in this notice, the names of the authors or their
24+institutions shall not be used in advertising or otherwise to promote the
25+sale, use or other dealings in this Software without prior written
26+authorization from the authors.
27+-->
28+<xcb header="bigreq" extension-xname="BIG-REQUESTS"
29+ extension-name="BigRequests" extension-multiword="true"
30+ major-version="0" minor-version="0">
31+
32+ <request name="Enable" opcode="0">
33+ <reply>
34+ <pad bytes="1" />
35+ <field type="CARD32" name="maximum_request_length" />
36+ <doc>
37+ <field name="maximum_request_length">
38+The maximum length of requests supported by the server, in 4-byte units.
39+ </field>
40+ </doc>
41+ </reply>
42+ <doc>
43+ <brief>Enable the BIG-REQUESTS extension</brief>
44+ <description>
45+This enables the BIG-REQUESTS extension, which allows for requests larger than
46+262140 bytes in length. When enabled, if the 16-bit length field is zero, it
47+is immediately followed by a 32-bit length field specifying the length of the
48+request in 4-byte units.
49+ </description>
50+ </doc>
51+ </request>
52+</xcb>
A spec/xml/composite.xml +220 -0
@@ -0,0 +1,220 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2004 Josh Triplett. All Rights Reserved.
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the names of the authors or their
23+institutions shall not be used in advertising or otherwise to promote the
24+sale, use or other dealings in this Software without prior written
25+authorization from the authors.
26+
27+Copyright (c) 2006, Oracle and/or its affiliates.
28+
29+Permission is hereby granted, free of charge, to any person obtaining a
30+copy of this software and associated documentation files (the "Software"),
31+to deal in the Software without restriction, including without limitation
32+the rights to use, copy, modify, merge, publish, distribute, sublicense,
33+and/or sell copies of the Software, and to permit persons to whom the
34+Software is furnished to do so, subject to the following conditions:
35+
36+The above copyright notice and this permission notice (including the next
37+paragraph) shall be included in all copies or substantial portions of the
38+Software.
39+
40+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
46+DEALINGS IN THE SOFTWARE.
47+
48+Copyright © 2003 Keith Packard
49+
50+Permission to use, copy, modify, distribute, and sell this software and its
51+documentation for any purpose is hereby granted without fee, provided that
52+the above copyright notice appear in all copies and that both that
53+copyright notice and this permission notice appear in supporting
54+documentation, and that the name of Keith Packard not be used in
55+advertising or publicity pertaining to distribution of the software without
56+specific, written prior permission. Keith Packard makes no
57+representations about the suitability of this software for any purpose. It
58+is provided "as is" without express or implied warranty.
59+
60+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
61+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
62+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
63+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
64+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
65+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
66+PERFORMANCE OF THIS SOFTWARE.
67+
68+-->
69+<!-- This file describes version 0.3 of COMPOSITE. -->
70+<xcb header="composite" extension-xname="Composite" extension-name="Composite"
71+ major-version="0" minor-version="4">
72+
73+ <import>xproto</import>
74+ <import>xfixes</import>
75+
76+ <enum name="Redirect">
77+ <item name="Automatic"> <value>0</value> </item>
78+ <item name="Manual"> <value>1</value> </item>
79+ </enum>
80+
81+ <request name="QueryVersion" opcode="0">
82+ <field type="CARD32" name="client_major_version" />
83+ <field type="CARD32" name="client_minor_version" />
84+ <reply>
85+ <pad bytes="1" />
86+ <field type="CARD32" name="major_version" />
87+ <field type="CARD32" name="minor_version" />
88+ <pad bytes="16" />
89+ <doc>
90+ <brief>The negotiated version of Composite</brief>
91+ <description>
92+This indicates the version of Composite chosen by the server. It will always be
93+less than or equal to the version offered by the client.
94+ </description>
95+ <field name="major_version">The major version chosen by the server.</field>
96+ <field name="minor_version">The minor version chosen by the server.</field>
97+ </doc>
98+ </reply>
99+ <doc>
100+ <brief>Negotiate the version of Composite</brief>
101+ <description>
102+This negotiates the version of the Composite extension. It must be precede all
103+other requests using Composite. Failure to do so will cause a BadRequest error.
104+ </description>
105+ <field name="client_major_version">The major version supported by the client.</field>
106+ <field name="client_minor_version">The minor version supported by the client.</field>
107+ </doc>
108+ </request>
109+
110+ <request name="RedirectWindow" opcode="1">
111+ <field type="WINDOW" name="window" />
112+ <field type="CARD8" name="update" enum="Redirect" />
113+ <pad bytes="3" />
114+ <doc>
115+ <brief>Redirect the hierarchy starting at "window" to off-screen storage.</brief>
116+ <description>
117+ The hierarchy starting at 'window' is directed to off-screen
118+ storage. When all clients enabling redirection terminate,
119+ the redirection will automatically be disabled.
120+
121+ The root window may not be redirected. Doing so results in a Match
122+ error.
123+ </description>
124+ <field name="window">The root of the hierarchy to redirect to off-screen storage.</field>
125+ <field name="update">
126+ Whether contents are automatically mirrored to the parent window. If one client
127+ already specifies an update type of Manual, any attempt by another to specify a
128+ mode of Manual so will result in an Access error.
129+ </field>
130+ </doc>
131+ </request>
132+
133+ <request name="RedirectSubwindows" opcode="2">
134+ <field type="WINDOW" name="window" />
135+ <field type="CARD8" name="update" enum="Redirect" />
136+ <pad bytes="3" />
137+ <doc>
138+ <brief>Redirect all current and future children of ‘window’</brief>
139+ <description>
140+ Hierarchies starting at all current and future children of window
141+ will be redirected as in RedirectWindow. If update is Manual,
142+ then painting of the window background during window manipulation
143+ and ClearArea requests is inhibited.
144+ </description>
145+ <field name="window">The root of the hierarchy to redirect to off-screen storage.</field>
146+ <field name="update">
147+ Whether contents are automatically mirrored to the parent window. If one client
148+ already specifies an update type of Manual, any attempt by another to specify a
149+ mode of Manual so will result in an Access error.
150+ </field>
151+ </doc>
152+ </request>
153+
154+ <request name="UnredirectWindow" opcode="3">
155+ <field type="WINDOW" name="window" />
156+ <field type="CARD8" name="update" enum="Redirect" />
157+ <pad bytes="3" />
158+ <doc>
159+ <brief>Terminate redirection of the specified window.</brief>
160+ <description>
161+ Redirection of the specified window will be terminated. This cannot be
162+ used if the window was redirected with RedirectSubwindows.
163+ </description>
164+ <field name="window">
165+ The window to terminate redirection of. Must be redirected by the
166+ current client, or a Value error results.
167+ </field>
168+ <field name="update">
169+ The update type passed to RedirectWindows. If this does not match the
170+ previously requested update type, a Value error results.
171+ </field>
172+ </doc>
173+ </request>
174+
175+ <request name="UnredirectSubwindows" opcode="4">
176+ <field type="WINDOW" name="window" />
177+ <field type="CARD8" name="update" enum="Redirect" />
178+ <pad bytes="3" />
179+ <doc>
180+ <brief>Terminate redirection of the specified window’s children</brief>
181+ <description>
182+ Redirection of all children of window will be terminated.
183+ </description>
184+ <field name="window">
185+ The window to terminate redirection of. Must have previously been
186+ selected for sub-redirection by the current client, or a Value error
187+ results.
188+ </field>
189+ <field name="update">
190+ The update type passed to RedirectSubWindows. If this does not match
191+ the previously requested update type, a Value error results.
192+ </field>
193+ </doc>
194+ </request>
195+
196+ <request name="CreateRegionFromBorderClip" opcode="5">
197+ <field type="REGION" name="region" />
198+ <field type="WINDOW" name="window" />
199+ </request>
200+
201+ <request name="NameWindowPixmap" opcode="6">
202+ <field type="WINDOW" name="window" />
203+ <field type="PIXMAP" name="pixmap" />
204+ </request>
205+
206+ <!-- new in version 0.3 -->
207+
208+ <request name="GetOverlayWindow" opcode="7">
209+ <field type="WINDOW" name="window" />
210+ <reply>
211+ <pad bytes="1" />
212+ <field type="WINDOW" name="overlay_win" />
213+ <pad bytes="20" />
214+ </reply>
215+ </request>
216+
217+ <request name="ReleaseOverlayWindow" opcode="8">
218+ <field type="WINDOW" name="window" />
219+ </request>
220+</xcb>
A spec/xml/ge.xml +42 -0
@@ -0,0 +1,42 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2009 Open Text Corporation. All Rights Reserved.
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the names of the authors or their
23+institutions shall not be used in advertising or otherwise to promote the
24+sale, use or other dealings in this Software without prior written
25+authorization from the authors.
26+-->
27+<xcb header="ge" extension-xname="Generic Event Extension" extension-name="GenericEvent"
28+ major-version="1" minor-version="0">
29+
30+ <!-- Version 1 -->
31+ <request name="QueryVersion" opcode="0">
32+ <field type="CARD16" name="client_major_version" />
33+ <field type="CARD16" name="client_minor_version" />
34+ <reply>
35+ <pad bytes="1" />
36+ <field type="CARD16" name="major_version" />
37+ <field type="CARD16" name="minor_version" />
38+ <pad bytes="20" />
39+ </reply>
40+ </request>
41+
42+</xcb>
A spec/xml/render.xml +693 -0
@@ -0,0 +1,693 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2002-2004 Carl D. Worth, Jamey Sharp, Bart Massey, Josh Triplett
4+All Rights Reserved. See the file COPYING in this directory
5+for licensing information.
6+-->
7+<xcb header="render" extension-xname="RENDER" extension-name="Render"
8+ major-version="0" minor-version="11">
9+ <!-- supports version 0.11 -->
10+
11+ <import>xproto</import>
12+
13+ <enum name="PictType">
14+ <item name="Indexed"> <value>0</value> </item>
15+ <item name="Direct"> <value>1</value> </item>
16+ </enum>
17+
18+ <enum name="Picture">
19+ <item name="None"> <value>0</value> </item>
20+ </enum>
21+
22+ <!-- Disjoint* and Conjoint* are new in version 0.2 -->
23+ <!-- PDF blend modes are new in version 0.11 -->
24+ <enum name="PictOp">
25+ <item name="Clear"> <value>0</value> </item>
26+ <item name="Src"> <value>1</value> </item>
27+ <item name="Dst"> <value>2</value> </item>
28+ <item name="Over"> <value>3</value> </item>
29+ <item name="OverReverse"> <value>4</value> </item>
30+ <item name="In"> <value>5</value> </item>
31+ <item name="InReverse"> <value>6</value> </item>
32+ <item name="Out"> <value>7</value> </item>
33+ <item name="OutReverse"> <value>8</value> </item>
34+ <item name="Atop"> <value>9</value> </item>
35+ <item name="AtopReverse"> <value>10</value> </item>
36+ <item name="Xor"> <value>11</value> </item>
37+ <item name="Add"> <value>12</value> </item>
38+ <item name="Saturate"> <value>13</value> </item>
39+
40+ <item name="DisjointClear"> <value>16</value></item>
41+ <item name="DisjointSrc"> <value>17</value> </item>
42+ <item name="DisjointDst"> <value>18</value> </item>
43+ <item name="DisjointOver"> <value>19</value> </item>
44+ <item name="DisjointOverReverse"> <value>20</value> </item>
45+ <item name="DisjointIn"> <value>21</value> </item>
46+ <item name="DisjointInReverse"> <value>22</value> </item>
47+ <item name="DisjointOut"> <value>23</value> </item>
48+ <item name="DisjointOutReverse"> <value>24</value> </item>
49+ <item name="DisjointAtop"> <value>25</value> </item>
50+ <item name="DisjointAtopReverse"> <value>26</value> </item>
51+ <item name="DisjointXor"> <value>27</value> </item>
52+
53+ <item name="ConjointClear"> <value>32</value></item>
54+ <item name="ConjointSrc"> <value>33</value> </item>
55+ <item name="ConjointDst"> <value>34</value> </item>
56+ <item name="ConjointOver"> <value>35</value> </item>
57+ <item name="ConjointOverReverse"> <value>36</value> </item>
58+ <item name="ConjointIn"> <value>37</value> </item>
59+ <item name="ConjointInReverse"> <value>38</value> </item>
60+ <item name="ConjointOut"> <value>39</value> </item>
61+ <item name="ConjointOutReverse"> <value>40</value> </item>
62+ <item name="ConjointAtop"> <value>41</value> </item>
63+ <item name="ConjointAtopReverse"> <value>42</value> </item>
64+ <item name="ConjointXor"> <value>43</value> </item>
65+
66+ <!-- PDF blend modes are new in version 0.11 -->
67+ <item name="Multiply"> <value>48</value></item>
68+ <item name="Screen"> <value>49</value> </item>
69+ <item name="Overlay"> <value>50</value> </item>
70+ <item name="Darken"> <value>51</value> </item>
71+ <item name="Lighten"> <value>52</value> </item>
72+ <item name="ColorDodge"> <value>53</value> </item>
73+ <item name="ColorBurn"> <value>54</value> </item>
74+ <item name="HardLight"> <value>55</value> </item>
75+ <item name="SoftLight"> <value>56</value> </item>
76+ <item name="Difference"> <value>57</value> </item>
77+ <item name="Exclusion"> <value>58</value> </item>
78+ <item name="HSLHue"> <value>59</value> </item>
79+ <item name="HSLSaturation"> <value>60</value> </item>
80+ <item name="HSLColor"> <value>61</value> </item>
81+ <item name="HSLLuminosity"> <value>62</value> </item>
82+ </enum>
83+
84+ <enum name="PolyEdge">
85+ <item name="Sharp"> <value>0</value> </item>
86+ <item name="Smooth"> <value>1</value> </item>
87+ </enum>
88+
89+ <enum name="PolyMode">
90+ <item name="Precise"> <value>0</value> </item>
91+ <item name="Imprecise"> <value>1</value> </item>
92+ </enum>
93+
94+ <enum name="CP">
95+ <item name="Repeat"> <bit>0</bit></item>
96+ <item name="AlphaMap"> <bit>1</bit></item>
97+ <item name="AlphaXOrigin"> <bit>2</bit></item>
98+ <item name="AlphaYOrigin"> <bit>3</bit></item>
99+ <item name="ClipXOrigin"> <bit>4</bit></item>
100+ <item name="ClipYOrigin"> <bit>5</bit></item>
101+ <item name="ClipMask"> <bit>6</bit></item>
102+ <item name="GraphicsExposure"><bit>7</bit></item>
103+ <item name="SubwindowMode"> <bit>8</bit></item>
104+ <item name="PolyEdge"> <bit>9</bit></item>
105+ <item name="PolyMode"> <bit>10</bit></item>
106+ <item name="Dither"> <bit>11</bit></item>
107+ <item name="ComponentAlpha"> <bit>12</bit></item>
108+ </enum>
109+
110+ <enum name="SubPixel">
111+ <item name="Unknown"> <value>0</value> </item>
112+ <item name="HorizontalRGB"> <value>1</value> </item>
113+ <item name="HorizontalBGR"> <value>2</value> </item>
114+ <item name="VerticalRGB"> <value>3</value> </item>
115+ <item name="VerticalBGR"> <value>4</value> </item>
116+ <item name="None"> <value>5</value> </item>
117+ </enum>
118+
119+ <!-- Extended repeat attributes introduced in 0.10 -->
120+ <enum name="Repeat">
121+ <item name="None"> <value>0</value> </item>
122+ <item name="Normal"> <value>1</value> </item>
123+ <item name="Pad"> <value>2</value> </item>
124+ <item name="Reflect"> <value>3</value> </item>
125+ </enum>
126+
127+ <typedef oldname="CARD32" newname="GLYPH" />
128+ <xidtype name="GLYPHSET" />
129+
130+ <xidtype name="PICTURE" />
131+ <xidtype name="PICTFORMAT" />
132+
133+ <typedef oldname="INT32" newname="FIXED" />
134+
135+ <error name="PictFormat" number="0" />
136+ <error name="Picture" number="1" />
137+ <error name="PictOp" number="2" />
138+ <error name="GlyphSet" number="3" />
139+ <error name="Glyph" number="4" />
140+
141+ <struct name="DIRECTFORMAT">
142+ <field type="CARD16" name="red_shift" />
143+ <field type="CARD16" name="red_mask" />
144+ <field type="CARD16" name="green_shift" />
145+ <field type="CARD16" name="green_mask" />
146+ <field type="CARD16" name="blue_shift" />
147+ <field type="CARD16" name="blue_mask" />
148+ <field type="CARD16" name="alpha_shift" />
149+ <field type="CARD16" name="alpha_mask" />
150+ </struct>
151+
152+ <struct name="PICTFORMINFO">
153+ <field type="PICTFORMAT" name="id" />
154+ <field type="CARD8" name="type" enum="PictType" />
155+ <field type="CARD8" name="depth" />
156+ <pad bytes="2" />
157+ <field type="DIRECTFORMAT" name="direct" />
158+ <field type="COLORMAP" name="colormap" />
159+ </struct>
160+
161+ <struct name="PICTVISUAL">
162+ <field type="VISUALID" name="visual" />
163+ <field type="PICTFORMAT" name="format" />
164+ </struct>
165+
166+ <struct name="PICTDEPTH">
167+ <field type="CARD8" name="depth" />
168+ <pad bytes="1" />
169+ <field type="CARD16" name="num_visuals" />
170+ <pad bytes="4" />
171+ <list type="PICTVISUAL" name="visuals">
172+ <fieldref>num_visuals</fieldref>
173+ </list>
174+ </struct>
175+
176+ <struct name="PICTSCREEN">
177+ <field type="CARD32" name="num_depths" />
178+ <field type="PICTFORMAT" name="fallback" />
179+ <list type="PICTDEPTH" name="depths">
180+ <fieldref>num_depths</fieldref>
181+ </list>
182+ </struct>
183+
184+ <struct name="INDEXVALUE">
185+ <field type="CARD32" name="pixel" />
186+ <field type="CARD16" name="red" />
187+ <field type="CARD16" name="green" />
188+ <field type="CARD16" name="blue" />
189+ <field type="CARD16" name="alpha" />
190+ </struct>
191+
192+ <struct name="COLOR">
193+ <field type="CARD16" name="red" />
194+ <field type="CARD16" name="green" />
195+ <field type="CARD16" name="blue" />
196+ <field type="CARD16" name="alpha" />
197+ </struct>
198+
199+ <struct name="POINTFIX">
200+ <field type="FIXED" name="x" />
201+ <field type="FIXED" name="y" />
202+ </struct>
203+
204+ <struct name="LINEFIX">
205+ <field type="POINTFIX" name="p1" />
206+ <field type="POINTFIX" name="p2" />
207+ </struct>
208+
209+ <struct name="TRIANGLE">
210+ <field type="POINTFIX" name="p1" />
211+ <field type="POINTFIX" name="p2" />
212+ <field type="POINTFIX" name="p3" />
213+ </struct>
214+
215+ <struct name="TRAPEZOID">
216+ <field type="FIXED" name="top" />
217+ <field type="FIXED" name="bottom" />
218+ <field type="LINEFIX" name="left" />
219+ <field type="LINEFIX" name="right" />
220+ </struct>
221+
222+ <struct name="GLYPHINFO">
223+ <field type="CARD16" name="width" />
224+ <field type="CARD16" name="height" />
225+ <field type="INT16" name="x" />
226+ <field type="INT16" name="y" />
227+ <field type="INT16" name="x_off" />
228+ <field type="INT16" name="y_off" />
229+ </struct>
230+
231+
232+ <request name="QueryVersion" opcode="0">
233+ <field type="CARD32" name="client_major_version" />
234+ <field type="CARD32" name="client_minor_version" />
235+ <reply>
236+ <pad bytes="1" />
237+ <field type="CARD32" name="major_version" />
238+ <field type="CARD32" name="minor_version" />
239+ <pad bytes="16" />
240+ </reply>
241+ </request>
242+
243+ <request name="QueryPictFormats" opcode="1">
244+ <reply>
245+ <pad bytes="1" />
246+ <field type="CARD32" name="num_formats" />
247+ <field type="CARD32" name="num_screens" />
248+ <field type="CARD32" name="num_depths" />
249+ <field type="CARD32" name="num_visuals" />
250+ <field type="CARD32" name="num_subpixel" /> <!-- new in version 0.6 -->
251+ <pad bytes="4" />
252+ <list type="PICTFORMINFO" name="formats">
253+ <fieldref>num_formats</fieldref>
254+ </list>
255+ <list type="PICTSCREEN" name="screens">
256+ <fieldref>num_screens</fieldref>
257+ </list>
258+ <list type="CARD32" name="subpixels" enum="SubPixel" >
259+ <fieldref>num_subpixel</fieldref>
260+ </list>
261+ </reply>
262+ </request>
263+
264+ <!-- from version 0.7 -->
265+ <request name="QueryPictIndexValues" opcode="2">
266+ <field type="PICTFORMAT" name="format" />
267+ <reply>
268+ <pad bytes="1" />
269+ <field type="CARD32" name="num_values" />
270+ <pad bytes="20" />
271+ <list type="INDEXVALUE" name="values">
272+ <fieldref>num_values</fieldref>
273+ </list>
274+ </reply>
275+ </request>
276+
277+ <!-- opcode 3 reserved for QueryDithers -->
278+
279+ <request name="CreatePicture" opcode="4">
280+ <field type="PICTURE" name="pid" />
281+ <field type="DRAWABLE" name="drawable" />
282+ <field type="PICTFORMAT" name="format" />
283+ <field type="CARD32" name="value_mask" mask="CP"/>
284+ <switch name="value_list">
285+ <fieldref>value_mask</fieldref>
286+ <bitcase>
287+ <enumref ref="CP">Repeat</enumref>
288+ <field type="CARD32" name="repeat" enum="Repeat"/>
289+ </bitcase>
290+ <bitcase>
291+ <enumref ref="CP">AlphaMap</enumref>
292+ <field type="PICTURE" name="alphamap" />
293+ </bitcase>
294+ <bitcase>
295+ <enumref ref="CP">AlphaXOrigin</enumref>
296+ <field type="INT32" name="alphaxorigin" />
297+ </bitcase>
298+ <bitcase>
299+ <enumref ref="CP">AlphaYOrigin</enumref>
300+ <field type="INT32" name="alphayorigin" />
301+ </bitcase>
302+ <bitcase>
303+ <enumref ref="CP">ClipXOrigin</enumref>
304+ <field type="INT32" name="clipxorigin" />
305+ </bitcase>
306+ <bitcase>
307+ <enumref ref="CP">ClipYOrigin</enumref>
308+ <field type="INT32" name="clipyorigin" />
309+ </bitcase>
310+ <bitcase>
311+ <enumref ref="CP">ClipMask</enumref>
312+ <field type="PIXMAP" name="clipmask" />
313+ </bitcase>
314+ <bitcase>
315+ <enumref ref="CP">GraphicsExposure</enumref>
316+ <field type="CARD32" name="graphicsexposure" />
317+ </bitcase>
318+ <bitcase>
319+ <enumref ref="CP">SubwindowMode</enumref>
320+ <field type="CARD32" name="subwindowmode" enum="SubwindowMode"/>
321+ </bitcase>
322+ <bitcase>
323+ <enumref ref="CP">PolyEdge</enumref>
324+ <field type="CARD32" name="polyedge" enum="PolyEdge"/>
325+ </bitcase>
326+ <bitcase>
327+ <enumref ref="CP">PolyMode</enumref>
328+ <field type="CARD32" name="polymode" enum="PolyMode"/>
329+ </bitcase>
330+ <bitcase>
331+ <enumref ref="CP">Dither</enumref>
332+ <field type="ATOM" name="dither" />
333+ </bitcase>
334+ <bitcase>
335+ <enumref ref="CP">ComponentAlpha</enumref>
336+ <field type="CARD32" name="componentalpha" />
337+ </bitcase>
338+ </switch>
339+ </request>
340+
341+ <request name="ChangePicture" opcode="5">
342+ <field type="PICTURE" name="picture" />
343+ <field type="CARD32" name="value_mask" mask="CP"/>
344+ <switch name="value_list">
345+ <fieldref>value_mask</fieldref>
346+ <bitcase>
347+ <enumref ref="CP">Repeat</enumref>
348+ <field type="CARD32" name="repeat" enum="Repeat"/>
349+ </bitcase>
350+ <bitcase>
351+ <enumref ref="CP">AlphaMap</enumref>
352+ <field type="PICTURE" name="alphamap" />
353+ </bitcase>
354+ <bitcase>
355+ <enumref ref="CP">AlphaXOrigin</enumref>
356+ <field type="INT32" name="alphaxorigin" />
357+ </bitcase>
358+ <bitcase>
359+ <enumref ref="CP">AlphaYOrigin</enumref>
360+ <field type="INT32" name="alphayorigin" />
361+ </bitcase>
362+ <bitcase>
363+ <enumref ref="CP">ClipXOrigin</enumref>
364+ <field type="INT32" name="clipxorigin" />
365+ </bitcase>
366+ <bitcase>
367+ <enumref ref="CP">ClipYOrigin</enumref>
368+ <field type="INT32" name="clipyorigin" />
369+ </bitcase>
370+ <bitcase>
371+ <enumref ref="CP">ClipMask</enumref>
372+ <field type="PIXMAP" name="clipmask" />
373+ </bitcase>
374+ <bitcase>
375+ <enumref ref="CP">GraphicsExposure</enumref>
376+ <field type="CARD32" name="graphicsexposure" />
377+ </bitcase>
378+ <bitcase>
379+ <enumref ref="CP">SubwindowMode</enumref>
380+ <field type="CARD32" name="subwindowmode" enum="SubwindowMode"/>
381+ </bitcase>
382+ <bitcase>
383+ <enumref ref="CP">PolyEdge</enumref>
384+ <field type="CARD32" name="polyedge" enum="PolyEdge"/>
385+ </bitcase>
386+ <bitcase>
387+ <enumref ref="CP">PolyMode</enumref>
388+ <field type="CARD32" name="polymode" enum="PolyMode"/>
389+ </bitcase>
390+ <bitcase>
391+ <enumref ref="CP">Dither</enumref>
392+ <field type="ATOM" name="dither" />
393+ </bitcase>
394+ <bitcase>
395+ <enumref ref="CP">ComponentAlpha</enumref>
396+ <field type="CARD32" name="componentalpha" />
397+ </bitcase>
398+ </switch>
399+ </request>
400+
401+ <request name="SetPictureClipRectangles" opcode="6">
402+ <field type="PICTURE" name="picture" />
403+ <field type="INT16" name="clip_x_origin" />
404+ <field type="INT16" name="clip_y_origin" />
405+ <list type="RECTANGLE" name="rectangles" />
406+ </request>
407+
408+ <request name="FreePicture" opcode="7">
409+ <field type="PICTURE" name="picture" />
410+ </request>
411+
412+ <request name="Composite" opcode="8">
413+ <field type="CARD8" name="op" enum="PictOp" />
414+ <pad bytes="3" />
415+ <field type="PICTURE" name="src" />
416+ <field type="PICTURE" name="mask" altenum="Picture" />
417+ <field type="PICTURE" name="dst" />
418+ <field type="INT16" name="src_x" />
419+ <field type="INT16" name="src_y" />
420+ <field type="INT16" name="mask_x" />
421+ <field type="INT16" name="mask_y" />
422+ <field type="INT16" name="dst_x" />
423+ <field type="INT16" name="dst_y" />
424+ <field type="CARD16" name="width" />
425+ <field type="CARD16" name="height" />
426+ </request>
427+
428+ <!-- opcode 9 reserved for Scale -->
429+
430+ <request name="Trapezoids" opcode="10">
431+ <field type="CARD8" name="op" enum="PictOp" />
432+ <pad bytes="3" />
433+ <field type="PICTURE" name="src" />
434+ <field type="PICTURE" name="dst" />
435+ <field type="PICTFORMAT" name="mask_format" />
436+ <field type="INT16" name="src_x" />
437+ <field type="INT16" name="src_y" />
438+ <list type="TRAPEZOID" name="traps" />
439+ </request>
440+
441+ <request name="Triangles" opcode="11">
442+ <field type="CARD8" name="op" enum="PictOp" />
443+ <pad bytes="3" />
444+ <field type="PICTURE" name="src" />
445+ <field type="PICTURE" name="dst" />
446+ <field type="PICTFORMAT" name="mask_format" />
447+ <field type="INT16" name="src_x" />
448+ <field type="INT16" name="src_y" />
449+ <list type="TRIANGLE" name="triangles" />
450+ </request>
451+
452+ <request name="TriStrip" opcode="12">
453+ <field type="CARD8" name="op" enum="PictOp" />
454+ <pad bytes="3" />
455+ <field type="PICTURE" name="src" />
456+ <field type="PICTURE" name="dst" />
457+ <field type="PICTFORMAT" name="mask_format" />
458+ <field type="INT16" name="src_x" />
459+ <field type="INT16" name="src_y" />
460+ <list type="POINTFIX" name="points" />
461+ </request>
462+
463+ <request name="TriFan" opcode="13">
464+ <field type="CARD8" name="op" enum="PictOp" />
465+ <pad bytes="3" />
466+ <field type="PICTURE" name="src" />
467+ <field type="PICTURE" name="dst" />
468+ <field type="PICTFORMAT" name="mask_format" />
469+ <field type="INT16" name="src_x" />
470+ <field type="INT16" name="src_y" />
471+ <list type="POINTFIX" name="points" />
472+ </request>
473+
474+ <!-- opcode 14 reserved for ColorTrapezoids -->
475+
476+ <!-- opcode 15 reserved for ColorTriangles -->
477+
478+ <!-- opcode 16 reserved for Transform -->
479+
480+ <request name="CreateGlyphSet" opcode="17">
481+ <field type="GLYPHSET" name="gsid" />
482+ <field type="PICTFORMAT" name="format" />
483+ </request>
484+
485+ <request name="ReferenceGlyphSet" opcode="18">
486+ <field type="GLYPHSET" name="gsid" />
487+ <field type="GLYPHSET" name="existing" />
488+ </request>
489+
490+ <request name="FreeGlyphSet" opcode="19">
491+ <field type="GLYPHSET" name="glyphset" />
492+ </request>
493+
494+ <request name="AddGlyphs" opcode="20">
495+ <field type="GLYPHSET" name="glyphset" />
496+ <field type="CARD32" name="glyphs_len" />
497+ <list type="CARD32" name="glyphids">
498+ <fieldref>glyphs_len</fieldref>
499+ </list>
500+ <list type="GLYPHINFO" name="glyphs">
501+ <fieldref>glyphs_len</fieldref>
502+ </list>
503+ <list type="BYTE" name="data" />
504+ </request>
505+
506+ <!-- opcode 21 reserved for AddGlyphsFromPicture -->
507+
508+ <request name="FreeGlyphs" opcode="22">
509+ <field type="GLYPHSET" name="glyphset" />
510+ <list type="GLYPH" name="glyphs" />
511+ </request>
512+
513+ <request name="CompositeGlyphs8" opcode="23">
514+ <field type="CARD8" name="op" enum="PictOp" />
515+ <pad bytes="3" />
516+ <field type="PICTURE" name="src" />
517+ <field type="PICTURE" name="dst" />
518+ <field type="PICTFORMAT" name="mask_format" />
519+ <field type="GLYPHSET" name="glyphset" />
520+ <field type="INT16" name="src_x" />
521+ <field type="INT16" name="src_y" />
522+ <list type="BYTE" name="glyphcmds" />
523+ </request>
524+
525+ <request name="CompositeGlyphs16" opcode="24">
526+ <field type="CARD8" name="op" enum="PictOp" />
527+ <pad bytes="3" />
528+ <field type="PICTURE" name="src" />
529+ <field type="PICTURE" name="dst" />
530+ <field type="PICTFORMAT" name="mask_format" />
531+ <field type="GLYPHSET" name="glyphset" />
532+ <field type="INT16" name="src_x" />
533+ <field type="INT16" name="src_y" />
534+ <list type="BYTE" name="glyphcmds" />
535+ </request>
536+
537+ <request name="CompositeGlyphs32" opcode="25">
538+ <field type="CARD8" name="op" enum="PictOp" />
539+ <pad bytes="3" />
540+ <field type="PICTURE" name="src" />
541+ <field type="PICTURE" name="dst" />
542+ <field type="PICTFORMAT" name="mask_format" />
543+ <field type="GLYPHSET" name="glyphset" />
544+ <field type="INT16" name="src_x" />
545+ <field type="INT16" name="src_y" />
546+ <list type="BYTE" name="glyphcmds" />
547+ </request>
548+
549+ <!-- new in version 0.1 -->
550+
551+ <request name="FillRectangles" opcode="26">
552+ <field type="CARD8" name="op" enum="PictOp" />
553+ <pad bytes="3" />
554+ <field type="PICTURE" name="dst" />
555+ <field type="COLOR" name="color" />
556+ <list type="RECTANGLE" name="rects" />
557+ </request>
558+
559+ <!-- new in version 0.5 -->
560+
561+ <request name="CreateCursor" opcode="27">
562+ <field type="CURSOR" name="cid" />
563+ <field type="PICTURE" name="source" />
564+ <field type="CARD16" name="x" />
565+ <field type="CARD16" name="y" />
566+ </request>
567+
568+ <!-- new in version 0.6 -->
569+
570+ <struct name="TRANSFORM">
571+ <field type="FIXED" name="matrix11" />
572+ <field type="FIXED" name="matrix12" />
573+ <field type="FIXED" name="matrix13" />
574+ <field type="FIXED" name="matrix21" />
575+ <field type="FIXED" name="matrix22" />
576+ <field type="FIXED" name="matrix23" />
577+ <field type="FIXED" name="matrix31" />
578+ <field type="FIXED" name="matrix32" />
579+ <field type="FIXED" name="matrix33" />
580+ </struct>
581+
582+ <request name="SetPictureTransform" opcode="28">
583+ <field type="PICTURE" name="picture" />
584+ <field type="TRANSFORM" name="transform" />
585+ </request>
586+
587+ <request name="QueryFilters" opcode="29">
588+ <field type="DRAWABLE" name="drawable" />
589+ <reply>
590+ <pad bytes="1" />
591+ <field type="CARD32" name="num_aliases" />
592+ <field type="CARD32" name="num_filters" />
593+ <pad bytes="16" />
594+ <list type="CARD16" name="aliases">
595+ <fieldref>num_aliases</fieldref>
596+ </list>
597+ <list type="STR" name="filters">
598+ <fieldref>num_filters</fieldref>
599+ </list>
600+ </reply>
601+ </request>
602+
603+ <request name="SetPictureFilter" opcode="30">
604+ <field type="PICTURE" name="picture" />
605+ <field type="CARD16" name="filter_len" />
606+ <pad bytes="2" />
607+ <list type="char" name="filter">
608+ <fieldref>filter_len</fieldref>
609+ </list>
610+ <pad align="4" />
611+ <list type="FIXED" name="values" />
612+ </request>
613+
614+ <!-- new in version 0.8 -->
615+
616+ <struct name="ANIMCURSORELT">
617+ <field type="CURSOR" name="cursor" />
618+ <field type="CARD32" name="delay" />
619+ </struct>
620+
621+ <request name="CreateAnimCursor" opcode="31">
622+ <field type="CURSOR" name="cid" />
623+ <list type="ANIMCURSORELT" name="cursors" />
624+ </request>
625+
626+ <!-- new in version 0.9 -->
627+
628+ <struct name="SPANFIX">
629+ <field type="FIXED" name="l" />
630+ <field type="FIXED" name="r" />
631+ <field type="FIXED" name="y" />
632+ </struct>
633+
634+ <struct name="TRAP">
635+ <field type="SPANFIX" name="top" />
636+ <field type="SPANFIX" name="bot" />
637+ </struct>
638+
639+ <request name="AddTraps" opcode="32">
640+ <field type="PICTURE" name="picture" />
641+ <field type="INT16" name="x_off" />
642+ <field type="INT16" name="y_off" />
643+ <list type="TRAP" name="traps" />
644+ </request>
645+
646+ <!-- new in version 0.10 -->
647+
648+ <request name="CreateSolidFill" opcode="33">
649+ <field type="PICTURE" name="picture" />
650+ <field type="COLOR" name="color" />
651+ </request>
652+
653+ <request name="CreateLinearGradient" opcode="34">
654+ <field type="PICTURE" name="picture" />
655+ <field type="POINTFIX" name="p1" />
656+ <field type="POINTFIX" name="p2" />
657+ <field type="CARD32" name="num_stops" />
658+ <list type="FIXED" name="stops">
659+ <fieldref>num_stops</fieldref>
660+ </list>
661+ <list type="COLOR" name="colors">
662+ <fieldref>num_stops</fieldref>
663+ </list>
664+ </request>
665+
666+ <request name="CreateRadialGradient" opcode="35">
667+ <field type="PICTURE" name="picture" />
668+ <field type="POINTFIX" name="inner" />
669+ <field type="POINTFIX" name="outer" />
670+ <field type="FIXED" name="inner_radius" />
671+ <field type="FIXED" name="outer_radius" />
672+ <field type="CARD32" name="num_stops" />
673+ <list type="FIXED" name="stops">
674+ <fieldref>num_stops</fieldref>
675+ </list>
676+ <list type="COLOR" name="colors">
677+ <fieldref>num_stops</fieldref>
678+ </list>
679+ </request>
680+
681+ <request name="CreateConicalGradient" opcode="36">
682+ <field type="PICTURE" name="picture" />
683+ <field type="POINTFIX" name="center" />
684+ <field type="FIXED" name="angle" /> <!-- degrees -->
685+ <field type="CARD32" name="num_stops" />
686+ <list type="FIXED" name="stops">
687+ <fieldref>num_stops</fieldref>
688+ </list>
689+ <list type="COLOR" name="colors">
690+ <fieldref>num_stops</fieldref>
691+ </list>
692+ </request>
693+</xcb>
A spec/xml/res.xml +164 -0
@@ -0,0 +1,164 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2006 Jeremy Kolb
4+All Rights Reserved.
5+
6+Permission is hereby granted, free of charge, to any person obtaining a copy
7+of this software and associated documentation files (the "Software"), to deal
8+in the Software without restriction, including without limitation the rights
9+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+copies of the Software, and to permit persons to whom the Software is
11+furnished to do so, subject to the following conditions:
12+
13+The above copyright notice and this permission notice shall be included in all
14+copies or substantial portions of the Software.
15+
16+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+Except as contained in this notice, the names of the authors or their
24+institutions shall not be used in advertising or otherwise to promote the
25+sale, use or other dealings in this Software without prior written
26+authorization from the authors.
27+-->
28+<xcb header="res" extension-xname="X-Resource" extension-name="Res"
29+ major-version="1" minor-version="2">
30+ <import>xproto</import>
31+
32+ <!-- v1.0 -->
33+ <struct name="Client">
34+ <field type="CARD32" name="resource_base" />
35+ <field type="CARD32" name="resource_mask" />
36+ </struct>
37+
38+ <struct name="Type">
39+ <field type="ATOM" name="resource_type" />
40+ <field type="CARD32" name="count" />
41+ </struct>
42+
43+ <!-- v1.2 -->
44+ <enum name="ClientIdMask">
45+ <item name="ClientXID"> <bit>0</bit> </item>
46+ <item name="LocalClientPID"> <bit>1</bit> </item>
47+ </enum>
48+
49+ <struct name="ClientIdSpec">
50+ <field type="CARD32" name="client" />
51+ <field type="CARD32" name="mask" mask="ClientIdMask" />
52+ </struct>
53+
54+ <struct name="ClientIdValue">
55+ <field type="ClientIdSpec" name="spec" />
56+ <field type="CARD32" name="length" />
57+ <list type="CARD32" name="value">
58+ <!-- The specification says that the length is in units of CARD32,
59+ but the specification also says that the length is 4 when a
60+ single LocalClientPid is present (ie. the length is in bytes).
61+ The current server implementation sets the length to 4 when a
62+ single CARD32 is present on the wire (length is in bytes). -->
63+ <op op="/">
64+ <fieldref>length</fieldref>
65+ <value>4</value>
66+ </op>
67+ </list>
68+ </struct>
69+
70+ <struct name="ResourceIdSpec">
71+ <field type="CARD32" name="resource" />
72+ <field type="CARD32" name="type" />
73+ </struct>
74+
75+ <struct name="ResourceSizeSpec">
76+ <field type="ResourceIdSpec" name="spec" />
77+ <field type="CARD32" name="bytes" />
78+ <field type="CARD32" name="ref_count" />
79+ <field type="CARD32" name="use_count" />
80+ </struct>
81+
82+ <struct name="ResourceSizeValue">
83+ <field type="ResourceSizeSpec" name="size" />
84+ <field type="CARD32" name="num_cross_references" />
85+ <list type="ResourceSizeSpec" name="cross_references">
86+ <fieldref>num_cross_references</fieldref>
87+ </list>
88+ </struct>
89+
90+ <!-- v1.0 -->
91+ <request name="QueryVersion" opcode="0">
92+ <field type="CARD8" name="client_major" />
93+ <field type="CARD8" name="client_minor" />
94+ <reply>
95+ <pad bytes="1" />
96+ <field type="CARD16" name="server_major" />
97+ <field type="CARD16" name="server_minor" />
98+ </reply>
99+ </request>
100+
101+ <request name="QueryClients" opcode="1">
102+ <reply>
103+ <pad bytes="1" />
104+ <field type="CARD32" name="num_clients" />
105+ <pad bytes="20" />
106+ <list type="Client" name="clients">
107+ <fieldref>num_clients</fieldref>
108+ </list>
109+ </reply>
110+ </request>
111+
112+ <request name="QueryClientResources" opcode="2">
113+ <field type="CARD32" name="xid" />
114+ <reply>
115+ <pad bytes="1" />
116+ <field type="CARD32" name="num_types" />
117+ <pad bytes="20" />
118+ <list type="Type" name="types">
119+ <fieldref>num_types</fieldref>
120+ </list>
121+ </reply>
122+ </request>
123+
124+ <request name="QueryClientPixmapBytes" opcode="3">
125+ <field type="CARD32" name="xid" />
126+ <reply>
127+ <pad bytes="1" />
128+ <field type="CARD32" name="bytes" />
129+ <field type="CARD32" name="bytes_overflow" />
130+ </reply>
131+ </request>
132+
133+ <!-- v1.2 -->
134+ <request name="QueryClientIds" opcode="4">
135+ <field type="CARD32" name="num_specs" />
136+ <list type="ClientIdSpec" name="specs">
137+ <fieldref>num_specs</fieldref>
138+ </list>
139+ <reply>
140+ <pad bytes="1" />
141+ <field type="CARD32" name="num_ids" />
142+ <pad bytes="20" />
143+ <list type="ClientIdValue" name="ids">
144+ <fieldref>num_ids</fieldref>
145+ </list>
146+ </reply>
147+ </request>
148+
149+ <request name="QueryResourceBytes" opcode="5">
150+ <field type="CARD32" name="client" />
151+ <field type="CARD32" name="num_specs" />
152+ <list type="ResourceIdSpec" name="specs">
153+ <fieldref>num_specs</fieldref>
154+ </list>
155+ <reply>
156+ <pad bytes="1" />
157+ <field type="CARD32" name="num_sizes" />
158+ <pad bytes="20" />
159+ <list type="ResourceSizeValue" name="sizes">
160+ <fieldref>num_sizes</fieldref>
161+ </list>
162+ </reply>
163+ </request>
164+</xcb>
A spec/xml/shape.xml +155 -0
@@ -0,0 +1,155 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2001-2004 Bart Massey, Jamey Sharp, and Josh Triplett.
4+All Rights Reserved.
5+
6+Permission is hereby granted, free of charge, to any person obtaining a copy
7+of this software and associated documentation files (the "Software"), to deal
8+in the Software without restriction, including without limitation the rights
9+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+copies of the Software, and to permit persons to whom the Software is
11+furnished to do so, subject to the following conditions:
12+
13+The above copyright notice and this permission notice shall be included in all
14+copies or substantial portions of the Software.
15+
16+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+Except as contained in this notice, the names of the authors or their
24+institutions shall not be used in advertising or otherwise to promote the
25+sale, use or other dealings in this Software without prior written
26+authorization from the authors.
27+-->
28+<!-- This file describes version 1.1 of the Shape extension. -->
29+<xcb header="shape" extension-xname="SHAPE" extension-name="Shape" major-version="1" minor-version="1">
30+ <import>xproto</import>
31+
32+ <typedef oldname="CARD8" newname="OP" />
33+ <typedef oldname="CARD8" newname="KIND" />
34+
35+ <!-- Shape attributes of type OP. -->
36+ <enum name="SO">
37+ <item name="Set"> <value>0</value> </item>
38+ <item name="Union"> <value>1</value> </item>
39+ <item name="Intersect"> <value>2</value> </item>
40+ <item name="Subtract"> <value>3</value> </item>
41+ <item name="Invert"> <value>4</value> </item>
42+ </enum>
43+
44+ <!-- Shape attributes of type KIND. -->
45+ <enum name="SK">
46+ <item name="Bounding"> <value>0</value> </item>
47+ <item name="Clip"> <value>1</value> </item>
48+ <item name="Input"> <value>2</value> </item> <!-- added in version 1.1 -->
49+ </enum>
50+
51+ <event name="Notify" number="0">
52+ <field type="KIND" name="shape_kind" enum="SK" />
53+ <field type="WINDOW" name="affected_window" />
54+ <field type="INT16" name="extents_x" />
55+ <field type="INT16" name="extents_y" />
56+ <field type="CARD16" name="extents_width" />
57+ <field type="CARD16" name="extents_height" />
58+ <field type="TIMESTAMP" name="server_time" />
59+ <field type="BOOL" name="shaped" />
60+ <pad bytes="11" />
61+ </event>
62+
63+ <request name="QueryVersion" opcode="0">
64+ <reply>
65+ <pad bytes="1" />
66+ <field type="CARD16" name="major_version" />
67+ <field type="CARD16" name="minor_version" />
68+ </reply>
69+ </request>
70+
71+ <request name="Rectangles" opcode="1">
72+ <field type="OP" name="operation" enum="SO" />
73+ <field type="KIND" name="destination_kind" enum="SK" />
74+ <field type="BYTE" name="ordering" enum="ClipOrdering" />
75+ <pad bytes="1" />
76+ <field type="WINDOW" name="destination_window" />
77+ <field type="INT16" name="x_offset" />
78+ <field type="INT16" name="y_offset" />
79+ <list type="RECTANGLE" name="rectangles" />
80+ </request>
81+
82+ <request name="Mask" opcode="2">
83+ <field type="OP" name="operation" enum="SO" />
84+ <field type="KIND" name="destination_kind" enum="SK" />
85+ <pad bytes="2" />
86+ <field type="WINDOW" name="destination_window" />
87+ <field type="INT16" name="x_offset" />
88+ <field type="INT16" name="y_offset" />
89+ <field type="PIXMAP" name="source_bitmap" altenum="Pixmap" />
90+ </request>
91+
92+ <request name="Combine" opcode="3">
93+ <field type="OP" name="operation" enum="SO" />
94+ <field type="KIND" name="destination_kind" enum="SK" />
95+ <field type="KIND" name="source_kind" enum="SK" />
96+ <pad bytes="1" />
97+ <field type="WINDOW" name="destination_window" />
98+ <field type="INT16" name="x_offset" />
99+ <field type="INT16" name="y_offset" />
100+ <field type="WINDOW" name="source_window" />
101+ </request>
102+
103+ <request name="Offset" opcode="4">
104+ <field type="KIND" name="destination_kind" enum="SK" />
105+ <pad bytes="3" />
106+ <field type="WINDOW" name="destination_window" />
107+ <field type="INT16" name="x_offset" />
108+ <field type="INT16" name="y_offset" />
109+ </request>
110+
111+ <request name="QueryExtents" opcode="5">
112+ <field type="WINDOW" name="destination_window" />
113+ <reply>
114+ <pad bytes="1" />
115+ <field type="BOOL" name="bounding_shaped" />
116+ <field type="BOOL" name="clip_shaped" />
117+ <pad bytes="2" />
118+ <field type="INT16" name="bounding_shape_extents_x" />
119+ <field type="INT16" name="bounding_shape_extents_y" />
120+ <field type="CARD16" name="bounding_shape_extents_width" />
121+ <field type="CARD16" name="bounding_shape_extents_height" />
122+ <field type="INT16" name="clip_shape_extents_x" />
123+ <field type="INT16" name="clip_shape_extents_y" />
124+ <field type="CARD16" name="clip_shape_extents_width" />
125+ <field type="CARD16" name="clip_shape_extents_height" />
126+ </reply>
127+ </request>
128+
129+ <request name="SelectInput" opcode="6">
130+ <field type="WINDOW" name="destination_window" />
131+ <field type="BOOL" name="enable" />
132+ <pad bytes="3" />
133+ </request>
134+
135+ <request name="InputSelected" opcode="7">
136+ <field type="WINDOW" name="destination_window" />
137+ <reply>
138+ <field type="BOOL" name="enabled" />
139+ </reply>
140+ </request>
141+
142+ <request name="GetRectangles" opcode="8">
143+ <field type="WINDOW" name="window" />
144+ <field type="KIND" name="source_kind" enum="SK" />
145+ <pad bytes="3" />
146+ <reply>
147+ <field type="BYTE" name="ordering" enum="ClipOrdering" />
148+ <field type="CARD32" name="rectangles_len" />
149+ <pad bytes="20" />
150+ <list type="RECTANGLE" name="rectangles">
151+ <fieldref>rectangles_len</fieldref>
152+ </list>
153+ </reply>
154+ </request>
155+</xcb>
A spec/xml/xc_misc.xml +38 -0
@@ -0,0 +1,38 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2004 Mikko Torni and Josh Triplett.
4+All Rights Reserved. See the file COPYING in this directory
5+for licensing information.
6+-->
7+<xcb header="xc_misc" extension-xname="XC-MISC" extension-name="XCMisc"
8+ extension-multiword="true" major-version="1" minor-version="1">
9+ <request name="GetVersion" opcode="0">
10+ <field type="CARD16" name="client_major_version" />
11+ <field type="CARD16" name="client_minor_version" />
12+ <reply>
13+ <pad bytes="1" />
14+ <field type="CARD16" name="server_major_version" />
15+ <field type="CARD16" name="server_minor_version" />
16+ </reply>
17+ </request>
18+
19+ <request name="GetXIDRange" opcode="1">
20+ <reply>
21+ <pad bytes="1" />
22+ <field type="CARD32" name="start_id" />
23+ <field type="CARD32" name="count" />
24+ </reply>
25+ </request>
26+
27+ <request name="GetXIDList" opcode="2">
28+ <field type="CARD32" name="count" />
29+ <reply>
30+ <pad bytes="1" />
31+ <field type="CARD32" name="ids_len" />
32+ <pad bytes="20" />
33+ <list type="CARD32" name="ids">
34+ <fieldref>ids_len</fieldref>
35+ </list>
36+ </reply>
37+ </request>
38+</xcb>
A spec/xml/xfixes.xml +405 -0
@@ -0,0 +1,405 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2004 Josh Triplett. All Rights Reserved.
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+Except as contained in this notice, the names of the authors or their
23+institutions shall not be used in advertising or otherwise to promote the
24+sale, use or other dealings in this Software without prior written
25+authorization from the authors.
26+-->
27+<!-- This file describes version 4 of XFixes. -->
28+<xcb header="xfixes" extension-xname="XFIXES" extension-name="XFixes"
29+ major-version="6" minor-version="0">
30+ <import>xproto</import>
31+ <import>render</import>
32+ <import>shape</import>
33+
34+ <!-- Version 1 -->
35+ <request name="QueryVersion" opcode="0">
36+ <field type="CARD32" name="client_major_version" />
37+ <field type="CARD32" name="client_minor_version" />
38+ <reply>
39+ <pad bytes="1" />
40+ <field type="CARD32" name="major_version" />
41+ <field type="CARD32" name="minor_version" />
42+ <pad bytes="16" />
43+ </reply>
44+ </request>
45+
46+ <enum name="SaveSetMode">
47+ <item name="Insert"> <value>0</value> </item>
48+ <item name="Delete"> <value>1</value> </item>
49+ </enum>
50+
51+ <enum name="SaveSetTarget">
52+ <item name="Nearest"> <value>0</value> </item>
53+ <item name="Root"> <value>1</value> </item>
54+ </enum>
55+
56+ <enum name="SaveSetMapping">
57+ <item name="Map"> <value>0</value> </item>
58+ <item name="Unmap"> <value>1</value> </item>
59+ </enum>
60+
61+ <request name="ChangeSaveSet" opcode="1">
62+ <field type="BYTE" name="mode" enum="SaveSetMode" />
63+ <field type="BYTE" name="target" enum="SaveSetTarget" />
64+ <field type="BYTE" name="map" enum="SaveSetMapping" />
65+ <pad bytes="1" />
66+ <field type="WINDOW" name="window" />
67+ </request>
68+
69+ <enum name="SelectionEvent">
70+ <item name="SetSelectionOwner"> <value>0</value> </item>
71+ <item name="SelectionWindowDestroy"> <value>1</value> </item>
72+ <item name="SelectionClientClose"> <value>2</value> </item>
73+ </enum>
74+
75+ <enum name="SelectionEventMask">
76+ <item name="SetSelectionOwner"> <bit>0</bit></item>
77+ <item name="SelectionWindowDestroy"><bit>1</bit></item>
78+ <item name="SelectionClientClose"> <bit>2</bit></item>
79+ </enum>
80+
81+ <event name="SelectionNotify" number="0">
82+ <field type="CARD8" name="subtype" enum="SelectionEvent" />
83+ <field type="WINDOW" name="window" />
84+ <field type="WINDOW" name="owner" />
85+ <field type="ATOM" name="selection" />
86+ <field type="TIMESTAMP" name="timestamp" />
87+ <field type="TIMESTAMP" name="selection_timestamp" />
88+ <pad bytes="8" />
89+ </event>
90+
91+ <request name="SelectSelectionInput" opcode="2">
92+ <field type="WINDOW" name="window" />
93+ <field type="ATOM" name="selection" />
94+ <field type="CARD32" name="event_mask" mask="SelectionEventMask" />
95+ </request>
96+
97+ <enum name="CursorNotify">
98+ <item name="DisplayCursor"> <value>0</value> </item>
99+ </enum>
100+
101+ <enum name="CursorNotifyMask">
102+ <item name="DisplayCursor"><bit>0</bit></item>
103+ </enum>
104+
105+ <event name="CursorNotify" number="1">
106+ <field type="CARD8" name="subtype" enum="CursorNotify" />
107+ <field type="WINDOW" name="window" />
108+ <field type="CARD32" name="cursor_serial" />
109+ <field type="TIMESTAMP" name="timestamp" />
110+ <field type="ATOM" name="name" altenum="Atom" /> <!-- Added in version 2 -->
111+ <pad bytes="12" />
112+ </event>
113+
114+ <request name="SelectCursorInput" opcode="3">
115+ <field type="WINDOW" name="window" />
116+ <field type="CARD32" name="event_mask" mask="CursorNotifyMask" />
117+ </request>
118+
119+ <request name="GetCursorImage" opcode="4">
120+ <reply>
121+ <pad bytes="1" />
122+ <field type="INT16" name="x" />
123+ <field type="INT16" name="y" />
124+ <field type="CARD16" name="width" />
125+ <field type="CARD16" name="height" />
126+ <field type="CARD16" name="xhot" />
127+ <field type="CARD16" name="yhot" />
128+ <field type="CARD32" name="cursor_serial" />
129+ <pad bytes="8" />
130+ <list type="CARD32" name="cursor_image">
131+ <op op="*">
132+ <fieldref>width</fieldref>
133+ <fieldref>height</fieldref>
134+ </op>
135+ </list>
136+ </reply>
137+ </request>
138+
139+ <!-- Version 2 -->
140+
141+ <xidtype name="REGION" />
142+
143+ <error name="BadRegion" number="0" />
144+
145+ <enum name="Region">
146+ <item name="None"> <value>0</value> </item>
147+ </enum>
148+
149+ <request name="CreateRegion" opcode="5">
150+ <field type="REGION" name="region" />
151+ <list type="RECTANGLE" name="rectangles" />
152+ </request>
153+
154+ <request name="CreateRegionFromBitmap" opcode="6">
155+ <field type="REGION" name="region" />
156+ <field type="PIXMAP" name="bitmap" />
157+ </request>
158+
159+ <request name="CreateRegionFromWindow" opcode="7">
160+ <field type="REGION" name="region" />
161+ <field type="WINDOW" name="window" />
162+ <field type="shape:KIND" name="kind" enum="SK" />
163+ <pad bytes="3" />
164+ </request>
165+
166+ <request name="CreateRegionFromGC" opcode="8">
167+ <field type="REGION" name="region" />
168+ <field type="GCONTEXT" name="gc" />
169+ </request>
170+
171+ <request name="CreateRegionFromPicture" opcode="9">
172+ <field type="REGION" name="region" />
173+ <field type="PICTURE" name="picture" />
174+ </request>
175+
176+ <request name="DestroyRegion" opcode="10">
177+ <field type="REGION" name="region" />
178+ </request>
179+
180+ <request name="SetRegion" opcode="11">
181+ <field type="REGION" name="region" />
182+ <list type="RECTANGLE" name="rectangles" />
183+ </request>
184+
185+ <request name="CopyRegion" opcode="12">
186+ <field type="REGION" name="source" />
187+ <field type="REGION" name="destination" />
188+ </request>
189+
190+ <request name="UnionRegion" opcode="13">
191+ <field type="REGION" name="source1" />
192+ <field type="REGION" name="source2" />
193+ <field type="REGION" name="destination" />
194+ </request>
195+
196+ <request name="IntersectRegion" opcode="14">
197+ <field type="REGION" name="source1" />
198+ <field type="REGION" name="source2" />
199+ <field type="REGION" name="destination" />
200+ </request>
201+
202+ <request name="SubtractRegion" opcode="15">
203+ <field type="REGION" name="source1" />
204+ <field type="REGION" name="source2" />
205+ <field type="REGION" name="destination" />
206+ </request>
207+
208+ <request name="InvertRegion" opcode="16">
209+ <field type="REGION" name="source" />
210+ <field type="RECTANGLE" name="bounds" />
211+ <field type="REGION" name="destination" />
212+ </request>
213+
214+ <request name="TranslateRegion" opcode="17">
215+ <field type="REGION" name="region" />
216+ <field type="INT16" name="dx" />
217+ <field type="INT16" name="dy" />
218+ </request>
219+
220+ <request name="RegionExtents" opcode="18">
221+ <field type="REGION" name="source" />
222+ <field type="REGION" name="destination" />
223+ </request>
224+
225+ <request name="FetchRegion" opcode="19">
226+ <field type="REGION" name="region" />
227+ <reply>
228+ <pad bytes="1" />
229+ <field type="RECTANGLE" name="extents" />
230+ <pad bytes="16" />
231+ <list type="RECTANGLE" name="rectangles">
232+ <op op='/'>
233+ <fieldref>length</fieldref>
234+ <value>2</value>
235+ </op>
236+ </list>
237+ </reply>
238+ </request>
239+
240+ <request name="SetGCClipRegion" opcode="20">
241+ <field type="GCONTEXT" name="gc" />
242+ <field type="REGION" name="region" altenum="Region" />
243+ <field type="INT16" name="x_origin" />
244+ <field type="INT16" name="y_origin" />
245+ </request>
246+
247+ <request name="SetWindowShapeRegion" opcode="21">
248+ <field type="WINDOW" name="dest" />
249+ <field type="shape:KIND" name="dest_kind" enum="SK" />
250+ <pad bytes="3" />
251+ <field type="INT16" name="x_offset" />
252+ <field type="INT16" name="y_offset" />
253+ <field type="REGION" name="region" altenum="Region" />
254+ </request>
255+
256+ <request name="SetPictureClipRegion" opcode="22">
257+ <field type="PICTURE" name="picture" />
258+ <field type="REGION" name="region" altenum="Region" />
259+ <field type="INT16" name="x_origin" />
260+ <field type="INT16" name="y_origin" />
261+ </request>
262+
263+ <request name="SetCursorName" opcode="23">
264+ <field type="CURSOR" name="cursor" />
265+ <field type="CARD16" name="nbytes" />
266+ <pad bytes="2" />
267+ <list type="char" name="name"><fieldref>nbytes</fieldref></list>
268+ </request>
269+
270+ <request name="GetCursorName" opcode="24">
271+ <field type="CURSOR" name="cursor" />
272+ <reply>
273+ <pad bytes="1" />
274+ <field type="ATOM" name="atom" altenum="Atom" />
275+ <field type="CARD16" name="nbytes" />
276+ <pad bytes="18" />
277+ <list type="char" name="name"><fieldref>nbytes</fieldref></list>
278+ </reply>
279+ </request>
280+
281+ <request name="GetCursorImageAndName" opcode="25">
282+ <reply>
283+ <pad bytes="1" />
284+ <field type="INT16" name="x" />
285+ <field type="INT16" name="y" />
286+ <field type="CARD16" name="width" />
287+ <field type="CARD16" name="height" />
288+ <field type="CARD16" name="xhot" />
289+ <field type="CARD16" name="yhot" />
290+ <field type="CARD32" name="cursor_serial" />
291+ <field type="ATOM" name="cursor_atom" altenum="Atom" />
292+ <field type="CARD16" name="nbytes" />
293+ <pad bytes="2" />
294+ <list type="CARD32" name="cursor_image">
295+ <op op="*">
296+ <fieldref>width</fieldref>
297+ <fieldref>height</fieldref>
298+ </op>
299+ </list>
300+ <list type="char" name="name"><fieldref>nbytes</fieldref></list>
301+ </reply>
302+ </request>
303+
304+ <request name="ChangeCursor" opcode="26">
305+ <field type="CURSOR" name="source" />
306+ <field type="CURSOR" name="destination" />
307+ </request>
308+
309+ <request name="ChangeCursorByName" opcode="27">
310+ <field type="CURSOR" name="src" />
311+ <field type="CARD16" name="nbytes" />
312+ <pad bytes="2" />
313+ <list type="char" name="name"><fieldref>nbytes</fieldref></list>
314+ </request>
315+
316+ <!-- Version 3 -->
317+ <request name="ExpandRegion" opcode="28">
318+ <field type="REGION" name="source" />
319+ <field type="REGION" name="destination" />
320+ <field type="CARD16" name="left" />
321+ <field type="CARD16" name="right" />
322+ <field type="CARD16" name="top" />
323+ <field type="CARD16" name="bottom" />
324+ </request>
325+
326+ <!-- Version 4 -->
327+ <request name="HideCursor" opcode="29">
328+ <field type="WINDOW" name="window" />
329+ </request>
330+
331+ <request name="ShowCursor" opcode="30">
332+ <field type="WINDOW" name="window" />
333+ </request>
334+
335+ <!-- Version 5 -->
336+
337+ <xidtype name="BARRIER" />
338+
339+ <enum name="BarrierDirections">
340+ <item name="PositiveX"><bit>0</bit></item>
341+ <item name="PositiveY"><bit>1</bit></item>
342+ <item name="NegativeX"><bit>2</bit></item>
343+ <item name="NegativeY"><bit>3</bit></item>
344+ </enum>
345+
346+ <request name="CreatePointerBarrier" opcode="31">
347+ <field type="BARRIER" name="barrier" />
348+ <field type="WINDOW" name="window" />
349+ <field type="CARD16" name="x1" />
350+ <field type="CARD16" name="y1" />
351+ <field type="CARD16" name="x2" />
352+ <field type="CARD16" name="y2" />
353+ <field type="CARD32" name="directions" mask="BarrierDirections" />
354+ <pad bytes="2" />
355+ <field type="CARD16" name="num_devices" />
356+ <list type="CARD16" name="devices"><fieldref>num_devices</fieldref></list>
357+ </request>
358+
359+ <request name="DeletePointerBarrier" opcode="32">
360+ <field type="BARRIER" name="barrier" />
361+ </request>
362+
363+ <!-- Version 6 -->
364+
365+ <enum name="ClientDisconnectFlags">
366+ <item name="Default"><value>0</value></item>
367+ <item name="Terminate"><bit>0</bit></item>
368+ <doc>
369+ <field name="Default"><![CDATA[
370+The default behavior for regular clients: the X11 server won't terminate as long
371+as such clients are still connected, and should this client disconnect, the
372+server will continue running so long as other clients (that have not set
373+XFixesClientDisconnectFlagTerminate) are connected.
374+ ]]></field>
375+ <field name="Terminate"><![CDATA[
376+Indicates to the X11 server that it can ignore the client and terminate itself
377+even though the client is still connected to the X11 server.
378+ ]]></field>
379+ </doc>
380+ </enum>
381+
382+ <request name="SetClientDisconnectMode" opcode="33">
383+ <field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
384+ <doc>
385+ <brief>Sets the disconnect mode for the client.</brief>
386+ <field name="disconnect_mode"><![CDATA[
387+The new disconnect mode.
388+ ]]></field>
389+ </doc>
390+ </request>
391+
392+ <request name="GetClientDisconnectMode" opcode="34">
393+ <reply>
394+ <pad bytes="1" />
395+ <field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
396+ <pad bytes="20" />
397+ <doc>
398+ <brief>Gets the disconnect mode for the client.</brief>
399+ <field name="disconnect_mode"><![CDATA[
400+The current disconnect mode.
401+ ]]></field>
402+ </doc>
403+ </reply>
404+ </request>
405+</xcb>
A spec/xml/xproto.xml +5617 -0
@@ -0,0 +1,5617 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+Copyright (C) 2001-2004 Bart Massey, Jamey Sharp, and Josh Triplett.
4+All Rights Reserved.
5+
6+Permission is hereby granted, free of charge, to any person obtaining a copy
7+of this software and associated documentation files (the "Software"), to deal
8+in the Software without restriction, including without limitation the rights
9+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+copies of the Software, and to permit persons to whom the Software is
11+furnished to do so, subject to the following conditions:
12+
13+The above copyright notice and this permission notice shall be included in all
14+copies or substantial portions of the Software.
15+
16+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
23+Except as contained in this notice, the names of the authors or their
24+institutions shall not be used in advertising or otherwise to promote the
25+sale, use or other dealings in this Software without prior written
26+authorization from the authors.
27+-->
28+<xcb header="xproto">
29+ <!-- Core protocol types -->
30+
31+ <struct name="CHAR2B">
32+ <field type="CARD8" name="byte1" />
33+ <field type="CARD8" name="byte2" />
34+ </struct>
35+
36+ <xidtype name="WINDOW" />
37+
38+ <xidtype name="PIXMAP" />
39+
40+ <xidtype name="CURSOR" />
41+
42+ <xidtype name="FONT" />
43+
44+ <xidtype name="GCONTEXT" />
45+
46+ <xidtype name="COLORMAP" />
47+
48+ <xidtype name="ATOM" />
49+
50+ <xidunion name="DRAWABLE">
51+ <type>WINDOW</type>
52+ <type>PIXMAP</type>
53+ </xidunion>
54+
55+ <xidunion name="FONTABLE">
56+ <type>FONT</type>
57+ <type>GCONTEXT</type>
58+ </xidunion>
59+
60+ <typedef oldname="CARD32" newname="BOOL32" />
61+ <typedef oldname="CARD32" newname="VISUALID" />
62+
63+ <typedef oldname="CARD32" newname="TIMESTAMP" />
64+
65+ <typedef oldname="CARD32" newname="KEYSYM" />
66+
67+ <typedef oldname="CARD8" newname="KEYCODE" />
68+
69+ <typedef oldname="CARD32" newname="KEYCODE32" />
70+
71+ <typedef oldname="CARD8" newname="BUTTON" />
72+
73+ <struct name="POINT">
74+ <field type="INT16" name="x" />
75+ <field type="INT16" name="y" />
76+ </struct>
77+
78+ <struct name="RECTANGLE">
79+ <field type="INT16" name="x" />
80+ <field type="INT16" name="y" />
81+ <field type="CARD16" name="width" />
82+ <field type="CARD16" name="height" />
83+ </struct>
84+
85+ <struct name="ARC">
86+ <field type="INT16" name="x" />
87+ <field type="INT16" name="y" />
88+ <field type="CARD16" name="width" />
89+ <field type="CARD16" name="height" />
90+ <field type="INT16" name="angle1" />
91+ <field type="INT16" name="angle2" />
92+ </struct>
93+
94+ <!-- Connection setup-related types -->
95+
96+ <struct name="FORMAT">
97+ <field type="CARD8" name="depth" />
98+ <field type="CARD8" name="bits_per_pixel" />
99+ <field type="CARD8" name="scanline_pad" />
100+ <pad bytes="5" />
101+ </struct>
102+
103+ <enum name="VisualClass">
104+ <item name="StaticGray"> <value>0</value></item>
105+ <item name="GrayScale"> <value>1</value></item>
106+ <item name="StaticColor"><value>2</value></item>
107+ <item name="PseudoColor"><value>3</value></item>
108+ <item name="TrueColor"> <value>4</value></item>
109+ <item name="DirectColor"><value>5</value></item>
110+ </enum>
111+
112+ <struct name="VISUALTYPE">
113+ <field type="VISUALID" name="visual_id" />
114+ <field type="CARD8" name="class" enum="VisualClass" />
115+ <field type="CARD8" name="bits_per_rgb_value" />
116+ <field type="CARD16" name="colormap_entries" />
117+ <field type="CARD32" name="red_mask" />
118+ <field type="CARD32" name="green_mask" />
119+ <field type="CARD32" name="blue_mask" />
120+ <pad bytes="4" />
121+ </struct>
122+
123+ <struct name="DEPTH">
124+ <field type="CARD8" name="depth" />
125+ <pad bytes="1" />
126+ <field type="CARD16" name="visuals_len" />
127+ <pad bytes="4" />
128+ <list type="VISUALTYPE" name="visuals">
129+ <fieldref>visuals_len</fieldref>
130+ </list>
131+ </struct>
132+
133+ <enum name="EventMask">
134+ <item name="NoEvent"> <value>0</value></item>
135+ <item name="KeyPress"> <bit>0</bit></item>
136+ <item name="KeyRelease"> <bit>1</bit></item>
137+ <item name="ButtonPress"> <bit>2</bit></item>
138+ <item name="ButtonRelease"> <bit>3</bit></item>
139+ <item name="EnterWindow"> <bit>4</bit></item>
140+ <item name="LeaveWindow"> <bit>5</bit></item>
141+ <item name="PointerMotion"> <bit>6</bit></item>
142+ <item name="PointerMotionHint"> <bit>7</bit></item>
143+ <item name="Button1Motion"> <bit>8</bit></item>
144+ <item name="Button2Motion"> <bit>9</bit></item>
145+ <item name="Button3Motion"> <bit>10</bit></item>
146+ <item name="Button4Motion"> <bit>11</bit></item>
147+ <item name="Button5Motion"> <bit>12</bit></item>
148+ <item name="ButtonMotion"> <bit>13</bit></item>
149+ <item name="KeymapState"> <bit>14</bit></item>
150+ <item name="Exposure"> <bit>15</bit></item>
151+ <item name="VisibilityChange"> <bit>16</bit></item>
152+ <item name="StructureNotify"> <bit>17</bit></item>
153+ <item name="ResizeRedirect"> <bit>18</bit></item>
154+ <item name="SubstructureNotify"> <bit>19</bit></item>
155+ <item name="SubstructureRedirect"><bit>20</bit></item>
156+ <item name="FocusChange"> <bit>21</bit></item>
157+ <item name="PropertyChange"> <bit>22</bit></item>
158+ <item name="ColorMapChange"> <bit>23</bit></item>
159+ <item name="OwnerGrabButton"> <bit>24</bit></item>
160+ </enum>
161+
162+ <enum name="BackingStore">
163+ <item name="NotUseful"> <value>0</value></item>
164+ <item name="WhenMapped"><value>1</value></item>
165+ <item name="Always"> <value>2</value></item>
166+ </enum>
167+
168+ <struct name="SCREEN">
169+ <field type="WINDOW" name="root" />
170+ <field type="COLORMAP" name="default_colormap" />
171+ <field type="CARD32" name="white_pixel" />
172+ <field type="CARD32" name="black_pixel" />
173+ <field type="CARD32" name="current_input_masks" mask="EventMask" />
174+ <field type="CARD16" name="width_in_pixels" />
175+ <field type="CARD16" name="height_in_pixels" />
176+ <field type="CARD16" name="width_in_millimeters" />
177+ <field type="CARD16" name="height_in_millimeters" />
178+ <field type="CARD16" name="min_installed_maps" />
179+ <field type="CARD16" name="max_installed_maps" />
180+ <field type="VISUALID" name="root_visual" />
181+ <field type="BYTE" name="backing_stores" enum="BackingStore" />
182+ <field type="BOOL" name="save_unders" />
183+ <field type="CARD8" name="root_depth" />
184+ <field type="CARD8" name="allowed_depths_len" />
185+ <list type="DEPTH" name="allowed_depths">
186+ <fieldref>allowed_depths_len</fieldref>
187+ </list>
188+ </struct>
189+
190+ <struct name="SetupRequest">
191+ <field type="CARD8" name="byte_order" />
192+ <pad bytes="1" />
193+ <field type="CARD16" name="protocol_major_version" />
194+ <field type="CARD16" name="protocol_minor_version" />
195+ <field type="CARD16" name="authorization_protocol_name_len" />
196+ <field type="CARD16" name="authorization_protocol_data_len" />
197+ <pad bytes="2" />
198+ <list type="char" name="authorization_protocol_name">
199+ <fieldref>authorization_protocol_name_len</fieldref>
200+ </list>
201+ <pad align="4" />
202+ <list type="char" name="authorization_protocol_data">
203+ <fieldref>authorization_protocol_data_len</fieldref>
204+ </list>
205+ <pad align="4" />
206+ </struct>
207+
208+ <struct name="SetupFailed">
209+ <field type="CARD8" name="status" /> <!-- always 0 -> Failed -->
210+ <field type="CARD8" name="reason_len" />
211+ <field type="CARD16" name="protocol_major_version" />
212+ <field type="CARD16" name="protocol_minor_version" />
213+ <field type="CARD16" name="length" />
214+ <list type="char" name="reason">
215+ <fieldref>reason_len</fieldref>
216+ </list>
217+ </struct>
218+
219+ <struct name="SetupAuthenticate">
220+ <field type="CARD8" name="status" /> <!-- always 2 -> Authenticate -->
221+ <pad bytes="5" />
222+ <field type="CARD16" name="length" />
223+ <list type="char" name="reason">
224+ <op op="*">
225+ <fieldref>length</fieldref>
226+ <value>4</value>
227+ </op>
228+ </list>
229+ </struct>
230+
231+ <enum name="ImageOrder">
232+ <item name="LSBFirst"><value>0</value></item>
233+ <item name="MSBFirst"><value>1</value></item>
234+ </enum>
235+
236+ <struct name="Setup">
237+ <field type="CARD8" name="status" /> <!-- always 1 -> Success -->
238+ <pad bytes="1" />
239+ <field type="CARD16" name="protocol_major_version" />
240+ <field type="CARD16" name="protocol_minor_version" />
241+ <field type="CARD16" name="length" />
242+ <field type="CARD32" name="release_number" />
243+ <field type="CARD32" name="resource_id_base" />
244+ <field type="CARD32" name="resource_id_mask" />
245+ <field type="CARD32" name="motion_buffer_size" />
246+ <field type="CARD16" name="vendor_len" />
247+ <field type="CARD16" name="maximum_request_length" />
248+ <field type="CARD8" name="roots_len" />
249+ <field type="CARD8" name="pixmap_formats_len" />
250+ <field type="CARD8" name="image_byte_order" enum="ImageOrder" />
251+ <field type="CARD8" name="bitmap_format_bit_order" enum="ImageOrder" />
252+ <field type="CARD8" name="bitmap_format_scanline_unit" />
253+ <field type="CARD8" name="bitmap_format_scanline_pad" />
254+ <field type="KEYCODE" name="min_keycode" />
255+ <field type="KEYCODE" name="max_keycode" />
256+ <pad bytes="4" />
257+ <list type="char" name="vendor">
258+ <fieldref>vendor_len</fieldref>
259+ </list>
260+ <pad align="4" />
261+ <list type="FORMAT" name="pixmap_formats">
262+ <fieldref>pixmap_formats_len</fieldref>
263+ </list>
264+ <list type="SCREEN" name="roots">
265+ <fieldref>roots_len</fieldref>
266+ </list>
267+ </struct>
268+
269+ <!-- Core event types -->
270+
271+ <enum name="ModMask">
272+ <item name="Shift"> <bit>0</bit></item>
273+ <item name="Lock"> <bit>1</bit></item>
274+ <item name="Control"><bit>2</bit></item>
275+ <item name="1"> <bit>3</bit></item>
276+ <item name="2"> <bit>4</bit></item>
277+ <item name="3"> <bit>5</bit></item>
278+ <item name="4"> <bit>6</bit></item>
279+ <item name="5"> <bit>7</bit></item>
280+ <item name="Any"> <bit>15</bit></item>
281+ </enum>
282+
283+ <enum name="KeyButMask">
284+ <item name="Shift"> <bit>0</bit></item>
285+ <item name="Lock"> <bit>1</bit></item>
286+ <item name="Control"><bit>2</bit></item>
287+ <item name="Mod1"> <bit>3</bit></item>
288+ <item name="Mod2"> <bit>4</bit></item>
289+ <item name="Mod3"> <bit>5</bit></item>
290+ <item name="Mod4"> <bit>6</bit></item>
291+ <item name="Mod5"> <bit>7</bit></item>
292+ <item name="Button1"><bit>8</bit></item>
293+ <item name="Button2"><bit>9</bit></item>
294+ <item name="Button3"><bit>10</bit></item>
295+ <item name="Button4"><bit>11</bit></item>
296+ <item name="Button5"><bit>12</bit></item>
297+ </enum>
298+
299+ <enum name="Window">
300+ <item name="None"> <value>0</value></item>
301+ </enum>
302+
303+ <event name="KeyPress" number="2">
304+ <field type="KEYCODE" name="detail" />
305+ <field type="TIMESTAMP" name="time" />
306+ <field type="WINDOW" name="root" />
307+ <field type="WINDOW" name="event" />
308+ <field type="WINDOW" name="child" altenum="Window" />
309+ <field type="INT16" name="root_x" />
310+ <field type="INT16" name="root_y" />
311+ <field type="INT16" name="event_x" />
312+ <field type="INT16" name="event_y" />
313+ <field type="CARD16" name="state" mask="KeyButMask" />
314+ <field type="BOOL" name="same_screen" />
315+ <pad bytes="1" />
316+ <doc>
317+ <brief>a key was pressed/released</brief>
318+ <field name="detail"><![CDATA[
319+The keycode (a number representing a physical key on the keyboard) of the key
320+which was pressed.
321+ ]]></field>
322+ <field name="time"><![CDATA[
323+Time when the event was generated (in milliseconds).
324+ ]]></field>
325+ <field name="root"><![CDATA[
326+The root window of `child`.
327+ ]]></field>
328+ <field name="same_screen"><![CDATA[
329+Whether the `event` window is on the same screen as the `root` window.
330+ ]]></field>
331+ <field name="event_x"><![CDATA[
332+If `same_screen` is true, this is the X coordinate relative to the `event`
333+window's origin. Otherwise, `event_x` will be set to zero.
334+ ]]></field>
335+ <field name="event_y"><![CDATA[
336+If `same_screen` is true, this is the Y coordinate relative to the `event`
337+window's origin. Otherwise, `event_y` will be set to zero.
338+ ]]></field>
339+ <field name="root_x"><![CDATA[
340+The X coordinate of the pointer relative to the `root` window at the time of
341+the event.
342+ ]]></field>
343+ <field name="root_y"><![CDATA[
344+The Y coordinate of the pointer relative to the `root` window at the time of
345+the event.
346+ ]]></field>
347+ <field name="state"><![CDATA[
348+The logical state of the pointer buttons and modifier keys just prior to the
349+event.
350+ ]]></field>
351+ <see type="request" name="GrabKey" />
352+ <see type="request" name="GrabKeyboard" />
353+ </doc>
354+ </event>
355+
356+ <eventcopy name="KeyRelease" number="3" ref="KeyPress" />
357+
358+ <enum name="ButtonMask">
359+ <item name="1"> <bit>8</bit></item>
360+ <item name="2"> <bit>9</bit></item>
361+ <item name="3"> <bit>10</bit></item>
362+ <item name="4"> <bit>11</bit></item>
363+ <item name="5"> <bit>12</bit></item>
364+ <item name="Any"> <bit>15</bit></item>
365+ </enum>
366+
367+ <event name="ButtonPress" number="4">
368+ <field type="BUTTON" name="detail" />
369+ <field type="TIMESTAMP" name="time" />
370+ <field type="WINDOW" name="root" />
371+ <field type="WINDOW" name="event" />
372+ <field type="WINDOW" name="child" altenum="Window" />
373+ <field type="INT16" name="root_x" />
374+ <field type="INT16" name="root_y" />
375+ <field type="INT16" name="event_x" />
376+ <field type="INT16" name="event_y" />
377+ <field type="CARD16" name="state" mask="KeyButMask" />
378+ <field type="BOOL" name="same_screen" />
379+ <pad bytes="1" />
380+ <doc>
381+ <brief>a mouse button was pressed/released</brief>
382+ <field name="detail"><![CDATA[
383+The keycode (a number representing a physical key on the keyboard) of the key
384+which was pressed.
385+ ]]></field>
386+ <field name="time"><![CDATA[
387+Time when the event was generated (in milliseconds).
388+ ]]></field>
389+ <field name="root"><![CDATA[
390+The root window of `child`.
391+ ]]></field>
392+ <field name="same_screen"><![CDATA[
393+Whether the `event` window is on the same screen as the `root` window.
394+ ]]></field>
395+ <field name="event_x"><![CDATA[
396+If `same_screen` is true, this is the X coordinate relative to the `event`
397+window's origin. Otherwise, `event_x` will be set to zero.
398+ ]]></field>
399+ <field name="event_y"><![CDATA[
400+If `same_screen` is true, this is the Y coordinate relative to the `event`
401+window's origin. Otherwise, `event_y` will be set to zero.
402+ ]]></field>
403+ <field name="root_x"><![CDATA[
404+The X coordinate of the pointer relative to the `root` window at the time of
405+the event.
406+ ]]></field>
407+ <field name="root_y"><![CDATA[
408+The Y coordinate of the pointer relative to the `root` window at the time of
409+the event.
410+ ]]></field>
411+ <field name="state"><![CDATA[
412+The logical state of the pointer buttons and modifier keys just prior to the
413+event.
414+ ]]></field>
415+ <see type="request" name="GrabButton" />
416+ <see type="request" name="GrabPointer" />
417+ </doc>
418+ </event>
419+
420+ <eventcopy name="ButtonRelease" number="5" ref="ButtonPress" />
421+
422+ <!-- MotionNotify detail -->
423+ <enum name="Motion">
424+ <item name="Normal"><value>0</value></item>
425+ <item name="Hint"> <value>1</value></item>
426+ </enum>
427+
428+ <event name="MotionNotify" number="6">
429+ <field type="BYTE" name="detail" enum="Motion" />
430+ <field type="TIMESTAMP" name="time" />
431+ <field type="WINDOW" name="root" />
432+ <field type="WINDOW" name="event" />
433+ <field type="WINDOW" name="child" altenum="Window" />
434+ <field type="INT16" name="root_x" />
435+ <field type="INT16" name="root_y" />
436+ <field type="INT16" name="event_x" />
437+ <field type="INT16" name="event_y" />
438+ <field type="CARD16" name="state" mask="KeyButMask" />
439+ <field type="BOOL" name="same_screen" />
440+ <pad bytes="1" />
441+ <doc>
442+ <brief>a key was pressed</brief>
443+ <field name="detail"><![CDATA[
444+The keycode (a number representing a physical key on the keyboard) of the key
445+which was pressed.
446+ ]]></field>
447+ <field name="time"><![CDATA[
448+Time when the event was generated (in milliseconds).
449+ ]]></field>
450+ <field name="root"><![CDATA[
451+The root window of `child`.
452+ ]]></field>
453+ <field name="same_screen"><![CDATA[
454+Whether the `event` window is on the same screen as the `root` window.
455+ ]]></field>
456+ <field name="event_x"><![CDATA[
457+If `same_screen` is true, this is the X coordinate relative to the `event`
458+window's origin. Otherwise, `event_x` will be set to zero.
459+ ]]></field>
460+ <field name="event_y"><![CDATA[
461+If `same_screen` is true, this is the Y coordinate relative to the `event`
462+window's origin. Otherwise, `event_y` will be set to zero.
463+ ]]></field>
464+ <field name="root_x"><![CDATA[
465+The X coordinate of the pointer relative to the `root` window at the time of
466+the event.
467+ ]]></field>
468+ <field name="root_y"><![CDATA[
469+The Y coordinate of the pointer relative to the `root` window at the time of
470+the event.
471+ ]]></field>
472+ <field name="state"><![CDATA[
473+The logical state of the pointer buttons and modifier keys just prior to the
474+event.
475+ ]]></field>
476+ <see type="request" name="GrabKey" />
477+ <see type="request" name="GrabKeyboard" />
478+ </doc>
479+ </event>
480+
481+ <enum name="NotifyDetail">
482+ <item name="Ancestor"> <value>0</value></item>
483+ <item name="Virtual"> <value>1</value></item>
484+ <item name="Inferior"> <value>2</value></item>
485+ <item name="Nonlinear"> <value>3</value></item>
486+ <item name="NonlinearVirtual"><value>4</value></item>
487+ <item name="Pointer"> <value>5</value></item>
488+ <item name="PointerRoot"> <value>6</value></item>
489+ <item name="None"> <value>7</value></item>
490+ </enum>
491+
492+ <enum name="NotifyMode">
493+ <item name="Normal"> <value>0</value></item>
494+ <item name="Grab"> <value>1</value></item>
495+ <item name="Ungrab"> <value>2</value></item>
496+ <item name="WhileGrabbed"><value>3</value></item>
497+ </enum>
498+
499+ <event name="EnterNotify" number="7">
500+ <field type="BYTE" name="detail" enum="NotifyDetail" />
501+ <field type="TIMESTAMP" name="time" />
502+ <field type="WINDOW" name="root" />
503+ <field type="WINDOW" name="event" />
504+ <field type="WINDOW" name="child" altenum="Window" />
505+ <field type="INT16" name="root_x" />
506+ <field type="INT16" name="root_y" />
507+ <field type="INT16" name="event_x" />
508+ <field type="INT16" name="event_y" />
509+ <field type="CARD16" name="state" mask="KeyButMask" />
510+ <field type="BYTE" name="mode" enum="NotifyMode" />
511+ <field type="BYTE" name="same_screen_focus" />
512+ <doc>
513+ <brief>the pointer is in a different window</brief>
514+ <field name="event"><![CDATA[
515+The window on which the event was generated.
516+ ]]></field>
517+ <field name="child"><![CDATA[
518+If the `event` window has subwindows and the final pointer position is in one
519+of them, then `child` is set to that subwindow, `XCB_WINDOW_NONE` otherwise.
520+ ]]></field>
521+ <field name="root"><![CDATA[
522+The root window for the final cursor position.
523+ ]]></field>
524+ <field name="root_x"><![CDATA[
525+The pointer X coordinate relative to `root`'s origin at the time of the event.
526+ ]]></field>
527+ <field name="root_y"><![CDATA[
528+The pointer Y coordinate relative to `root`'s origin at the time of the event.
529+ ]]></field>
530+ <field name="event_x"><![CDATA[
531+If `event` is on the same screen as `root`, this is the pointer X coordinate
532+relative to the event window's origin.
533+ ]]></field>
534+ <field name="event_y"><![CDATA[
535+If `event` is on the same screen as `root`, this is the pointer Y coordinate
536+relative to the event window's origin.
537+ ]]></field>
538+ <field name="mode" />
539+ </doc>
540+ </event>
541+
542+ <eventcopy name="LeaveNotify" number="8" ref="EnterNotify" />
543+
544+ <event name="FocusIn" number="9">
545+ <field type="BYTE" name="detail" enum="NotifyDetail" />
546+ <field type="WINDOW" name="event" />
547+ <field type="BYTE" name="mode" enum="NotifyMode" />
548+ <pad bytes="3" />
549+ <doc>
550+ <brief>NOT YET DOCUMENTED</brief>
551+ <field name="event"><![CDATA[
552+The window on which the focus event was generated. This is the window used by
553+the X server to report the event.
554+ ]]></field>
555+ <!-- enum documentation is sufficient -->
556+ <field name="detail" />
557+ <field name="mode" />
558+ </doc>
559+ </event>
560+
561+ <eventcopy name="FocusOut" number="10" ref="FocusIn" />
562+
563+ <event name="KeymapNotify" number="11" no-sequence-number="true">
564+ <list type="CARD8" name="keys"><value>31</value></list>
565+ </event>
566+
567+ <event name="Expose" number="12">
568+ <pad bytes="1" />
569+ <field type="WINDOW" name="window" />
570+ <field type="CARD16" name="x" />
571+ <field type="CARD16" name="y" />
572+ <field type="CARD16" name="width" />
573+ <field type="CARD16" name="height" />
574+ <field type="CARD16" name="count" />
575+ <pad bytes="2" />
576+ <doc>
577+ <brief>NOT YET DOCUMENTED</brief>
578+ <field name="window"><![CDATA[
579+The exposed (damaged) window.
580+ ]]></field>
581+ <field name="x"><![CDATA[
582+The X coordinate of the left-upper corner of the exposed rectangle, relative to
583+the `window`'s origin.
584+ ]]></field>
585+ <field name="y"><![CDATA[
586+The Y coordinate of the left-upper corner of the exposed rectangle, relative to
587+the `window`'s origin.
588+ ]]></field>
589+ <field name="width"><![CDATA[
590+The width of the exposed rectangle.
591+ ]]></field>
592+ <field name="height"><![CDATA[
593+The height of the exposed rectangle.
594+ ]]></field>
595+ <field name="count"><![CDATA[
596+The amount of `Expose` events following this one. Simple applications that do
597+not want to optimize redisplay by distinguishing between subareas of its window
598+can just ignore all Expose events with nonzero counts and perform full
599+redisplays on events with zero counts.
600+ ]]></field>
601+ </doc>
602+ </event>
603+
604+ <event name="GraphicsExposure" number="13">
605+ <pad bytes="1" />
606+ <field type="DRAWABLE" name="drawable" />
607+ <field type="CARD16" name="x" />
608+ <field type="CARD16" name="y" />
609+ <field type="CARD16" name="width" />
610+ <field type="CARD16" name="height" />
611+ <field type="CARD16" name="minor_opcode" />
612+ <field type="CARD16" name="count" />
613+ <field type="CARD8" name="major_opcode" />
614+ <pad bytes="3" />
615+ </event>
616+
617+ <event name="NoExposure" number="14">
618+ <pad bytes="1" />
619+ <field type="DRAWABLE" name="drawable" />
620+ <field type="CARD16" name="minor_opcode" />
621+ <field type="CARD8" name="major_opcode" />
622+ <pad bytes="1" />
623+ </event>
624+
625+ <enum name="Visibility">
626+ <item name="Unobscured"> <value>0</value></item>
627+ <item name="PartiallyObscured"><value>1</value></item>
628+ <item name="FullyObscured"> <value>2</value></item>
629+ </enum>
630+
631+ <event name="VisibilityNotify" number="15">
632+ <pad bytes="1" />
633+ <field type="WINDOW" name="window" />
634+ <field type="BYTE" name="state" enum="Visibility" />
635+ <pad bytes="3" />
636+ </event>
637+
638+ <event name="CreateNotify" number="16">
639+ <pad bytes="1" />
640+ <field type="WINDOW" name="parent" />
641+ <field type="WINDOW" name="window" />
642+ <field type="INT16" name="x" />
643+ <field type="INT16" name="y" />
644+ <field type="CARD16" name="width" />
645+ <field type="CARD16" name="height" />
646+ <field type="CARD16" name="border_width" />
647+ <field type="BOOL" name="override_redirect" />
648+ <pad bytes="1" />
649+ </event>
650+
651+ <event name="DestroyNotify" number="17">
652+ <pad bytes="1" />
653+ <field type="WINDOW" name="event" />
654+ <field type="WINDOW" name="window" />
655+ <doc>
656+ <brief>a window is destroyed</brief>
657+ <field name="event"><![CDATA[
658+The reconfigured window or its parent, depending on whether `StructureNotify`
659+or `SubstructureNotify` was selected.
660+ ]]></field>
661+ <field name="window"><![CDATA[
662+The window that is destroyed.
663+ ]]></field>
664+ <see type="request" name="DestroyWindow" />
665+ </doc>
666+ </event>
667+
668+ <event name="UnmapNotify" number="18">
669+ <pad bytes="1" />
670+ <field type="WINDOW" name="event" />
671+ <field type="WINDOW" name="window" />
672+ <field type="BOOL" name="from_configure" />
673+ <pad bytes="3" />
674+ <doc>
675+ <brief>a window is unmapped</brief>
676+ <field name="event"><![CDATA[
677+The reconfigured window or its parent, depending on whether `StructureNotify`
678+or `SubstructureNotify` was selected.
679+ ]]></field>
680+ <field name="window"><![CDATA[
681+The window that was unmapped.
682+ ]]></field>
683+ <field name="from_configure"><![CDATA[
684+Set to 1 if the event was generated as a result of a resizing of the window's
685+parent when `window` had a win_gravity of `UnmapGravity`.
686+ ]]></field>
687+ <see type="request" name="UnmapWindow" />
688+ </doc>
689+ </event>
690+
691+ <event name="MapNotify" number="19">
692+ <pad bytes="1" />
693+ <field type="WINDOW" name="event" />
694+ <field type="WINDOW" name="window" />
695+ <field type="BOOL" name="override_redirect" />
696+ <pad bytes="3" />
697+ <doc>
698+ <brief>a window was mapped</brief>
699+ <field name="event"><![CDATA[
700+The window which was mapped or its parent, depending on whether
701+`StructureNotify` or `SubstructureNotify` was selected.
702+ ]]></field>
703+ <field name="window"><![CDATA[
704+The window that was mapped.
705+ ]]></field>
706+ <field name="override_redirect"><![CDATA[
707+Window managers should ignore this window if `override_redirect` is 1.
708+ ]]></field>
709+ <see type="request" name="MapWindow" />
710+ </doc>
711+ </event>
712+
713+ <event name="MapRequest" number="20">
714+ <pad bytes="1" />
715+ <field type="WINDOW" name="parent" />
716+ <field type="WINDOW" name="window" />
717+ <doc>
718+ <brief>window wants to be mapped</brief>
719+ <field name="parent"><![CDATA[
720+The parent of `window`.
721+ ]]></field>
722+ <field name="window"><![CDATA[
723+The window to be mapped.
724+ ]]></field>
725+ <see type="request" name="MapWindow" />
726+ </doc>
727+ </event>
728+
729+ <event name="ReparentNotify" number="21">
730+ <pad bytes="1" />
731+ <field type="WINDOW" name="event" />
732+ <field type="WINDOW" name="window" />
733+ <field type="WINDOW" name="parent" />
734+ <field type="INT16" name="x" />
735+ <field type="INT16" name="y" />
736+ <field type="BOOL" name="override_redirect" />
737+ <pad bytes="3" />
738+ </event>
739+
740+ <event name="ConfigureNotify" number="22">
741+ <pad bytes="1" />
742+ <field type="WINDOW" name="event" />
743+ <field type="WINDOW" name="window" />
744+ <field type="WINDOW" name="above_sibling" altenum="Window" />
745+ <field type="INT16" name="x" />
746+ <field type="INT16" name="y" />
747+ <field type="CARD16" name="width" />
748+ <field type="CARD16" name="height" />
749+ <field type="CARD16" name="border_width" />
750+ <field type="BOOL" name="override_redirect" />
751+ <pad bytes="1" />
752+ <doc>
753+ <brief>NOT YET DOCUMENTED</brief>
754+ <field name="event"><![CDATA[
755+The reconfigured window or its parent, depending on whether `StructureNotify`
756+or `SubstructureNotify` was selected.
757+ ]]></field>
758+ <field name="window"><![CDATA[
759+The window whose size, position, border, and/or stacking order was changed.
760+ ]]></field>
761+ <field name="above_sibling"><![CDATA[
762+If `XCB_NONE`, the `window` is on the bottom of the stack with respect to
763+sibling windows. However, if set to a sibling window, the `window` is placed on
764+top of this sibling window.
765+ ]]></field>
766+ <field name="x"><![CDATA[
767+The X coordinate of the upper-left outside corner of `window`, relative to the
768+parent window's origin.
769+ ]]></field>
770+ <field name="y"><![CDATA[
771+The Y coordinate of the upper-left outside corner of `window`, relative to the
772+parent window's origin.
773+ ]]></field>
774+ <field name="width"><![CDATA[
775+The inside width of `window`, not including the border.
776+ ]]></field>
777+ <field name="height"><![CDATA[
778+The inside height of `window`, not including the border.
779+ ]]></field>
780+ <field name="border_width"><![CDATA[
781+The border width of `window`.
782+ ]]></field>
783+ <field name="override_redirect"><![CDATA[
784+Window managers should ignore this window if `override_redirect` is 1.
785+ ]]></field>
786+ <see type="request" name="FreeColormap" />
787+ </doc>
788+ </event>
789+
790+ <event name="ConfigureRequest" number="23">
791+ <field type="BYTE" name="stack_mode" enum="StackMode" />
792+ <field type="WINDOW" name="parent" />
793+ <field type="WINDOW" name="window" />
794+ <field type="WINDOW" name="sibling" altenum="Window" />
795+ <field type="INT16" name="x" />
796+ <field type="INT16" name="y" />
797+ <field type="CARD16" name="width" />
798+ <field type="CARD16" name="height" />
799+ <field type="CARD16" name="border_width" />
800+ <field type="CARD16" name="value_mask" mask="ConfigWindow" />
801+ </event>
802+
803+ <event name="GravityNotify" number="24">
804+ <pad bytes="1" />
805+ <field type="WINDOW" name="event" />
806+ <field type="WINDOW" name="window" />
807+ <field type="INT16" name="x" />
808+ <field type="INT16" name="y" />
809+ </event>
810+
811+ <event name="ResizeRequest" number="25">
812+ <pad bytes="1" />
813+ <field type="WINDOW" name="window" />
814+ <field type="CARD16" name="width" />
815+ <field type="CARD16" name="height" />
816+ </event>
817+
818+ <enum name="Place">
819+ <item name="OnTop"> <value>0</value></item>
820+ <item name="OnBottom"><value>1</value></item>
821+ <doc>
822+ <field name="OnTop"><![CDATA[
823+The window is now on top of all siblings.
824+ ]]></field>
825+ <field name="OnBottom"><![CDATA[
826+The window is now below all siblings.
827+ ]]></field>
828+ </doc>
829+ </enum>
830+
831+ <event name="CirculateNotify" number="26">
832+ <pad bytes="1" />
833+ <field type="WINDOW" name="event" />
834+ <field type="WINDOW" name="window" />
835+ <pad bytes="4" />
836+ <field type="BYTE" name="place" enum="Place" />
837+ <pad bytes="3" />
838+ <doc>
839+ <brief>NOT YET DOCUMENTED</brief>
840+ <field name="event"><![CDATA[
841+Either the restacked window or its parent, depending on whether
842+`StructureNotify` or `SubstructureNotify` was selected.
843+ ]]></field>
844+ <field name="window"><![CDATA[
845+The restacked window.
846+ ]]></field>
847+ <!-- the enum doc is sufficient -->
848+ <field name="place" />
849+ <see type="request" name="CirculateWindow" />
850+ </doc>
851+ </event>
852+
853+ <eventcopy name="CirculateRequest" number="27" ref="CirculateNotify" />
854+
855+ <enum name="Property">
856+ <item name="NewValue"><value>0</value></item>
857+ <item name="Delete"> <value>1</value></item>
858+ </enum>
859+
860+ <event name="PropertyNotify" number="28">
861+ <pad bytes="1" />
862+ <field type="WINDOW" name="window" />
863+ <field type="ATOM" name="atom" />
864+ <field type="TIMESTAMP" name="time" />
865+ <field type="BYTE" name="state" enum="Property" />
866+ <pad bytes="3" />
867+ <doc>
868+ <brief>a window property changed</brief>
869+ <field name="window"><![CDATA[
870+The window whose associated property was changed.
871+ ]]></field>
872+ <field name="atom"><![CDATA[
873+The property's atom, to indicate which property was changed.
874+ ]]></field>
875+ <field name="time"><![CDATA[
876+A timestamp of the server time when the property was changed.
877+ ]]></field>
878+ <!-- enum documentation is sufficient -->
879+ <field name="state" />
880+ <see type="request" name="ChangeProperty" />
881+ </doc>
882+ </event>
883+
884+ <event name="SelectionClear" number="29">
885+ <pad bytes="1" />
886+ <field type="TIMESTAMP" name="time" />
887+ <field type="WINDOW" name="owner" />
888+ <field type="ATOM" name="selection" />
889+ </event>
890+
891+ <enum name="Time">
892+ <item name="CurrentTime"> <value>0</value> </item>
893+ </enum>
894+
895+ <enum name="Atom">
896+ <item name="None"> <value>0</value></item>
897+ <item name="Any"> <value>0</value></item>
898+ <item name="PRIMARY"> <value>1</value> </item>
899+ <item name="SECONDARY"> <value>2</value> </item>
900+ <item name="ARC"> <value>3</value> </item>
901+ <item name="ATOM"> <value>4</value> </item>
902+ <item name="BITMAP"> <value>5</value> </item>
903+ <item name="CARDINAL"> <value>6</value> </item>
904+ <item name="COLORMAP"> <value>7</value> </item>
905+ <item name="CURSOR"> <value>8</value> </item>
906+ <item name="CUT_BUFFER0"> <value>9</value> </item>
907+ <item name="CUT_BUFFER1"> <value>10</value> </item>
908+ <item name="CUT_BUFFER2"> <value>11</value> </item>
909+ <item name="CUT_BUFFER3"> <value>12</value> </item>
910+ <item name="CUT_BUFFER4"> <value>13</value> </item>
911+ <item name="CUT_BUFFER5"> <value>14</value> </item>
912+ <item name="CUT_BUFFER6"> <value>15</value> </item>
913+ <item name="CUT_BUFFER7"> <value>16</value> </item>
914+ <item name="DRAWABLE"> <value>17</value> </item>
915+ <item name="FONT"> <value>18</value> </item>
916+ <item name="INTEGER"> <value>19</value> </item>
917+ <item name="PIXMAP"> <value>20</value> </item>
918+ <item name="POINT"> <value>21</value> </item>
919+ <item name="RECTANGLE"> <value>22</value> </item>
920+ <item name="RESOURCE_MANAGER"> <value>23</value> </item>
921+ <item name="RGB_COLOR_MAP"> <value>24</value> </item>
922+ <item name="RGB_BEST_MAP"> <value>25</value> </item>
923+ <item name="RGB_BLUE_MAP"> <value>26</value> </item>
924+ <item name="RGB_DEFAULT_MAP"> <value>27</value> </item>
925+ <item name="RGB_GRAY_MAP"> <value>28</value> </item>
926+ <item name="RGB_GREEN_MAP"> <value>29</value> </item>
927+ <item name="RGB_RED_MAP"> <value>30</value> </item>
928+ <item name="STRING"> <value>31</value> </item>
929+ <item name="VISUALID"> <value>32</value> </item>
930+ <item name="WINDOW"> <value>33</value> </item>
931+ <item name="WM_COMMAND"> <value>34</value> </item>
932+ <item name="WM_HINTS"> <value>35</value> </item>
933+ <item name="WM_CLIENT_MACHINE"> <value>36</value> </item>
934+ <item name="WM_ICON_NAME"> <value>37</value> </item>
935+ <item name="WM_ICON_SIZE"> <value>38</value> </item>
936+ <item name="WM_NAME"> <value>39</value> </item>
937+ <item name="WM_NORMAL_HINTS"> <value>40</value> </item>
938+ <item name="WM_SIZE_HINTS"> <value>41</value> </item>
939+ <item name="WM_ZOOM_HINTS"> <value>42</value> </item>
940+ <item name="MIN_SPACE"> <value>43</value> </item>
941+ <item name="NORM_SPACE"> <value>44</value> </item>
942+ <item name="MAX_SPACE"> <value>45</value> </item>
943+ <item name="END_SPACE"> <value>46</value> </item>
944+ <item name="SUPERSCRIPT_X"> <value>47</value> </item>
945+ <item name="SUPERSCRIPT_Y"> <value>48</value> </item>
946+ <item name="SUBSCRIPT_X"> <value>49</value> </item>
947+ <item name="SUBSCRIPT_Y"> <value>50</value> </item>
948+ <item name="UNDERLINE_POSITION"> <value>51</value> </item>
949+ <item name="UNDERLINE_THICKNESS"> <value>52</value> </item>
950+ <item name="STRIKEOUT_ASCENT"> <value>53</value> </item>
951+ <item name="STRIKEOUT_DESCENT"> <value>54</value> </item>
952+ <item name="ITALIC_ANGLE"> <value>55</value> </item>
953+ <item name="X_HEIGHT"> <value>56</value> </item>
954+ <item name="QUAD_WIDTH"> <value>57</value> </item>
955+ <item name="WEIGHT"> <value>58</value> </item>
956+ <item name="POINT_SIZE"> <value>59</value> </item>
957+ <item name="RESOLUTION"> <value>60</value> </item>
958+ <item name="COPYRIGHT"> <value>61</value> </item>
959+ <item name="NOTICE"> <value>62</value> </item>
960+ <item name="FONT_NAME"> <value>63</value> </item>
961+ <item name="FAMILY_NAME"> <value>64</value> </item>
962+ <item name="FULL_NAME"> <value>65</value> </item>
963+ <item name="CAP_HEIGHT"> <value>66</value> </item>
964+ <item name="WM_CLASS"> <value>67</value> </item>
965+ <item name="WM_TRANSIENT_FOR"> <value>68</value> </item>
966+ </enum>
967+
968+ <event name="SelectionRequest" number="30">
969+ <pad bytes="1" />
970+ <field type="TIMESTAMP" name="time" altenum="Time" />
971+ <field type="WINDOW" name="owner" />
972+ <field type="WINDOW" name="requestor" />
973+ <field type="ATOM" name="selection" />
974+ <field type="ATOM" name="target" />
975+ <field type="ATOM" name="property" altenum="Atom" />
976+ </event>
977+
978+ <event name="SelectionNotify" number="31">
979+ <pad bytes="1" />
980+ <field type="TIMESTAMP" name="time" altenum="Time" />
981+ <field type="WINDOW" name="requestor" />
982+ <field type="ATOM" name="selection" />
983+ <field type="ATOM" name="target" />
984+ <field type="ATOM" name="property" altenum="Atom" />
985+ </event>
986+
987+ <enum name="ColormapState">
988+ <item name="Uninstalled"><value>0</value></item>
989+ <item name="Installed"> <value>1</value></item>
990+ <doc>
991+ <field name="Uninstalled"><![CDATA[
992+The colormap was uninstalled.
993+ ]]></field>
994+ <field name="Installed"><![CDATA[
995+The colormap was installed.
996+ ]]></field>
997+ </doc>
998+ </enum>
999+
1000+ <enum name="Colormap">
1001+ <item name="None"> <value>0</value></item>
1002+ </enum>
1003+
1004+ <event name="ColormapNotify" number="32">
1005+ <pad bytes="1" />
1006+ <field type="WINDOW" name="window" />
1007+ <field type="COLORMAP" name="colormap" altenum="Colormap" />
1008+ <field type="BOOL" name="new" />
1009+ <field type="BYTE" name="state" enum="ColormapState" />
1010+ <pad bytes="2" />
1011+ <doc>
1012+ <brief>the colormap for some window changed</brief>
1013+ <field name="window"><![CDATA[
1014+The window whose associated colormap is changed, installed or uninstalled.
1015+ ]]></field>
1016+ <field name="colormap"><![CDATA[
1017+The colormap which is changed, installed or uninstalled. This is `XCB_NONE`
1018+when the colormap is changed by a call to `FreeColormap`.
1019+ ]]></field>
1020+ <field name="_new"><![CDATA[
1021+Indicates whether the colormap was changed (1) or installed/uninstalled (0).
1022+ ]]></field>
1023+ <!-- enum doc is sufficient -->
1024+ <field name="state" />
1025+ <see type="request" name="FreeColormap" />
1026+ </doc>
1027+ </event>
1028+
1029+ <union name="ClientMessageData">
1030+ <!-- The format member of the ClientMessage event determines which array
1031+ to use. -->
1032+ <list type="CARD8" name="data8" ><value>20</value></list> <!-- 8 -->
1033+ <list type="CARD16" name="data16"><value>10</value></list> <!-- 16 -->
1034+ <list type="CARD32" name="data32"><value>5</value></list> <!-- 32 -->
1035+ </union>
1036+
1037+ <event name="ClientMessage" number="33">
1038+ <field type="CARD8" name="format" /> <!-- 8, 16, or 32. -->
1039+ <field type="WINDOW" name="window" />
1040+ <field type="ATOM" name="type" />
1041+ <field type="ClientMessageData" name="data" />
1042+ <doc>
1043+ <brief>NOT YET DOCUMENTED</brief>
1044+ <description><![CDATA[
1045+This event represents a ClientMessage, sent by another X11 client. An example
1046+is a client sending the `_NET_WM_STATE` ClientMessage to the root window
1047+to indicate the fullscreen window state, effectively requesting that the window
1048+manager puts it into fullscreen mode.
1049+ ]]></description>
1050+ <field name="format"><![CDATA[
1051+Specifies how to interpret `data`. Can be either 8, 16 or 32.
1052+ ]]></field>
1053+ <field name="type"><![CDATA[
1054+An atom which indicates how the data should be interpreted by the receiving
1055+client.
1056+ ]]></field>
1057+ <field name="data"><![CDATA[
1058+The data itself (20 bytes max).
1059+ ]]></field>
1060+ <see type="request" name="SendEvent" />
1061+ </doc>
1062+ </event>
1063+
1064+ <enum name="Mapping">
1065+ <item name="Modifier"><value>0</value></item>
1066+ <item name="Keyboard"><value>1</value></item>
1067+ <item name="Pointer"> <value>2</value></item>
1068+ </enum>
1069+
1070+ <event name="MappingNotify" number="34">
1071+ <pad bytes="1" />
1072+ <field type="BYTE" name="request" enum="Mapping" />
1073+ <field type="KEYCODE" name="first_keycode" />
1074+ <field type="CARD8" name="count" />
1075+ <pad bytes="1" />
1076+ <doc>
1077+ <brief>keyboard mapping changed</brief>
1078+ <!-- enum documentation is sufficient -->
1079+ <field name="request" />
1080+ <field name="first_keycode"><![CDATA[
1081+The first number in the range of the altered mapping.
1082+ ]]></field>
1083+ <field name="count"><![CDATA[
1084+The number of keycodes altered.
1085+ ]]></field>
1086+ </doc>
1087+ </event>
1088+
1089+ <event name="GeGeneric" number="35" xge="true">
1090+ <pad bytes="22" />
1091+ <doc>
1092+ <brief>generic event (with length)</brief>
1093+ <field name="extension"><![CDATA[
1094+The major opcode of the extension creating this event
1095+ ]]></field>
1096+ <field name="length"><![CDATA[
1097+The amount (in 4-byte units) of data beyond 32 bytes
1098+ ]]></field>
1099+ <field name="evtype"><![CDATA[
1100+The extension-specific event type
1101+ ]]></field>
1102+ </doc>
1103+ </event>
1104+
1105+ <!-- Core error types -->
1106+
1107+
1108+
1109+ <error name="Request" number="1">
1110+ <field type="CARD32" name="bad_value" />
1111+ <field type="CARD16" name="minor_opcode" />
1112+ <field type="CARD8" name="major_opcode" />
1113+ <pad bytes="1" />
1114+ </error>
1115+
1116+ <error name="Value" number="2">
1117+ <field type="CARD32" name="bad_value" />
1118+ <field type="CARD16" name="minor_opcode" />
1119+ <field type="CARD8" name="major_opcode" />
1120+ <pad bytes="1" />
1121+ </error>
1122+
1123+ <errorcopy name="Window" number="3" ref="Value" />
1124+ <errorcopy name="Pixmap" number="4" ref="Value" />
1125+ <errorcopy name="Atom" number="5" ref="Value" />
1126+ <errorcopy name="Cursor" number="6" ref="Value" />
1127+ <errorcopy name="Font" number="7" ref="Value" />
1128+ <errorcopy name="Match" number="8" ref="Request" />
1129+ <errorcopy name="Drawable" number="9" ref="Value" />
1130+ <errorcopy name="Access" number="10" ref="Request" />
1131+ <errorcopy name="Alloc" number="11" ref="Request" />
1132+ <errorcopy name="Colormap" number="12" ref="Value" />
1133+ <errorcopy name="GContext" number="13" ref="Value" />
1134+ <errorcopy name="IDChoice" number="14" ref="Value" />
1135+ <errorcopy name="Name" number="15" ref="Request" />
1136+ <errorcopy name="Length" number="16" ref="Request" />
1137+ <errorcopy name="Implementation" number="17" ref="Request" />
1138+
1139+
1140+
1141+ <!-- The core requests, in major number order. -->
1142+ <!-- It is the caller's responsibility to free returned XCB*Rep objects. -->
1143+
1144+
1145+
1146+ <enum name="WindowClass">
1147+ <item name="CopyFromParent"><value>0</value></item>
1148+ <item name="InputOutput"> <value>1</value></item>
1149+ <item name="InputOnly"> <value>2</value></item>
1150+ </enum>
1151+
1152+ <!-- Window attributes for CreateWindow and ChangeWindowAttributes. -->
1153+ <enum name="CW">
1154+ <item name="BackPixmap"> <bit>0</bit></item>
1155+ <item name="BackPixel"> <bit>1</bit></item>
1156+ <item name="BorderPixmap"> <bit>2</bit></item>
1157+ <item name="BorderPixel"> <bit>3</bit></item>
1158+ <item name="BitGravity"> <bit>4</bit></item>
1159+ <item name="WinGravity"> <bit>5</bit></item>
1160+ <item name="BackingStore"> <bit>6</bit></item>
1161+ <item name="BackingPlanes"> <bit>7</bit></item>
1162+ <item name="BackingPixel"> <bit>8</bit></item>
1163+ <item name="OverrideRedirect"><bit>9</bit></item>
1164+ <item name="SaveUnder"> <bit>10</bit></item>
1165+ <item name="EventMask"> <bit>11</bit></item>
1166+ <item name="DontPropagate"> <bit>12</bit></item>
1167+ <item name="Colormap"> <bit>13</bit></item>
1168+ <item name="Cursor"> <bit>14</bit></item>
1169+ <doc>
1170+ <field name="BackPixmap"><![CDATA[
1171+Overrides the default background-pixmap. The background pixmap and window must
1172+have the same root and same depth. Any size pixmap can be used, although some
1173+sizes may be faster than others.
1174+
1175+If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background.
1176+The server may fill the contents with the previous screen contents or with
1177+contents of its own choosing.
1178+
1179+If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is
1180+used, but the window must have the same depth as the parent (or a Match error
1181+results). The parent's background is tracked, and the current version is
1182+used each time the window background is required.
1183+ ]]></field>
1184+ <field name="BackPixel"><![CDATA[
1185+Overrides `BackPixmap`. A pixmap of undefined size filled with the specified
1186+background pixel is used for the background. Range-checking is not performed,
1187+the background pixel is truncated to the appropriate number of bits.
1188+ ]]></field>
1189+ <field name="BorderPixmap"><![CDATA[
1190+Overrides the default border-pixmap. The border pixmap and window must have the
1191+same root and the same depth. Any size pixmap can be used, although some sizes
1192+may be faster than others.
1193+
1194+The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is
1195+copied (subsequent changes to the parent's border attribute do not affect the
1196+child), but the window must have the same depth as the parent.
1197+ ]]></field>
1198+ <field name="BorderPixel"><![CDATA[
1199+Overrides `BorderPixmap`. A pixmap of undefined size filled with the specified
1200+border pixel is used for the border. Range checking is not performed on the
1201+border-pixel value, it is truncated to the appropriate number of bits.
1202+ ]]></field>
1203+ <field name="BitGravity"><![CDATA[
1204+Defines which region of the window should be retained if the window is resized.
1205+ ]]></field>
1206+ <field name="WinGravity"><![CDATA[
1207+Defines how the window should be repositioned if the parent is resized (see
1208+`ConfigureWindow`).
1209+ ]]></field>
1210+ <field name="BackingStore"><![CDATA[
1211+A backing-store of `WhenMapped` advises the server that maintaining contents of
1212+obscured regions when the window is mapped would be beneficial. A backing-store
1213+of `Always` advises the server that maintaining contents even when the window
1214+is unmapped would be beneficial. In this case, the server may generate an
1215+exposure event when the window is created. A value of `NotUseful` advises the
1216+server that maintaining contents is unnecessary, although a server may still
1217+choose to maintain contents while the window is mapped. Note that if the server
1218+maintains contents, then the server should maintain complete contents not just
1219+the region within the parent boundaries, even if the window is larger than its
1220+parent. While the server maintains contents, exposure events will not normally
1221+be generated, but the server may stop maintaining contents at any time.
1222+ ]]></field>
1223+ <field name="BackingPlanes"><![CDATA[
1224+The backing-planes indicates (with bits set to 1) which bit planes of the
1225+window hold dynamic data that must be preserved in backing-stores and during
1226+save-unders.
1227+ ]]></field>
1228+ <field name="BackingPixel"><![CDATA[
1229+The backing-pixel specifies what value to use in planes not covered by
1230+backing-planes. The server is free to save only the specified bit planes in the
1231+backing-store or save-under and regenerate the remaining planes with the
1232+specified pixel value. Any bits beyond the specified depth of the window in
1233+these values are simply ignored.
1234+ ]]></field>
1235+ <field name="OverrideRedirect"><![CDATA[
1236+The override-redirect specifies whether map and configure requests on this
1237+window should override a SubstructureRedirect on the parent, typically to
1238+inform a window manager not to tamper with the window.
1239+ ]]></field>
1240+ <field name="SaveUnder"><![CDATA[
1241+If 1, the server is advised that when this window is mapped, saving the
1242+contents of windows it obscures would be beneficial.
1243+ ]]></field>
1244+ <field name="EventMask"><![CDATA[
1245+The event-mask defines which events the client is interested in for this window
1246+(or for some event types, inferiors of the window).
1247+ ]]></field>
1248+ <field name="DontPropagate"><![CDATA[
1249+The do-not-propagate-mask defines which events should not be propagated to
1250+ancestor windows when no client has the event type selected in this window.
1251+ ]]></field>
1252+ <field name="Colormap"><![CDATA[
1253+The colormap specifies the colormap that best reflects the true colors of the window. Servers
1254+capable of supporting multiple hardware colormaps may use this information, and window man-
1255+agers may use it for InstallColormap requests. The colormap must have the same visual type
1256+and root as the window (or a Match error results). If CopyFromParent is specified, the parent's
1257+colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child).
1258+However, the window must have the same visual type as the parent (or a Match error results),
1259+and the parent must not have a colormap of None (or a Match error results). For an explanation
1260+of None, see FreeColormap request. The colormap is copied by sharing the colormap object
1261+between the child and the parent, not by making a complete copy of the colormap contents.
1262+ ]]></field>
1263+ <field name="Cursor"><![CDATA[
1264+If a cursor is specified, it will be used whenever the pointer is in the window. If None is speci-
1265+fied, the parent's cursor will be used when the pointer is in the window, and any change in the
1266+parent's cursor will cause an immediate change in the displayed cursor.
1267+ ]]></field>
1268+ </doc>
1269+ </enum>
1270+
1271+ <enum name="BackPixmap">
1272+ <item name="None"> <value>0</value></item>
1273+ <item name="ParentRelative"><value>1</value></item>
1274+ </enum>
1275+
1276+ <enum name="Gravity">
1277+ <item name="BitForget"><value>0</value></item>
1278+ <item name="WinUnmap"> <value>0</value></item>
1279+ <item name="NorthWest"><value>1</value></item>
1280+ <item name="North"> <value>2</value></item>
1281+ <item name="NorthEast"><value>3</value></item>
1282+ <item name="West"> <value>4</value></item>
1283+ <item name="Center"> <value>5</value></item>
1284+ <item name="East"> <value>6</value></item>
1285+ <item name="SouthWest"><value>7</value></item>
1286+ <item name="South"> <value>8</value></item>
1287+ <item name="SouthEast"><value>9</value></item>
1288+ <item name="Static"> <value>10</value></item>
1289+ </enum>
1290+
1291+ <request name="CreateWindow" opcode="1">
1292+ <field type="CARD8" name="depth" />
1293+ <field type="WINDOW" name="wid" />
1294+ <field type="WINDOW" name="parent" />
1295+ <field type="INT16" name="x" />
1296+ <field type="INT16" name="y" />
1297+ <field type="CARD16" name="width" />
1298+ <field type="CARD16" name="height" />
1299+ <field type="CARD16" name="border_width" />
1300+ <field type="CARD16" name="class" enum="WindowClass" />
1301+ <field type="VISUALID" name="visual" />
1302+ <field type="CARD32" name="value_mask" mask="CW" />
1303+ <switch name="value_list">
1304+ <fieldref>value_mask</fieldref>
1305+ <bitcase>
1306+ <enumref ref="CW">BackPixmap</enumref>
1307+ <field type="PIXMAP" name="background_pixmap" altenum="BackPixmap"/>
1308+ </bitcase>
1309+ <bitcase>
1310+ <enumref ref="CW">BackPixel</enumref>
1311+ <field type="CARD32" name="background_pixel" />
1312+ </bitcase>
1313+ <bitcase>
1314+ <enumref ref="CW">BorderPixmap</enumref>
1315+ <field type="PIXMAP" name="border_pixmap" altenum="Pixmap"/>
1316+ </bitcase>
1317+ <bitcase>
1318+ <enumref ref="CW">BorderPixel</enumref>
1319+ <field type="CARD32" name="border_pixel" />
1320+ </bitcase>
1321+ <bitcase>
1322+ <enumref ref="CW">BitGravity</enumref>
1323+ <field type="CARD32" name="bit_gravity" enum="Gravity"/>
1324+ </bitcase>
1325+ <bitcase>
1326+ <enumref ref="CW">WinGravity</enumref>
1327+ <field type="CARD32" name="win_gravity" enum="Gravity"/>
1328+ </bitcase>
1329+ <bitcase>
1330+ <enumref ref="CW">BackingStore</enumref>
1331+ <field type="CARD32" name="backing_store" enum="BackingStore"/>
1332+ </bitcase>
1333+ <bitcase>
1334+ <enumref ref="CW">BackingPlanes</enumref>
1335+ <field type="CARD32" name="backing_planes" />
1336+ </bitcase>
1337+ <bitcase>
1338+ <enumref ref="CW">BackingPixel</enumref>
1339+ <field type="CARD32" name="backing_pixel" />
1340+ </bitcase>
1341+ <bitcase>
1342+ <enumref ref="CW">OverrideRedirect</enumref>
1343+ <field type="BOOL32" name="override_redirect" />
1344+ </bitcase>
1345+ <bitcase>
1346+ <enumref ref="CW">SaveUnder</enumref>
1347+ <field type="BOOL32" name="save_under" />
1348+ </bitcase>
1349+ <bitcase>
1350+ <enumref ref="CW">EventMask</enumref>
1351+ <field type="CARD32" name="event_mask" mask="EventMask"/>
1352+ </bitcase>
1353+ <bitcase>
1354+ <enumref ref="CW">DontPropagate</enumref>
1355+ <field type="CARD32" name="do_not_propogate_mask" mask="EventMask"/>
1356+ </bitcase>
1357+ <bitcase>
1358+ <enumref ref="CW">Colormap</enumref>
1359+ <field type="COLORMAP" name="colormap" altenum="Colormap"/>
1360+ </bitcase>
1361+ <bitcase>
1362+ <enumref ref="CW">Cursor</enumref>
1363+ <field type="CURSOR" name="cursor" altenum="Cursor"/>
1364+ </bitcase>
1365+ </switch>
1366+
1367+ <doc>
1368+ <brief>Creates a window</brief>
1369+ <description><![CDATA[
1370+Creates an unmapped window as child of the specified `parent` window. A
1371+CreateNotify event will be generated. The new window is placed on top in the
1372+stacking order with respect to siblings.
1373+
1374+The coordinate system has the X axis horizontal and the Y axis vertical with
1375+the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms
1376+of pixels, and coincide with pixel centers. Each window and pixmap has its own
1377+coordinate system. For a window, the origin is inside the border at the inside,
1378+upper-left corner.
1379+
1380+The created window is not yet displayed (mapped), call `xcb_map_window` to
1381+display it.
1382+
1383+The created window will initially use the same cursor as its parent.
1384+ ]]></description>
1385+ <field name="wid"><![CDATA[
1386+The ID with which you will refer to the new window, created by
1387+`xcb_generate_id`.
1388+ ]]></field>
1389+ <field name="depth"><![CDATA[
1390+Specifies the new window's depth (TODO: what unit?).
1391+
1392+The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the
1393+`parent` window.
1394+ ]]></field>
1395+ <field name="visual"><![CDATA[
1396+Specifies the id for the new window's visual.
1397+
1398+The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the
1399+`parent` window.
1400+ ]]></field>
1401+ <field name="class"></field>
1402+ <field name="parent"><![CDATA[
1403+The parent window of the new window.
1404+ ]]></field>
1405+ <field name="border_width"><![CDATA[
1406+ TODO:
1407+
1408+Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs.
1409+ ]]></field>
1410+ <field name="x"><![CDATA[The X coordinate of the new window.]]></field>
1411+ <field name="y"><![CDATA[The Y coordinate of the new window.]]></field>
1412+ <field name="width"><![CDATA[The width of the new window.]]></field>
1413+ <field name="height"><![CDATA[The height of the new window.]]></field>
1414+ <error type="Colormap"><![CDATA[
1415+TODO: reasons?
1416+ ]]></error>
1417+ <error type="Match"><![CDATA[
1418+TODO: reasons?
1419+ ]]></error>
1420+ <error type="Cursor"><![CDATA[
1421+TODO: reasons?
1422+ ]]></error>
1423+ <error type="Pixmap"><![CDATA[
1424+TODO: reasons?
1425+ ]]></error>
1426+ <error type="Value"><![CDATA[
1427+TODO: reasons?
1428+ ]]></error>
1429+ <error type="Window"><![CDATA[
1430+TODO: reasons?
1431+ ]]></error>
1432+ <error type="Alloc"><![CDATA[
1433+The X server could not allocate the requested resources (no memory?).
1434+ ]]></error>
1435+ <see type="function" name="xcb_generate_id" />
1436+ <see type="request" name="MapWindow" />
1437+ <see type="event" name="CreateNotify" />
1438+ </doc>
1439+
1440+ </request>
1441+
1442+ <request name="ChangeWindowAttributes" opcode="2">
1443+ <pad bytes="1" />
1444+ <field type="WINDOW" name="window" />
1445+ <field type="CARD32" name="value_mask" mask="CW" />
1446+ <switch name="value_list">
1447+ <fieldref>value_mask</fieldref>
1448+ <bitcase>
1449+ <enumref ref="CW">BackPixmap</enumref>
1450+ <field type="PIXMAP" name="background_pixmap" altenum="BackPixmap"/>
1451+ </bitcase>
1452+ <bitcase>
1453+ <enumref ref="CW">BackPixel</enumref>
1454+ <field type="CARD32" name="background_pixel" />
1455+ </bitcase>
1456+ <bitcase>
1457+ <enumref ref="CW">BorderPixmap</enumref>
1458+ <field type="PIXMAP" name="border_pixmap" altenum="Pixmap"/>
1459+ </bitcase>
1460+ <bitcase>
1461+ <enumref ref="CW">BorderPixel</enumref>
1462+ <field type="CARD32" name="border_pixel" />
1463+ </bitcase>
1464+ <bitcase>
1465+ <enumref ref="CW">BitGravity</enumref>
1466+ <field type="CARD32" name="bit_gravity" enum="Gravity"/>
1467+ </bitcase>
1468+ <bitcase>
1469+ <enumref ref="CW">WinGravity</enumref>
1470+ <field type="CARD32" name="win_gravity" enum="Gravity"/>
1471+ </bitcase>
1472+ <bitcase>
1473+ <enumref ref="CW">BackingStore</enumref>
1474+ <field type="CARD32" name="backing_store" enum="BackingStore"/>
1475+ </bitcase>
1476+ <bitcase>
1477+ <enumref ref="CW">BackingPlanes</enumref>
1478+ <field type="CARD32" name="backing_planes" />
1479+ </bitcase>
1480+ <bitcase>
1481+ <enumref ref="CW">BackingPixel</enumref>
1482+ <field type="CARD32" name="backing_pixel" />
1483+ </bitcase>
1484+ <bitcase>
1485+ <enumref ref="CW">OverrideRedirect</enumref>
1486+ <field type="BOOL32" name="override_redirect" />
1487+ </bitcase>
1488+ <bitcase>
1489+ <enumref ref="CW">SaveUnder</enumref>
1490+ <field type="BOOL32" name="save_under" />
1491+ </bitcase>
1492+ <bitcase>
1493+ <enumref ref="CW">EventMask</enumref>
1494+ <field type="CARD32" name="event_mask" mask="EventMask"/>
1495+ </bitcase>
1496+ <bitcase>
1497+ <enumref ref="CW">DontPropagate</enumref>
1498+ <field type="CARD32" name="do_not_propogate_mask" mask="EventMask"/>
1499+ </bitcase>
1500+ <bitcase>
1501+ <enumref ref="CW">Colormap</enumref>
1502+ <field type="COLORMAP" name="colormap" altenum="Colormap"/>
1503+ </bitcase>
1504+ <bitcase>
1505+ <enumref ref="CW">Cursor</enumref>
1506+ <field type="CURSOR" name="cursor" altenum="Cursor"/>
1507+ </bitcase>
1508+ </switch>
1509+
1510+ <doc>
1511+ <brief>change window attributes</brief>
1512+ <description><![CDATA[
1513+Changes the attributes specified by `value_mask` for the specified `window`.
1514+ ]]></description>
1515+ <field name="window"><![CDATA[
1516+The window to change.
1517+ ]]></field>
1518+ <!-- the enum documentation is good enough. -->
1519+ <field name="value_mask" />
1520+ <field name="value_list"><![CDATA[
1521+Values for each of the attributes specified in the bitmask `value_mask`. The
1522+order has to correspond to the order of possible `value_mask` bits. See the
1523+example.
1524+ ]]></field>
1525+ <error type="Access"><![CDATA[
1526+TODO: reasons?
1527+ ]]></error>
1528+ <error type="Colormap"><![CDATA[
1529+TODO: reasons?
1530+ ]]></error>
1531+ <error type="Cursor"><![CDATA[
1532+TODO: reasons?
1533+ ]]></error>
1534+ <error type="Match"><![CDATA[
1535+TODO: reasons?
1536+ ]]></error>
1537+ <error type="Pixmap"><![CDATA[
1538+TODO: reasons?
1539+ ]]></error>
1540+ <error type="Value"><![CDATA[
1541+TODO: reasons?
1542+ ]]></error>
1543+ <error type="Window"><![CDATA[
1544+The specified `window` does not exist.
1545+ ]]></error>
1546+ </doc>
1547+ </request>
1548+
1549+ <enum name="MapState">
1550+ <item name="Unmapped"> <value>0</value></item>
1551+ <item name="Unviewable"><value>1</value></item>
1552+ <item name="Viewable"> <value>2</value></item>
1553+ </enum>
1554+
1555+ <request name="GetWindowAttributes" opcode="3">
1556+ <pad bytes="1" />
1557+ <field type="WINDOW" name="window" />
1558+ <reply>
1559+ <field type="CARD8" name="backing_store" enum="BackingStore" />
1560+ <field type="VISUALID" name="visual" />
1561+ <field type="CARD16" name="class" enum="WindowClass" />
1562+ <field type="CARD8" name="bit_gravity" enum="Gravity" />
1563+ <field type="CARD8" name="win_gravity" enum="Gravity" />
1564+ <field type="CARD32" name="backing_planes" />
1565+ <field type="CARD32" name="backing_pixel" />
1566+ <field type="BOOL" name="save_under" />
1567+ <field type="BOOL" name="map_is_installed" />
1568+ <field type="CARD8" name="map_state" enum="MapState" />
1569+ <field type="BOOL" name="override_redirect" />
1570+ <field type="COLORMAP" name="colormap" altenum="Colormap" />
1571+ <field type="CARD32" name="all_event_masks" mask="EventMask" />
1572+ <field type="CARD32" name="your_event_mask" mask="EventMask" />
1573+ <field type="CARD16" name="do_not_propagate_mask" mask="EventMask" />
1574+ <pad bytes="2" />
1575+ <doc>
1576+ <field name="override_redirect"><![CDATA[
1577+Window managers should ignore this window if `override_redirect` is 1.
1578+ ]]></field>
1579+ <field name="visual"><![CDATA[
1580+The associated visual structure of `window`.
1581+ ]]></field>
1582+ <field name="backing_planes"><![CDATA[
1583+Planes to be preserved if possible.
1584+ ]]></field>
1585+ <field name="backing_pixel"><![CDATA[
1586+Value to be used when restoring planes.
1587+ ]]></field>
1588+ <field name="save_under"><![CDATA[
1589+Boolean, should bits under be saved?
1590+ ]]></field>
1591+ <field name="colormap"><![CDATA[
1592+Color map to be associated with window.
1593+ ]]></field>
1594+ <field name="all_event_masks"><![CDATA[
1595+Set of events all people have interest in.
1596+ ]]></field>
1597+ <field name="your_event_mask"><![CDATA[
1598+My event mask.
1599+ ]]></field>
1600+ <field name="do_not_propagate_mask"><![CDATA[
1601+Set of events that should not propagate.
1602+ ]]></field>
1603+ <!-- enum documentation is sufficient for these fields -->
1604+ <field name="backing_store" />
1605+ <field name="class" />
1606+ <field name="bit_gravity" />
1607+ <field name="win_gravity" />
1608+ <field name="map_state" />
1609+ </doc>
1610+ </reply>
1611+ <doc>
1612+ <brief>Gets window attributes</brief>
1613+ <description><![CDATA[
1614+Gets the current attributes for the specified `window`.
1615+ ]]></description>
1616+ <field name="window"><![CDATA[The window to get the attributes from.]]></field>
1617+ <error type="Window"><![CDATA[
1618+The specified `window` does not exist.
1619+ ]]></error>
1620+ <error type="Drawable"><![CDATA[
1621+TODO: reasons?
1622+ ]]></error>
1623+ </doc>
1624+
1625+ </request>
1626+
1627+ <request name="DestroyWindow" opcode="4">
1628+ <pad bytes="1" />
1629+ <field type="WINDOW" name="window" />
1630+ <doc>
1631+ <brief>Destroys a window</brief>
1632+ <description><![CDATA[
1633+Destroys the specified window and all of its subwindows. A DestroyNotify event
1634+is generated for each destroyed window (a DestroyNotify event is first generated
1635+for any given window's inferiors). If the window was mapped, it will be
1636+automatically unmapped before destroying.
1637+
1638+Calling DestroyWindow on the root window will do nothing.
1639+ ]]></description>
1640+ <field name="window"><![CDATA[The window to destroy.]]></field>
1641+ <error type="Window"><![CDATA[
1642+The specified window does not exist.
1643+ ]]></error>
1644+ <see type="event" name="DestroyNotify" />
1645+ <see type="request" name="MapWindow" />
1646+ <see type="request" name="UnmapWindow" />
1647+ </doc>
1648+ </request>
1649+
1650+ <request name="DestroySubwindows" opcode="5">
1651+ <pad bytes="1" />
1652+ <field type="WINDOW" name="window" />
1653+ </request>
1654+
1655+ <enum name="SetMode">
1656+ <item name="Insert"><value>0</value></item>
1657+ <item name="Delete"><value>1</value></item>
1658+ </enum>
1659+
1660+ <request name="ChangeSaveSet" opcode="6">
1661+ <field type="BYTE" name="mode" enum="SetMode" />
1662+ <field type="WINDOW" name="window" />
1663+ <doc>
1664+ <brief>Changes a client's save set</brief>
1665+ <description><![CDATA[
1666+TODO: explain what the save set is for.
1667+
1668+This function either adds or removes the specified window to the client's (your
1669+application's) save set.
1670+ ]]></description>
1671+ <field name="mode"><![CDATA[Insert to add the specified window to the save set or Delete to delete it from the save set.]]></field>
1672+ <field name="window"><![CDATA[The window to add or delete to/from your save set.]]></field>
1673+ <error type="Match"><![CDATA[
1674+You created the specified window. This does not make sense, you can only add
1675+windows created by other clients to your save set.
1676+ ]]></error>
1677+ <error type="Value"><![CDATA[
1678+You specified an invalid mode.
1679+ ]]></error>
1680+ <error type="Window"><![CDATA[
1681+The specified window does not exist.
1682+ ]]></error>
1683+ <see type="request" name="ReparentWindow" />
1684+ </doc>
1685+ </request>
1686+
1687+ <request name="ReparentWindow" opcode="7">
1688+ <pad bytes="1" />
1689+ <field type="WINDOW" name="window" />
1690+ <field type="WINDOW" name="parent" />
1691+ <field type="INT16" name="x" />
1692+ <field type="INT16" name="y" />
1693+ <doc>
1694+ <brief>Reparents a window</brief>
1695+ <description><![CDATA[
1696+Makes the specified window a child of the specified parent window. If the
1697+window is mapped, it will automatically be unmapped before reparenting and
1698+re-mapped after reparenting. The window is placed in the stacking order on top
1699+with respect to sibling windows.
1700+
1701+After reparenting, a ReparentNotify event is generated.
1702+ ]]></description>
1703+ <field name="window"><![CDATA[The window to reparent.]]></field>
1704+ <field name="parent"><![CDATA[The new parent of the window.]]></field>
1705+ <field name="x"><![CDATA[
1706+The X position of the window within its new parent.
1707+ ]]></field>
1708+ <field name="y"><![CDATA[
1709+The Y position of the window within its new parent.
1710+ ]]></field>
1711+ <error type="Match"><![CDATA[
1712+The new parent window is not on the same screen as the old parent window.
1713+
1714+The new parent window is the specified window or an inferior of the specified window.
1715+
1716+The new parent is InputOnly and the window is not.
1717+
1718+The specified window has a ParentRelative background and the new parent window is not the same depth as the specified window.
1719+ ]]></error>
1720+ <error type="Window"><![CDATA[
1721+The specified window does not exist.
1722+ ]]></error>
1723+ <see type="event" name="ReparentNotify" />
1724+ <see type="request" name="MapWindow" />
1725+ <see type="request" name="UnmapWindow" />
1726+ </doc>
1727+ </request>
1728+
1729+ <request name="MapWindow" opcode="8">
1730+ <pad bytes="1" />
1731+ <field type="WINDOW" name="window" />
1732+ <doc>
1733+ <brief>Makes a window visible</brief>
1734+ <description><![CDATA[
1735+Maps the specified window. This means making the window visible (as long as its
1736+parent is visible).
1737+
1738+This MapWindow request will be translated to a MapRequest request if a window
1739+manager is running. The window manager then decides to either map the window or
1740+not. Set the override-redirect window attribute to true if you want to bypass
1741+this mechanism.
1742+
1743+If the window manager decides to map the window (or if no window manager is
1744+running), a MapNotify event is generated.
1745+
1746+If the window becomes viewable and no earlier contents for it are remembered,
1747+the X server tiles the window with its background. If the window's background
1748+is undefined, the existing screen contents are not altered, and the X server
1749+generates zero or more Expose events.
1750+
1751+If the window type is InputOutput, an Expose event will be generated when the
1752+window becomes visible. The normal response to an Expose event should be to
1753+repaint the window.
1754+ ]]></description>
1755+ <field name="window"><![CDATA[
1756+The window to make visible.
1757+]]></field>
1758+ <error type="Match"><![CDATA[
1759+The specified window does not exist.
1760+ ]]></error>
1761+ <see type="event" name="MapNotify" />
1762+ <see type="event" name="Expose" />
1763+ <see type="request" name="UnmapWindow" />
1764+ </doc>
1765+ </request>
1766+
1767+ <request name="MapSubwindows" opcode="9">
1768+ <pad bytes="1" />
1769+ <field type="WINDOW" name="window" />
1770+ </request>
1771+
1772+ <request name="UnmapWindow" opcode="10">
1773+ <pad bytes="1" />
1774+ <field type="WINDOW" name="window" />
1775+ <doc>
1776+ <brief>Makes a window invisible</brief>
1777+ <description><![CDATA[
1778+Unmaps the specified window. This means making the window invisible (and all
1779+its child windows).
1780+
1781+Unmapping a window leads to the `UnmapNotify` event being generated. Also,
1782+`Expose` events are generated for formerly obscured windows.
1783+ ]]></description>
1784+ <field name="window"><![CDATA[
1785+The window to make invisible.
1786+]]></field>
1787+ <error type="Window"><![CDATA[
1788+The specified window does not exist.
1789+ ]]></error>
1790+ <see type="event" name="UnmapNotify" />
1791+ <see type="event" name="Expose" />
1792+ <see type="request" name="MapWindow" />
1793+ </doc>
1794+ </request>
1795+
1796+ <request name="UnmapSubwindows" opcode="11">
1797+ <pad bytes="1" />
1798+ <field type="WINDOW" name="window" />
1799+ </request>
1800+
1801+ <enum name="ConfigWindow">
1802+ <item name="X"> <bit>0</bit></item>
1803+ <item name="Y"> <bit>1</bit></item>
1804+ <item name="Width"> <bit>2</bit></item>
1805+ <item name="Height"> <bit>3</bit></item>
1806+ <item name="BorderWidth"><bit>4</bit></item>
1807+ <item name="Sibling"> <bit>5</bit></item>
1808+ <item name="StackMode"> <bit>6</bit></item>
1809+ </enum>
1810+
1811+ <enum name="StackMode">
1812+ <item name="Above"> <value>0</value></item>
1813+ <item name="Below"> <value>1</value></item>
1814+ <item name="TopIf"> <value>2</value></item>
1815+ <item name="BottomIf"><value>3</value></item>
1816+ <item name="Opposite"><value>4</value></item>
1817+ </enum>
1818+
1819+ <request name="ConfigureWindow" opcode="12">
1820+ <pad bytes="1" />
1821+ <field type="WINDOW" name="window" />
1822+ <field type="CARD16" name="value_mask" mask="ConfigWindow" />
1823+ <pad bytes="2" />
1824+ <switch name="value_list">
1825+ <fieldref>value_mask</fieldref>
1826+ <bitcase>
1827+ <enumref ref="ConfigWindow">X</enumref>
1828+ <field type="INT32" name="x" />
1829+ </bitcase>
1830+ <bitcase>
1831+ <enumref ref="ConfigWindow">Y</enumref>
1832+ <field type="INT32" name="y" />
1833+ </bitcase>
1834+ <bitcase>
1835+ <enumref ref="ConfigWindow">Width</enumref>
1836+ <field type="CARD32" name="width" />
1837+ </bitcase>
1838+ <bitcase>
1839+ <enumref ref="ConfigWindow">Height</enumref>
1840+ <field type="CARD32" name="height" />
1841+ </bitcase>
1842+ <bitcase>
1843+ <enumref ref="ConfigWindow">BorderWidth</enumref>
1844+ <field type="CARD32" name="border_width" />
1845+ </bitcase>
1846+ <bitcase>
1847+ <enumref ref="ConfigWindow">Sibling</enumref>
1848+ <field type="WINDOW" name="sibling" altenum="Window"/>
1849+ </bitcase>
1850+ <bitcase>
1851+ <enumref ref="ConfigWindow">StackMode</enumref>
1852+ <field type="CARD32" name="stack_mode" enum="StackMode"/>
1853+ </bitcase>
1854+ </switch>
1855+
1856+ <doc>
1857+ <brief>Configures window attributes</brief>
1858+ <description><![CDATA[
1859+Configures a window's size, position, border width and stacking order.
1860+ ]]></description>
1861+ <example><![CDATA[
1862+/*
1863+ * Configures the given window to the left upper corner
1864+ * with a size of 1024x768 pixels.
1865+ *
1866+ */
1867+void my_example(xcb_connection_t *c, xcb_window_t window) {
1868+ uint16_t mask = 0;
1869+
1870+ mask |= XCB_CONFIG_WINDOW_X;
1871+ mask |= XCB_CONFIG_WINDOW_Y;
1872+ mask |= XCB_CONFIG_WINDOW_WIDTH;
1873+ mask |= XCB_CONFIG_WINDOW_HEIGHT;
1874+
1875+ const uint32_t values[] = {
1876+ 0, /* x */
1877+ 0, /* y */
1878+ 1024, /* width */
1879+ 768 /* height */
1880+ };
1881+
1882+ xcb_configure_window(c, window, mask, values);
1883+ xcb_flush(c);
1884+}
1885+ ]]></example>
1886+ <field name="window"><![CDATA[The window to configure.]]></field>
1887+ <field name="value_mask"><![CDATA[Bitmask of attributes to change.]]></field>
1888+ <field name="value_list"><![CDATA[
1889+New values, corresponding to the attributes in value_mask. The order has to
1890+correspond to the order of possible `value_mask` bits. See the example.
1891+ ]]></field>
1892+ <error type="Match"><![CDATA[
1893+You specified a Sibling without also specifying StackMode or the window is not
1894+actually a Sibling.
1895+ ]]></error>
1896+ <error type="Window"><![CDATA[
1897+The specified window does not exist. TODO: any other reason?
1898+ ]]></error>
1899+ <error type="Value"><![CDATA[
1900+TODO: reasons?
1901+ ]]></error>
1902+ <see type="event" name="MapNotify" />
1903+ <see type="event" name="Expose" />
1904+ </doc>
1905+ </request>
1906+
1907+ <enum name="Circulate">
1908+ <item name="RaiseLowest"> <value>0</value></item>
1909+ <item name="LowerHighest"><value>1</value></item>
1910+ </enum>
1911+
1912+ <request name="CirculateWindow" opcode="13">
1913+ <field type="CARD8" name="direction" enum="Circulate" />
1914+ <field type="WINDOW" name="window" />
1915+ <doc>
1916+ <brief>Change window stacking order</brief>
1917+ <description><![CDATA[
1918+If `direction` is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if
1919+any) will be raised to the top of the stack.
1920+
1921+If `direction` is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will
1922+be lowered to the bottom of the stack.
1923+ ]]></description>
1924+ <!-- The enums are documented, we have nothing to add. -->
1925+ <field name="direction" />
1926+ <field name="window"><![CDATA[
1927+The window to raise/lower (depending on `direction`).
1928+ ]]></field>
1929+ <error type="Window"><![CDATA[
1930+The specified `window` does not exist.
1931+ ]]></error>
1932+ <error type="Value"><![CDATA[
1933+The specified `direction` is invalid.
1934+ ]]></error>
1935+ </doc>
1936+ </request>
1937+
1938+ <request name="GetGeometry" opcode="14">
1939+ <pad bytes="1" />
1940+ <field type="DRAWABLE" name="drawable" />
1941+ <reply>
1942+ <field type="CARD8" name="depth" />
1943+ <field type="WINDOW" name="root" />
1944+ <field type="INT16" name="x" />
1945+ <field type="INT16" name="y" />
1946+ <field type="CARD16" name="width" />
1947+ <field type="CARD16" name="height" />
1948+ <field type="CARD16" name="border_width" />
1949+ <pad bytes="2" />
1950+ <doc>
1951+ <field name="root"><![CDATA[
1952+Root window of the screen containing `drawable`.
1953+ ]]></field>
1954+ <field name="x"><![CDATA[
1955+The X coordinate of `drawable`. If `drawable` is a window, the coordinate
1956+specifies the upper-left outer corner relative to its parent's origin. If
1957+`drawable` is a pixmap, the X coordinate is always 0.
1958+ ]]></field>
1959+ <field name="y"><![CDATA[
1960+The Y coordinate of `drawable`. If `drawable` is a window, the coordinate
1961+specifies the upper-left outer corner relative to its parent's origin. If
1962+`drawable` is a pixmap, the Y coordinate is always 0.
1963+ ]]></field>
1964+ <field name="width"><![CDATA[
1965+The width of `drawable`.
1966+ ]]></field>
1967+ <field name="height"><![CDATA[
1968+The height of `drawable`.
1969+ ]]></field>
1970+ <field name="border_width"><![CDATA[
1971+The border width (in pixels).
1972+ ]]></field>
1973+ <field name="depth"><![CDATA[
1974+The depth of the drawable (bits per pixel for the object).
1975+ ]]></field>
1976+ </doc>
1977+ </reply>
1978+ <doc>
1979+ <brief>Get current window geometry</brief>
1980+ <description><![CDATA[
1981+Gets the current geometry of the specified drawable (either `Window` or `Pixmap`).
1982+ ]]></description>
1983+ <example><![CDATA[
1984+/*
1985+ * Displays the x and y position of the given window.
1986+ *
1987+ */
1988+void my_example(xcb_connection_t *c, xcb_window_t window) {
1989+ xcb_get_geometry_cookie_t cookie;
1990+ xcb_get_geometry_reply_t *reply;
1991+
1992+ cookie = xcb_get_geometry(c, window);
1993+ /* ... do other work here if possible ... */
1994+ if ((reply = xcb_get_geometry_reply(c, cookie, NULL))) {
1995+ printf("This window is at %d, %d\\n", reply->x, reply->y);
1996+ }
1997+ free(reply);
1998+}
1999+ ]]></example>
2000+ <field name="drawable"><![CDATA[
2001+The drawable (`Window` or `Pixmap`) of which the geometry will be received.
2002+ ]]></field>
2003+ <error type="Drawable"><![CDATA[
2004+TODO: reasons?
2005+ ]]></error>
2006+ <error type="Window"><![CDATA[
2007+TODO: reasons?
2008+ ]]></error>
2009+ <see type="program" name="xwininfo" />
2010+ </doc>
2011+ </request>
2012+
2013+ <request name="QueryTree" opcode="15">
2014+ <pad bytes="1" />
2015+ <field type="WINDOW" name="window" />
2016+ <reply>
2017+ <pad bytes="1" />
2018+ <field type="WINDOW" name="root" />
2019+ <field type="WINDOW" name="parent" altenum="Window" />
2020+ <field type="CARD16" name="children_len" />
2021+ <pad bytes="14" />
2022+ <list type="WINDOW" name="children">
2023+ <fieldref>children_len</fieldref>
2024+ </list>
2025+ <doc>
2026+ <field name="root"><![CDATA[
2027+The root window of `window`.
2028+ ]]></field>
2029+ <field name="parent"><![CDATA[
2030+The parent window of `window`.
2031+ ]]></field>
2032+ <field name="children_len"><![CDATA[
2033+The number of child windows.
2034+ ]]></field>
2035+ </doc>
2036+ </reply>
2037+ <doc>
2038+ <brief>query the window tree</brief>
2039+ <description><![CDATA[
2040+Gets the root window ID, parent window ID and list of children windows for the
2041+specified `window`. The children are listed in bottom-to-top stacking order.
2042+ ]]></description>
2043+ <example><![CDATA[
2044+/*
2045+ * Displays the root, parent and children of the specified window.
2046+ *
2047+ */
2048+void my_example(xcb_connection_t *conn, xcb_window_t window) {
2049+ xcb_query_tree_cookie_t cookie;
2050+ xcb_query_tree_reply_t *reply;
2051+
2052+ cookie = xcb_query_tree(conn, window);
2053+ if ((reply = xcb_query_tree_reply(conn, cookie, NULL))) {
2054+ printf("root = 0x%08x\\n", reply->root);
2055+ printf("parent = 0x%08x\\n", reply->parent);
2056+
2057+ xcb_window_t *children = xcb_query_tree_children(reply);
2058+ for (int i = 0; i < xcb_query_tree_children_length(reply); i++)
2059+ printf("child window = 0x%08x\\n", children[i]);
2060+
2061+ free(reply);
2062+ }
2063+}
2064+ ]]></example>
2065+ <field name="window"><![CDATA[
2066+The `window` to query.
2067+ ]]></field>
2068+ <see type="program" name="xwininfo" />
2069+ </doc>
2070+ </request>
2071+
2072+ <request name="InternAtom" opcode="16">
2073+ <field type="BOOL" name="only_if_exists" />
2074+ <field type="CARD16" name="name_len" />
2075+ <pad bytes="2" />
2076+ <list type="char" name="name">
2077+ <fieldref>name_len</fieldref>
2078+ </list>
2079+ <reply>
2080+ <pad bytes="1" />
2081+ <field type="ATOM" name="atom" altenum="Atom" />
2082+ </reply>
2083+ <doc>
2084+ <brief>Get atom identifier by name</brief>
2085+ <description><![CDATA[
2086+Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified
2087+name. Atoms are used in protocols like EWMH, for example to store window titles
2088+(`_NET_WM_NAME` atom) as property of a window.
2089+
2090+If `only_if_exists` is 0, the atom will be created if it does not already exist.
2091+If `only_if_exists` is 1, `XCB_ATOM_NONE` will be returned if the atom does
2092+not yet exist.
2093+ ]]></description>
2094+ <example><![CDATA[
2095+/*
2096+ * Resolves the _NET_WM_NAME atom.
2097+ *
2098+ */
2099+void my_example(xcb_connection_t *c) {
2100+ xcb_intern_atom_cookie_t cookie;
2101+ xcb_intern_atom_reply_t *reply;
2102+
2103+ cookie = xcb_intern_atom(c, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME");
2104+ /* ... do other work here if possible ... */
2105+ if ((reply = xcb_intern_atom_reply(c, cookie, NULL))) {
2106+ printf("The _NET_WM_NAME atom has ID %u\n", reply->atom);
2107+ free(reply);
2108+ }
2109+}
2110+ ]]></example>
2111+ <field name="name_len"><![CDATA[
2112+The length of the following `name`.
2113+ ]]></field>
2114+ <field name="name"><![CDATA[
2115+The name of the atom.
2116+ ]]></field>
2117+ <field name="only_if_exists"><![CDATA[
2118+Return a valid atom id only if the atom already exists.
2119+ ]]></field>
2120+ <error type="Alloc"><![CDATA[
2121+TODO: reasons?
2122+ ]]></error>
2123+ <error type="Value"><![CDATA[
2124+A value other than 0 or 1 was specified for `only_if_exists`.
2125+ ]]></error>
2126+ <see type="program" name="xlsatoms" />
2127+ <see type="request" name="GetAtomName" />
2128+ </doc>
2129+
2130+ </request>
2131+
2132+ <request name="GetAtomName" opcode="17">
2133+ <pad bytes="1" />
2134+ <field type="ATOM" name="atom" />
2135+ <reply>
2136+ <pad bytes="1" />
2137+ <field type="CARD16" name="name_len" />
2138+ <pad bytes="22" />
2139+ <list type="char" name="name">
2140+ <fieldref>name_len</fieldref>
2141+ </list>
2142+ </reply>
2143+ </request>
2144+
2145+ <enum name="PropMode">
2146+ <item name="Replace"><value>0</value></item>
2147+ <item name="Prepend"><value>1</value></item>
2148+ <item name="Append"> <value>2</value></item>
2149+ <doc>
2150+ <field name="Replace"><![CDATA[
2151+Discard the previous property value and store the new data.
2152+ ]]></field>
2153+ <field name="Prepend"><![CDATA[
2154+Insert the new data before the beginning of existing data. The `format` must
2155+match existing property value. If the property is undefined, it is treated as
2156+defined with the correct type and format with zero-length data.
2157+ ]]></field>
2158+ <field name="Append"><![CDATA[
2159+Insert the new data after the beginning of existing data. The `format` must
2160+match existing property value. If the property is undefined, it is treated as
2161+defined with the correct type and format with zero-length data.
2162+ ]]></field>
2163+ </doc>
2164+ </enum>
2165+
2166+ <request name="ChangeProperty" opcode="18">
2167+ <field type="CARD8" name="mode" enum="PropMode" />
2168+ <field type="WINDOW" name="window" />
2169+ <field type="ATOM" name="property" />
2170+ <field type="ATOM" name="type" />
2171+ <field type="CARD8" name="format" />
2172+ <pad bytes="3" />
2173+ <field type="CARD32" name="data_len" />
2174+ <list type="void" name="data">
2175+ <op op="/">
2176+ <op op="*">
2177+ <fieldref>data_len</fieldref>
2178+ <fieldref>format</fieldref>
2179+ </op>
2180+ <value>8</value>
2181+ </op>
2182+ </list>
2183+ <doc>
2184+ <brief>Changes a window property</brief>
2185+ <description><![CDATA[
2186+Sets or updates a property on the specified `window`. Properties are for
2187+example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`).
2188+Protocols such as EWMH also use properties - for example EWMH defines the
2189+window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property.
2190+ ]]></description>
2191+ <example><![CDATA[
2192+/*
2193+ * Sets the WM_NAME property of the window to "XCB Example".
2194+ *
2195+ */
2196+void my_example(xcb_connection_t *conn, xcb_window_t window) {
2197+ xcb_change_property(conn,
2198+ XCB_PROP_MODE_REPLACE,
2199+ window,
2200+ XCB_ATOM_WM_NAME,
2201+ XCB_ATOM_STRING,
2202+ 8,
2203+ strlen("XCB Example"),
2204+ "XCB Example");
2205+ xcb_flush(conn);
2206+}
2207+ ]]></example>
2208+ <field name="window"><![CDATA[
2209+The window whose property you want to change.
2210+ ]]></field>
2211+ <!-- the enum doc is sufficient. -->
2212+ <field name="mode" />
2213+ <field name="property"><![CDATA[
2214+The property you want to change (an atom).
2215+ ]]></field>
2216+ <field name="type"><![CDATA[
2217+The type of the property you want to change (an atom).
2218+ ]]></field>
2219+ <field name="format"><![CDATA[
2220+Specifies whether the data should be viewed as a list of 8-bit, 16-bit or
2221+32-bit quantities. Possible values are 8, 16 and 32. This information allows
2222+the X server to correctly perform byte-swap operations as necessary.
2223+ ]]></field>
2224+ <field name="data_len"><![CDATA[
2225+Specifies the number of elements (see `format`).
2226+ ]]></field>
2227+ <field name="data"><![CDATA[
2228+The property data.
2229+ ]]></field>
2230+ <error type="Match"><![CDATA[
2231+TODO: reasons?
2232+ ]]></error>
2233+ <error type="Value"><![CDATA[
2234+TODO: reasons?
2235+ ]]></error>
2236+ <error type="Window"><![CDATA[
2237+The specified `window` does not exist.
2238+ ]]></error>
2239+ <error type="Atom"><![CDATA[
2240+`property` or `type` do not refer to a valid atom.
2241+ ]]></error>
2242+ <error type="Alloc"><![CDATA[
2243+The X server could not store the property (no memory?).
2244+ ]]></error>
2245+ <see type="request" name="InternAtom" />
2246+ <see type="program" name="xprop" />
2247+ </doc>
2248+ </request>
2249+
2250+ <request name="DeleteProperty" opcode="19">
2251+ <pad bytes="1" />
2252+ <field type="WINDOW" name="window" />
2253+ <field type="ATOM" name="property" />
2254+ </request>
2255+
2256+ <enum name="GetPropertyType">
2257+ <item name="Any"><value>0</value></item>
2258+ </enum>
2259+
2260+ <request name="GetProperty" opcode="20">
2261+ <field type="BOOL" name="delete" />
2262+ <field type="WINDOW" name="window" />
2263+ <field type="ATOM" name="property" />
2264+ <field type="ATOM" name="type" altenum="GetPropertyType" />
2265+ <field type="CARD32" name="long_offset" />
2266+ <field type="CARD32" name="long_length" />
2267+ <reply>
2268+ <field type="CARD8" name="format" />
2269+ <field type="ATOM" name="type" />
2270+ <field type="CARD32" name="bytes_after" />
2271+ <field type="CARD32" name="value_len" />
2272+ <pad bytes="12" />
2273+ <list type="void" name="value">
2274+ <op op="*">
2275+ <fieldref>value_len</fieldref>
2276+ <op op="/">
2277+ <fieldref>format</fieldref>
2278+ <value>8</value>
2279+ </op>
2280+ </op>
2281+ </list>
2282+ <doc>
2283+ <field name="format"><![CDATA[
2284+Specifies whether the data should be viewed as a list of 8-bit, 16-bit, or
2285+32-bit quantities. Possible values are 8, 16, and 32. This information allows
2286+the X server to correctly perform byte-swap operations as necessary.
2287+ ]]></field>
2288+ <field name="type"><![CDATA[
2289+The actual type of the property (an atom).
2290+ ]]></field>
2291+ <field name="bytes_after"><![CDATA[
2292+The number of bytes remaining to be read in the property if a partial read was
2293+performed.
2294+ ]]></field>
2295+ <field name="value_len"><![CDATA[
2296+The length of value. You should use the corresponding accessor instead of this
2297+field.
2298+ ]]></field>
2299+ </doc>
2300+ </reply>
2301+ <doc>
2302+ <brief>Gets a window property</brief>
2303+ <description><![CDATA[
2304+Gets the specified `property` from the specified `window`. Properties are for
2305+example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`).
2306+Protocols such as EWMH also use properties - for example EWMH defines the
2307+window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property.
2308+
2309+TODO: talk about `type`
2310+
2311+TODO: talk about `delete`
2312+
2313+TODO: talk about the offset/length thing. what's a valid use case?
2314+ ]]></description>
2315+ <example><![CDATA[
2316+/*
2317+ * Prints the WM_NAME property of the window.
2318+ *
2319+ */
2320+void my_example(xcb_connection_t *c, xcb_window_t window) {
2321+ xcb_get_property_cookie_t cookie;
2322+ xcb_get_property_reply_t *reply;
2323+
2324+ /* These atoms are predefined in the X11 protocol. */
2325+ xcb_atom_t property = XCB_ATOM_WM_NAME;
2326+ xcb_atom_t type = XCB_ATOM_STRING;
2327+
2328+ // TODO: a reasonable long_length for WM_NAME?
2329+ cookie = xcb_get_property(c, 0, window, property, type, 0, 0);
2330+ if ((reply = xcb_get_property_reply(c, cookie, NULL))) {
2331+ int len = xcb_get_property_value_length(reply);
2332+ if (len == 0) {
2333+ printf("TODO\\n");
2334+ free(reply);
2335+ return;
2336+ }
2337+ printf("WM_NAME is %.*s\\n", len,
2338+ (char*)xcb_get_property_value(reply));
2339+ }
2340+ free(reply);
2341+}
2342+ ]]></example>
2343+ <field name="window"><![CDATA[
2344+The window whose property you want to get.
2345+ ]]></field>
2346+ <field name="delete"><![CDATA[
2347+Whether the property should actually be deleted. For deleting a property, the
2348+specified `type` has to match the actual property type.
2349+ ]]></field>
2350+ <field name="property"><![CDATA[
2351+The property you want to get (an atom).
2352+ ]]></field>
2353+ <field name="type"><![CDATA[
2354+The type of the property you want to get (an atom).
2355+ ]]></field>
2356+ <field name="long_offset"><![CDATA[
2357+Specifies the offset (in 32-bit multiples) in the specified property where the
2358+data is to be retrieved.
2359+ ]]></field>
2360+ <field name="long_length"><![CDATA[
2361+Specifies how many 32-bit multiples of data should be retrieved (e.g. if you
2362+set `long_length` to 4, you will receive 16 bytes of data).
2363+ ]]></field>
2364+ <error type="Window"><![CDATA[
2365+The specified `window` does not exist.
2366+ ]]></error>
2367+ <error type="Atom"><![CDATA[
2368+`property` or `type` do not refer to a valid atom.
2369+ ]]></error>
2370+ <error type="Value"><![CDATA[
2371+The specified `long_offset` is beyond the actual property length (e.g. the
2372+property has a length of 3 bytes and you are setting `long_offset` to 1,
2373+resulting in a byte offset of 4).
2374+ ]]></error>
2375+ <see type="request" name="InternAtom" />
2376+ <see type="program" name="xprop" />
2377+ </doc>
2378+ </request>
2379+
2380+ <request name="ListProperties" opcode="21">
2381+ <pad bytes="1" />
2382+ <field type="WINDOW" name="window" />
2383+ <reply>
2384+ <pad bytes="1" />
2385+ <field type="CARD16" name="atoms_len" />
2386+ <pad bytes="22" />
2387+ <list type="ATOM" name="atoms">
2388+ <fieldref>atoms_len</fieldref>
2389+ </list>
2390+ </reply>
2391+ </request>
2392+
2393+ <request name="SetSelectionOwner" opcode="22">
2394+ <pad bytes="1" />
2395+ <field type="WINDOW" name="owner" altenum="Window" />
2396+ <field type="ATOM" name="selection" />
2397+ <field type="TIMESTAMP" name="time" altenum="Time" />
2398+ <doc>
2399+ <brief>Sets the owner of a selection</brief>
2400+ <description><![CDATA[
2401+Makes `window` the owner of the selection `selection` and updates the
2402+last-change time of the specified selection.
2403+
2404+TODO: briefly explain what a selection is.
2405+ ]]></description>
2406+ <field name="selection"><![CDATA[
2407+The selection.
2408+ ]]></field>
2409+ <field name="owner"><![CDATA[
2410+The new owner of the selection.
2411+
2412+The special value `XCB_NONE` means that the selection will have no owner.
2413+ ]]></field>
2414+ <field name="time"><![CDATA[
2415+Timestamp to avoid race conditions when running X over the network.
2416+
2417+The selection will not be changed if `time` is earlier than the current
2418+last-change time of the `selection` or is later than the current X server time.
2419+Otherwise, the last-change time is set to the specified time.
2420+
2421+The special value `XCB_CURRENT_TIME` will be replaced with the current server
2422+time.
2423+ ]]></field>
2424+ <error type="Atom"><![CDATA[
2425+`selection` does not refer to a valid atom.
2426+ ]]></error>
2427+ <see type="request" name="SetSelectionOwner" />
2428+ </doc>
2429+
2430+ </request>
2431+
2432+ <request name="GetSelectionOwner" opcode="23">
2433+ <pad bytes="1" />
2434+ <field type="ATOM" name="selection" />
2435+ <reply>
2436+ <pad bytes="1" />
2437+ <field type="WINDOW" name="owner" altenum="Window" />
2438+ <doc>
2439+ <field name="owner"><![CDATA[
2440+The current selection owner window.
2441+ ]]></field>
2442+ </doc>
2443+ </reply>
2444+ <doc>
2445+ <brief>Gets the owner of a selection</brief>
2446+ <description><![CDATA[
2447+Gets the owner of the specified selection.
2448+
2449+TODO: briefly explain what a selection is.
2450+ ]]></description>
2451+ <field name="selection"><![CDATA[
2452+The selection.
2453+ ]]></field>
2454+ <error type="Atom"><![CDATA[
2455+`selection` does not refer to a valid atom.
2456+ ]]></error>
2457+ <see type="request" name="SetSelectionOwner" />
2458+ </doc>
2459+ </request>
2460+
2461+ <request name="ConvertSelection" opcode="24">
2462+ <pad bytes="1" />
2463+ <field type="WINDOW" name="requestor" />
2464+ <field type="ATOM" name="selection" />
2465+ <field type="ATOM" name="target" />
2466+ <field type="ATOM" name="property" altenum="Atom" />
2467+ <field type="TIMESTAMP" name="time" altenum="Time" />
2468+ </request>
2469+
2470+ <enum name="SendEventDest">
2471+ <item name="PointerWindow"><value>0</value></item>
2472+ <item name="ItemFocus"> <value>1</value></item>
2473+ </enum>
2474+
2475+ <request name="SendEvent" opcode="25">
2476+ <field type="BOOL" name="propagate" />
2477+ <field type="WINDOW" name="destination" altenum="SendEventDest" />
2478+ <field type="CARD32" name="event_mask" mask="EventMask" />
2479+ <list type="char" name="event"><value>32</value></list>
2480+ <doc>
2481+ <brief>send an event</brief>
2482+ <description><![CDATA[
2483+Identifies the `destination` window, determines which clients should receive
2484+the specified event and ignores any active grabs.
2485+
2486+The `event` must be one of the core events or an event defined by an extension,
2487+so that the X server can correctly byte-swap the contents as necessary. The
2488+contents of `event` are otherwise unaltered and unchecked except for the
2489+`send_event` field which is forced to 'true'.
2490+ ]]></description>
2491+ <example><![CDATA[
2492+/*
2493+ * Tell the given window that it was configured to a size of 800x600 pixels.
2494+ *
2495+ */
2496+void my_example(xcb_connection_t *conn, xcb_window_t window) {
2497+ /* Every X11 event is 32 bytes long. Therefore, XCB will copy 32 bytes.
2498+ * In order to properly initialize these bytes, we allocate 32 bytes even
2499+ * though we only need less for an xcb_configure_notify_event_t */
2500+ xcb_configure_notify_event_t *event = calloc(32, 1);
2501+
2502+ event->event = window;
2503+ event->window = window;
2504+ event->response_type = XCB_CONFIGURE_NOTIFY;
2505+
2506+ event->x = 0;
2507+ event->y = 0;
2508+ event->width = 800;
2509+ event->height = 600;
2510+
2511+ event->border_width = 0;
2512+ event->above_sibling = XCB_NONE;
2513+ event->override_redirect = false;
2514+
2515+ xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY,
2516+ (char*)event);
2517+ xcb_flush(conn);
2518+ free(event);
2519+}
2520+ ]]></example>
2521+ <field name="destination"><![CDATA[
2522+The window to send this event to. Every client which selects any event within
2523+`event_mask` on `destination` will get the event.
2524+
2525+The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window
2526+that contains the mouse pointer.
2527+
2528+The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which
2529+has the keyboard focus.
2530+ ]]></field>
2531+ <field name="event_mask"><![CDATA[
2532+Event_mask for determining which clients should receive the specified event.
2533+See `destination` and `propagate`.
2534+ ]]></field>
2535+ <field name="propagate"><![CDATA[
2536+If `propagate` is true and no clients have selected any event on `destination`,
2537+the destination is replaced with the closest ancestor of `destination` for
2538+which some client has selected a type in `event_mask` and for which no
2539+intervening window has that type in its do-not-propagate-mask. If no such
2540+window exists or if the window is an ancestor of the focus window and
2541+`InputFocus` was originally specified as the destination, the event is not sent
2542+to any clients. Otherwise, the event is reported to every client selecting on
2543+the final destination any of the types specified in `event_mask`.
2544+ ]]></field>
2545+ <field name="event"><![CDATA[
2546+The event to send to the specified `destination`.
2547+ ]]></field>
2548+ <error type="Window"><![CDATA[
2549+The specified `destination` window does not exist.
2550+ ]]></error>
2551+ <error type="Value"><![CDATA[
2552+The given `event` is neither a core event nor an event defined by an extension.
2553+ ]]></error>
2554+ <see type="event" name="ConfigureNotify" />
2555+ </doc>
2556+ </request>
2557+
2558+ <enum name="GrabMode">
2559+ <item name="Sync"> <value>0</value></item>
2560+ <item name="Async"><value>1</value></item>
2561+ <doc>
2562+ <field name="Sync"><![CDATA[
2563+The state of the keyboard appears to freeze: No further keyboard events are
2564+generated by the server until the grabbing client issues a releasing
2565+`AllowEvents` request or until the keyboard grab is released.
2566+ ]]></field>
2567+ <field name="Async"><![CDATA[
2568+Keyboard event processing continues normally.
2569+ ]]></field>
2570+ </doc>
2571+ </enum>
2572+
2573+ <enum name="GrabStatus">
2574+ <item name="Success"> <value>0</value></item>
2575+ <item name="AlreadyGrabbed"><value>1</value></item>
2576+ <item name="InvalidTime"> <value>2</value></item>
2577+ <item name="NotViewable"> <value>3</value></item>
2578+ <item name="Frozen"> <value>4</value></item>
2579+ </enum>
2580+
2581+ <enum name="Cursor">
2582+ <item name="None"> <value>0</value></item>
2583+ </enum>
2584+
2585+ <request name="GrabPointer" opcode="26">
2586+ <field type="BOOL" name="owner_events" />
2587+ <field type="WINDOW" name="grab_window" />
2588+ <field type="CARD16" name="event_mask" mask="EventMask" />
2589+ <field type="BYTE" name="pointer_mode" enum="GrabMode" />
2590+ <field type="BYTE" name="keyboard_mode" enum="GrabMode" />
2591+ <field type="WINDOW" name="confine_to" altenum="Window" />
2592+ <field type="CURSOR" name="cursor" altenum="Cursor" />
2593+ <field type="TIMESTAMP" name="time" altenum="Time" />
2594+ <reply>
2595+ <field type="BYTE" name="status" enum="GrabStatus" />
2596+ </reply>
2597+ <doc>
2598+ <brief>Grab the pointer</brief>
2599+ <description><![CDATA[
2600+Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client.
2601+
2602+ ]]></description>
2603+ <example><![CDATA[
2604+/*
2605+ * Grabs the pointer actively
2606+ *
2607+ */
2608+void my_example(xcb_connection_t *conn, xcb_screen_t *screen, xcb_cursor_t cursor) {
2609+ xcb_grab_pointer_cookie_t cookie;
2610+ xcb_grab_pointer_reply_t *reply;
2611+
2612+ cookie = xcb_grab_pointer(
2613+ conn,
2614+ false, /* get all pointer events specified by the following mask */
2615+ screen->root, /* grab the root window */
2616+ XCB_NONE, /* which events to let through */
2617+ XCB_GRAB_MODE_ASYNC, /* pointer events should continue as normal */
2618+ XCB_GRAB_MODE_ASYNC, /* keyboard mode */
2619+ XCB_NONE, /* confine_to = in which window should the cursor stay */
2620+ cursor, /* we change the cursor to whatever the user wanted */
2621+ XCB_CURRENT_TIME
2622+ );
2623+
2624+ if ((reply = xcb_grab_pointer_reply(conn, cookie, NULL))) {
2625+ if (reply->status == XCB_GRAB_STATUS_SUCCESS)
2626+ printf("successfully grabbed the pointer\\n");
2627+ free(reply);
2628+ }
2629+}
2630+ ]]></example>
2631+ <field name="event_mask"><![CDATA[
2632+Specifies which pointer events are reported to the client.
2633+
2634+TODO: which values?
2635+ ]]></field>
2636+ <field name="confine_to"><![CDATA[
2637+Specifies the window to confine the pointer in (the user will not be able to
2638+move the pointer out of that window).
2639+
2640+The special value `XCB_NONE` means don't confine the pointer.
2641+ ]]></field>
2642+ <field name="cursor"><![CDATA[
2643+Specifies the cursor that should be displayed or `XCB_NONE` to not change the
2644+cursor.
2645+ ]]></field>
2646+ <field name="owner_events"><![CDATA[
2647+If 1, the `grab_window` will still get the pointer events. If 0, events are not
2648+reported to the `grab_window`.
2649+ ]]></field>
2650+ <field name="grab_window"><![CDATA[
2651+Specifies the window on which the pointer should be grabbed.
2652+ ]]></field>
2653+ <field name="time"><![CDATA[
2654+The time argument allows you to avoid certain circumstances that come up if
2655+applications take a long time to respond or if there are long network delays.
2656+Consider a situation where you have two applications, both of which normally
2657+grab the pointer when clicked on. If both applications specify the timestamp
2658+from the event, the second application may wake up faster and successfully grab
2659+the pointer before the first application. The first application then will get
2660+an indication that the other application grabbed the pointer before its request
2661+was processed.
2662+
2663+The special value `XCB_CURRENT_TIME` will be replaced with the current server
2664+time.
2665+ ]]></field>
2666+ <!-- the enum doc is sufficient. -->
2667+ <field name="pointer_mode" />
2668+ <field name="keyboard_mode" />
2669+ <error type="Value"><![CDATA[
2670+TODO: reasons?
2671+ ]]></error>
2672+ <error type="Window"><![CDATA[
2673+The specified `window` does not exist.
2674+ ]]></error>
2675+
2676+ <see type="request" name="GrabKeyboard" />
2677+ </doc>
2678+ </request>
2679+
2680+ <request name="UngrabPointer" opcode="27">
2681+ <pad bytes="1" />
2682+ <field type="TIMESTAMP" name="time" altenum="Time" />
2683+ <doc>
2684+ <brief>release the pointer</brief>
2685+ <description><![CDATA[
2686+Releases the pointer and any queued events if you actively grabbed the pointer
2687+before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button
2688+press.
2689+
2690+EnterNotify and LeaveNotify events are generated.
2691+ ]]></description>
2692+ <field name="time"><![CDATA[
2693+Timestamp to avoid race conditions when running X over the network.
2694+
2695+The pointer will not be released if `time` is earlier than the
2696+last-pointer-grab time or later than the current X server time.
2697+ ]]></field>
2698+ <field name="name_len"><![CDATA[
2699+Length (in bytes) of `name`.
2700+ ]]></field>
2701+ <field name="name"><![CDATA[
2702+A pattern describing an X core font.
2703+ ]]></field>
2704+ <see type="request" name="GrabPointer" />
2705+ <see type="request" name="GrabButton" />
2706+ <see type="event" name="EnterNotify" />
2707+ <see type="event" name="LeaveNotify" />
2708+ </doc>
2709+ </request>
2710+
2711+ <enum name="ButtonIndex">
2712+ <item name="Any"><value>0</value></item>
2713+ <item name="1"> <value>1</value></item>
2714+ <item name="2"> <value>2</value></item>
2715+ <item name="3"> <value>3</value></item>
2716+ <item name="4"> <value>4</value></item>
2717+ <item name="5"> <value>5</value></item>
2718+ <doc>
2719+ <field name="Any"><![CDATA[
2720+Any of the following (or none):
2721+ ]]></field>
2722+ <field name="1"><![CDATA[
2723+The left mouse button.
2724+ ]]></field>
2725+ <field name="2"><![CDATA[
2726+The right mouse button.
2727+ ]]></field>
2728+ <field name="3"><![CDATA[
2729+The middle mouse button.
2730+ ]]></field>
2731+ <field name="4"><![CDATA[
2732+Scroll wheel. TODO: direction?
2733+ ]]></field>
2734+ <field name="5"><![CDATA[
2735+Scroll wheel. TODO: direction?
2736+ ]]></field>
2737+ </doc>
2738+ </enum>
2739+
2740+ <request name="GrabButton" opcode="28">
2741+ <field type="BOOL" name="owner_events" />
2742+ <field type="WINDOW" name="grab_window" />
2743+ <field type="CARD16" name="event_mask" mask="EventMask" />
2744+ <field type="CARD8" name="pointer_mode" enum="GrabMode" />
2745+ <field type="CARD8" name="keyboard_mode" enum="GrabMode" />
2746+ <field type="WINDOW" name="confine_to" altenum="Window" />
2747+ <field type="CURSOR" name="cursor" altenum="Cursor" />
2748+ <field type="CARD8" name="button" enum="ButtonIndex" />
2749+ <pad bytes="1" />
2750+ <field type="CARD16" name="modifiers" mask="ModMask" />
2751+ <doc>
2752+ <brief>Grab pointer button(s)</brief>
2753+ <description><![CDATA[
2754+This request establishes a passive grab. The pointer is actively grabbed as
2755+described in GrabPointer, the last-pointer-grab time is set to the time at
2756+which the button was pressed (as transmitted in the ButtonPress event), and the
2757+ButtonPress event is reported if all of the following conditions are true:
2758+
2759+The pointer is not grabbed and the specified button is logically pressed when
2760+the specified modifier keys are logically down, and no other buttons or
2761+modifier keys are logically down.
2762+
2763+The grab-window contains the pointer.
2764+
2765+The confine-to window (if any) is viewable.
2766+
2767+A passive grab on the same button/key combination does not exist on any
2768+ancestor of grab-window.
2769+
2770+The interpretation of the remaining arguments is the same as for GrabPointer.
2771+The active grab is terminated automatically when the logical state of the
2772+pointer has all buttons released, independent of the logical state of modifier
2773+keys. Note that the logical state of a device (as seen by means of the
2774+protocol) may lag the physical state if device event processing is frozen. This
2775+request overrides all previous passive grabs by the same client on the same
2776+button/key combinations on the same window. A modifier of AnyModifier is
2777+equivalent to issuing the request for all possible modifier combinations
2778+(including the combination of no modifiers). It is not required that all
2779+specified modifiers have currently assigned keycodes. A button of AnyButton is
2780+equivalent to issuing the request for all possible buttons. Otherwise, it is
2781+not required that the button specified currently be assigned to a physical
2782+button.
2783+
2784+An Access error is generated if some other client has already issued a
2785+GrabButton request with the same button/key combination on the same window.
2786+When using AnyModifier or AnyButton, the request fails completely (no grabs are
2787+established), and an Access error is generated if there is a conflicting grab
2788+for any combination. The request has no effect on an active grab.
2789+
2790+ ]]></description>
2791+ <field name="owner_events"><![CDATA[
2792+If 1, the `grab_window` will still get the pointer events. If 0, events are not
2793+reported to the `grab_window`.
2794+ ]]></field>
2795+ <field name="grab_window"><![CDATA[
2796+Specifies the window on which the pointer should be grabbed.
2797+ ]]></field>
2798+ <field name="event_mask"><![CDATA[
2799+Specifies which pointer events are reported to the client.
2800+
2801+TODO: which values?
2802+ ]]></field>
2803+ <field name="confine_to"><![CDATA[
2804+Specifies the window to confine the pointer in (the user will not be able to
2805+move the pointer out of that window).
2806+
2807+The special value `XCB_NONE` means don't confine the pointer.
2808+ ]]></field>
2809+ <field name="cursor"><![CDATA[
2810+Specifies the cursor that should be displayed or `XCB_NONE` to not change the
2811+cursor.
2812+ ]]></field>
2813+ <field name="modifiers"><![CDATA[
2814+The modifiers to grab.
2815+
2816+Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all
2817+possible modifier combinations.
2818+ ]]></field>
2819+ <!-- the enum doc is sufficient. -->
2820+ <field name="pointer_mode" />
2821+ <field name="keyboard_mode" />
2822+ <field name="button" />
2823+ <error type="Access"><![CDATA[
2824+Another client has already issued a GrabButton with the same button/key
2825+combination on the same window.
2826+ ]]></error>
2827+ <error type="Value"><![CDATA[
2828+TODO: reasons?
2829+ ]]></error>
2830+ <error type="Cursor"><![CDATA[
2831+The specified `cursor` does not exist.
2832+ ]]></error>
2833+ <error type="Window"><![CDATA[
2834+The specified `window` does not exist.
2835+ ]]></error>
2836+ </doc>
2837+ </request>
2838+
2839+ <request name="UngrabButton" opcode="29">
2840+ <field type="CARD8" name="button" enum="ButtonIndex" />
2841+ <field type="WINDOW" name="grab_window" />
2842+ <field type="CARD16" name="modifiers" mask="ModMask" />
2843+ <pad bytes="2" />
2844+ </request>
2845+
2846+ <request name="ChangeActivePointerGrab" opcode="30">
2847+ <pad bytes="1" />
2848+ <field type="CURSOR" name="cursor" altenum="Cursor" />
2849+ <field type="TIMESTAMP" name="time" altenum="Time" />
2850+ <field type="CARD16" name="event_mask" mask="EventMask" />
2851+ <pad bytes="2" />
2852+ </request>
2853+
2854+ <request name="GrabKeyboard" opcode="31">
2855+ <field type="BOOL" name="owner_events" />
2856+ <field type="WINDOW" name="grab_window" />
2857+ <field type="TIMESTAMP" name="time" altenum="Time" />
2858+ <field type="BYTE" name="pointer_mode" enum="GrabMode" />
2859+ <field type="BYTE" name="keyboard_mode" enum="GrabMode" />
2860+ <pad bytes="2" />
2861+ <reply>
2862+ <field type="BYTE" name="status" enum="GrabStatus" />
2863+ </reply>
2864+ <doc>
2865+ <brief>Grab the keyboard</brief>
2866+ <description><![CDATA[
2867+Actively grabs control of the keyboard and generates FocusIn and FocusOut
2868+events. Further key events are reported only to the grabbing client.
2869+
2870+Any active keyboard grab by this client is overridden. If the keyboard is
2871+actively grabbed by some other client, `AlreadyGrabbed` is returned. If
2872+`grab_window` is not viewable, `GrabNotViewable` is returned. If the keyboard
2873+is frozen by an active grab of another client, `GrabFrozen` is returned. If the
2874+specified `time` is earlier than the last-keyboard-grab time or later than the
2875+current X server time, `GrabInvalidTime` is returned. Otherwise, the
2876+last-keyboard-grab time is set to the specified time.
2877+ ]]></description>
2878+ <example><![CDATA[
2879+/*
2880+ * Grabs the keyboard actively
2881+ *
2882+ */
2883+void my_example(xcb_connection_t *conn, xcb_screen_t *screen) {
2884+ xcb_grab_keyboard_cookie_t cookie;
2885+ xcb_grab_keyboard_reply_t *reply;
2886+
2887+ cookie = xcb_grab_keyboard(
2888+ conn,
2889+ true, /* report events */
2890+ screen->root, /* grab the root window */
2891+ XCB_CURRENT_TIME,
2892+ XCB_GRAB_MODE_ASYNC, /* process events as normal, do not require sync */
2893+ XCB_GRAB_MODE_ASYNC
2894+ );
2895+
2896+ if ((reply = xcb_grab_keyboard_reply(conn, cookie, NULL))) {
2897+ if (reply->status == XCB_GRAB_STATUS_SUCCESS)
2898+ printf("successfully grabbed the keyboard\\n");
2899+
2900+ free(reply);
2901+ }
2902+}
2903+ ]]></example>
2904+ <field name="owner_events"><![CDATA[
2905+If 1, the `grab_window` will still get the pointer events. If 0, events are not
2906+reported to the `grab_window`.
2907+ ]]></field>
2908+ <field name="grab_window"><![CDATA[
2909+Specifies the window on which the pointer should be grabbed.
2910+ ]]></field>
2911+ <field name="time"><![CDATA[
2912+Timestamp to avoid race conditions when running X over the network.
2913+
2914+The special value `XCB_CURRENT_TIME` will be replaced with the current server
2915+time.
2916+ ]]></field>
2917+ <!-- the enum doc is sufficient. -->
2918+ <field name="pointer_mode" />
2919+ <field name="keyboard_mode" />
2920+ <error type="Value"><![CDATA[
2921+TODO: reasons?
2922+ ]]></error>
2923+ <error type="Window"><![CDATA[
2924+The specified `window` does not exist.
2925+ ]]></error>
2926+ <see type="request" name="GrabPointer" />
2927+ </doc>
2928+ </request>
2929+
2930+ <request name="UngrabKeyboard" opcode="32">
2931+ <pad bytes="1" />
2932+ <field type="TIMESTAMP" name="time" altenum="Time" />
2933+ </request>
2934+
2935+ <!-- Use KEYCODE any = { XCBGrabAny }; to grab any key -->
2936+ <enum name="Grab">
2937+ <item name="Any"><value>0</value></item>
2938+ </enum>
2939+
2940+ <request name="GrabKey" opcode="33">
2941+ <field type="BOOL" name="owner_events" />
2942+ <field type="WINDOW" name="grab_window" />
2943+ <field type="CARD16" name="modifiers" mask="ModMask" />
2944+ <field type="KEYCODE" name="key" altenum="Grab" />
2945+ <field type="CARD8" name="pointer_mode" enum="GrabMode" />
2946+ <field type="CARD8" name="keyboard_mode" enum="GrabMode" />
2947+ <pad bytes="3" />
2948+ <doc>
2949+ <brief>Grab keyboard key(s)</brief>
2950+ <description><![CDATA[
2951+Establishes a passive grab on the keyboard. In the future, the keyboard is
2952+actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to
2953+the time at which the key was pressed (as transmitted in the KeyPress event),
2954+and the KeyPress event is reported if all of the following conditions are true:
2955+
2956+The keyboard is not grabbed and the specified key (which can itself be a
2957+modifier key) is logically pressed when the specified modifier keys are
2958+logically down, and no other modifier keys are logically down.
2959+
2960+Either the grab_window is an ancestor of (or is) the focus window, or the
2961+grab_window is a descendant of the focus window and contains the pointer.
2962+
2963+A passive grab on the same key combination does not exist on any ancestor of
2964+grab_window.
2965+
2966+The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated
2967+automatically when the logical state of the keyboard has the specified key released (independent of the
2968+logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window.
2969+
2970+Note that the logical state of a device (as seen by client applications) may lag the physical state if
2971+device event processing is frozen.
2972+
2973+A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified
2974+have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for
2975+all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode
2976+and max_keycode in the connection setup, or a BadValue error results.
2977+
2978+If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess
2979+error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error
2980+results (no grabs are established) if there is a conflicting grab for any combination.
2981+
2982+ ]]></description>
2983+ <field name="owner_events"><![CDATA[
2984+If 1, the `grab_window` will still get the key events. If 0, events are not
2985+reported to the `grab_window`.
2986+ ]]></field>
2987+ <field name="grab_window"><![CDATA[
2988+Specifies the window on which the key should be grabbed.
2989+ ]]></field>
2990+ <field name="key"><![CDATA[
2991+The keycode of the key to grab.
2992+
2993+The special value `XCB_GRAB_ANY` means grab any key.
2994+ ]]></field>
2995+ <field name="modifiers"><![CDATA[
2996+The modifiers to grab.
2997+
2998+Using the special value `XCB_MOD_MASK_ANY` means grab the key with all
2999+possible modifier combinations.
3000+ ]]></field>
3001+ <!-- the enum doc is sufficient. -->
3002+ <field name="pointer_mode" />
3003+ <field name="keyboard_mode" />
3004+ <error type="Access"><![CDATA[
3005+Another client has already issued a GrabKey with the same button/key
3006+combination on the same window.
3007+ ]]></error>
3008+ <error type="Value"><![CDATA[
3009+The key is not `XCB_GRAB_ANY` and not in the range specified by `min_keycode`
3010+and `max_keycode` in the connection setup.
3011+ ]]></error>
3012+ <error type="Window"><![CDATA[
3013+The specified `window` does not exist.
3014+ ]]></error>
3015+ <see type="request" name="GrabKeyboard" />
3016+ </doc>
3017+ </request>
3018+
3019+ <request name="UngrabKey" opcode="34">
3020+ <field type="KEYCODE" name="key" altenum="Grab" />
3021+ <field type="WINDOW" name="grab_window" />
3022+ <field type="CARD16" name="modifiers" mask="ModMask" />
3023+ <pad bytes="2" />
3024+ <doc>
3025+ <brief>release a key combination</brief>
3026+ <description><![CDATA[
3027+Releases the key combination on `grab_window` if you grabbed it using
3028+`xcb_grab_key` before.
3029+ ]]></description>
3030+ <field name="key"><![CDATA[
3031+The keycode of the specified key combination.
3032+
3033+Using the special value `XCB_GRAB_ANY` means releasing all possible key codes.
3034+ ]]></field>
3035+ <field name="grab_window"><![CDATA[
3036+The window on which the grabbed key combination will be released.
3037+ ]]></field>
3038+ <field name="modifiers"><![CDATA[
3039+The modifiers of the specified key combination.
3040+
3041+Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination
3042+with every possible modifier combination.
3043+ ]]></field>
3044+ <error type="Window"><![CDATA[
3045+The specified `grab_window` does not exist.
3046+ ]]></error>
3047+ <error type="Value"><![CDATA[
3048+TODO: reasons?
3049+ ]]></error>
3050+ <see type="request" name="GrabKey" />
3051+ <see type="program" name="xev" />
3052+ </doc>
3053+ </request>
3054+
3055+ <enum name="Allow">
3056+ <item name="AsyncPointer"> <value>0</value></item>
3057+ <item name="SyncPointer"> <value>1</value></item>
3058+ <item name="ReplayPointer"> <value>2</value></item>
3059+ <item name="AsyncKeyboard"> <value>3</value></item>
3060+ <item name="SyncKeyboard"> <value>4</value></item>
3061+ <item name="ReplayKeyboard"><value>5</value></item>
3062+ <item name="AsyncBoth"> <value>6</value></item>
3063+ <item name="SyncBoth"> <value>7</value></item>
3064+ <doc>
3065+ <field name="AsyncPointer"><![CDATA[
3066+For AsyncPointer, if the pointer is frozen by the client, pointer event
3067+processing continues normally. If the pointer is frozen twice by the client on
3068+behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no
3069+effect if the pointer is not frozen by the client, but the pointer need not be
3070+grabbed by the client.
3071+
3072+TODO: rewrite this in more understandable terms.
3073+ ]]></field>
3074+ <field name="SyncPointer"><![CDATA[
3075+For SyncPointer, if the pointer is frozen and actively grabbed by the client,
3076+pointer event processing continues normally until the next ButtonPress or
3077+ButtonRelease event is reported to the client, at which time the pointer again
3078+appears to freeze. However, if the reported event causes the pointer grab to be
3079+released, then the pointer does not freeze. SyncPointer has no effect if the
3080+pointer is not frozen by the client or if the pointer is not grabbed by the
3081+client.
3082+ ]]></field>
3083+ <field name="ReplayPointer"><![CDATA[
3084+For ReplayPointer, if the pointer is actively grabbed by the client and is
3085+frozen as the result of an event having been sent to the client (either from
3086+the activation of a GrabButton or from a previous AllowEvents with mode
3087+SyncPointer but not from a GrabPointer), then the pointer grab is released and
3088+that event is completely reprocessed, this time ignoring any passive grabs at
3089+or above (towards the root) the grab-window of the grab just released. The
3090+request has no effect if the pointer is not grabbed by the client or if the
3091+pointer is not frozen as the result of an event.
3092+ ]]></field>
3093+ <field name="AsyncKeyboard"><![CDATA[
3094+For AsyncKeyboard, if the keyboard is frozen by the client, keyboard event
3095+processing continues normally. If the keyboard is frozen twice by the client on
3096+behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has
3097+no effect if the keyboard is not frozen by the client, but the keyboard need
3098+not be grabbed by the client.
3099+ ]]></field>
3100+ <field name="SyncKeyboard"><![CDATA[
3101+For SyncKeyboard, if the keyboard is frozen and actively grabbed by the client,
3102+keyboard event processing continues normally until the next KeyPress or
3103+KeyRelease event is reported to the client, at which time the keyboard again
3104+appears to freeze. However, if the reported event causes the keyboard grab to
3105+be released, then the keyboard does not freeze. SyncKeyboard has no effect if
3106+the keyboard is not frozen by the client or if the keyboard is not grabbed by
3107+the client.
3108+ ]]></field>
3109+ <field name="ReplayKeyboard"><![CDATA[
3110+For ReplayKeyboard, if the keyboard is actively grabbed by the client and is
3111+frozen as the result of an event having been sent to the client (either from
3112+the activation of a GrabKey or from a previous AllowEvents with mode
3113+SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released
3114+and that event is completely reprocessed, this time ignoring any passive grabs
3115+at or above (towards the root) the grab-window of the grab just released. The
3116+request has no effect if the keyboard is not grabbed by the client or if the
3117+keyboard is not frozen as the result of an event.
3118+ ]]></field>
3119+ <field name="SyncBoth"><![CDATA[
3120+For SyncBoth, if both pointer and keyboard are frozen by the client, event
3121+processing (for both devices) continues normally until the next ButtonPress,
3122+ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a
3123+grabbed device (button event for the pointer, key event for the keyboard), at
3124+which time the devices again appear to freeze. However, if the reported event
3125+causes the grab to be released, then the devices do not freeze (but if the
3126+other device is still grabbed, then a subsequent event for it will still cause
3127+both devices to freeze). SyncBoth has no effect unless both pointer and
3128+keyboard are frozen by the client. If the pointer or keyboard is frozen twice
3129+by the client on behalf of two separate grabs, SyncBoth thaws for both (but a
3130+subsequent freeze for SyncBoth will only freeze each device once).
3131+ ]]></field>
3132+ <field name="AsyncBoth"><![CDATA[
3133+For AsyncBoth, if the pointer and the keyboard are frozen by the client, event
3134+processing for both devices continues normally. If a device is frozen twice by
3135+the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth
3136+has no effect unless both pointer and keyboard are frozen by the client.
3137+ ]]></field>
3138+ </doc>
3139+ </enum>
3140+
3141+ <request name="AllowEvents" opcode="35">
3142+ <field type="CARD8" name="mode" enum="Allow" />
3143+ <field type="TIMESTAMP" name="time" altenum="Time" />
3144+ <doc>
3145+ <brief>release queued events</brief>
3146+ <description><![CDATA[
3147+Releases queued events if the client has caused a device (pointer/keyboard) to
3148+freeze due to grabbing it actively. This request has no effect if `time` is
3149+earlier than the last-grab time of the most recent active grab for this client
3150+or if `time` is later than the current X server time.
3151+ ]]></description>
3152+ <!-- the enum doc is sufficient. -->
3153+ <field name="mode" />
3154+ <field name="time"><![CDATA[
3155+Timestamp to avoid race conditions when running X over the network.
3156+
3157+The special value `XCB_CURRENT_TIME` will be replaced with the current server
3158+time.
3159+ ]]></field>
3160+ <error type="Value"><![CDATA[
3161+You specified an invalid `mode`.
3162+ ]]></error>
3163+ </doc>
3164+ </request>
3165+
3166+ <request name="GrabServer" opcode="36" />
3167+
3168+ <request name="UngrabServer" opcode="37" />
3169+
3170+ <request name="QueryPointer" opcode="38">
3171+ <pad bytes="1" />
3172+ <field type="WINDOW" name="window" />
3173+ <reply>
3174+ <field type="BOOL" name="same_screen" />
3175+ <field type="WINDOW" name="root" />
3176+ <field type="WINDOW" name="child" altenum="Window" />
3177+ <field type="INT16" name="root_x" />
3178+ <field type="INT16" name="root_y" />
3179+ <field type="INT16" name="win_x" />
3180+ <field type="INT16" name="win_y" />
3181+ <field type="CARD16" name="mask" mask="KeyButMask" />
3182+ <pad bytes="2" />
3183+ <doc>
3184+ <field name="same_screen"><![CDATA[
3185+If `same_screen` is False, then the pointer is not on the same screen as the
3186+argument window, `child` is None, and `win_x` and `win_y` are zero. If
3187+`same_screen` is True, then `win_x` and `win_y` are the pointer coordinates
3188+relative to the argument window's origin, and child is the child containing the
3189+pointer, if any.
3190+ ]]></field>
3191+ <field name="root"><![CDATA[
3192+The root window the pointer is logically on.
3193+ ]]></field>
3194+ <field name="child"><![CDATA[
3195+The child window containing the pointer, if any, if `same_screen` is true. If
3196+`same_screen` is false, `XCB_NONE` is returned.
3197+ ]]></field>
3198+ <field name="root_x"><![CDATA[
3199+The pointer X position, relative to `root`.
3200+ ]]></field>
3201+ <field name="root_y"><![CDATA[
3202+The pointer Y position, relative to `root`.
3203+ ]]></field>
3204+ <field name="win_x"><![CDATA[
3205+The pointer X coordinate, relative to `child`, if `same_screen` is true. Zero
3206+otherwise.
3207+ ]]></field>
3208+ <field name="win_y"><![CDATA[
3209+The pointer Y coordinate, relative to `child`, if `same_screen` is true. Zero
3210+otherwise.
3211+ ]]></field>
3212+ <field name="mask"><![CDATA[
3213+The current logical state of the modifier keys and the buttons. Note that the
3214+logical state of a device (as seen by means of the protocol) may lag the
3215+physical state if device event processing is frozen.
3216+ ]]></field>
3217+ </doc>
3218+ </reply>
3219+ <doc>
3220+ <brief>get pointer coordinates</brief>
3221+ <description><![CDATA[
3222+Gets the root window the pointer is logically on and the pointer coordinates
3223+relative to the root window's origin.
3224+ ]]></description>
3225+ <field name="window"><![CDATA[
3226+A window to check if the pointer is on the same screen as `window` (see the
3227+`same_screen` field in the reply).
3228+ ]]></field>
3229+ <error type="Window"><![CDATA[
3230+The specified `window` does not exist.
3231+ ]]></error>
3232+ </doc>
3233+ </request>
3234+
3235+ <struct name="TIMECOORD">
3236+ <field type="TIMESTAMP" name="time" />
3237+ <field type="INT16" name="x" />
3238+ <field type="INT16" name="y" />
3239+ </struct>
3240+
3241+ <request name="GetMotionEvents" opcode="39">
3242+ <pad bytes="1" />
3243+ <field type="WINDOW" name="window" />
3244+ <field type="TIMESTAMP" name="start" altenum="Time" />
3245+ <field type="TIMESTAMP" name="stop" altenum="Time" />
3246+ <reply>
3247+ <pad bytes="1" />
3248+ <field type="CARD32" name="events_len" />
3249+ <pad bytes="20" />
3250+ <list type="TIMECOORD" name="events">
3251+ <fieldref>events_len</fieldref>
3252+ </list>
3253+ </reply>
3254+ </request>
3255+
3256+ <request name="TranslateCoordinates" opcode="40">
3257+ <pad bytes="1" />
3258+ <field type="WINDOW" name="src_window" />
3259+ <field type="WINDOW" name="dst_window" />
3260+ <field type="INT16" name="src_x" />
3261+ <field type="INT16" name="src_y" />
3262+ <reply>
3263+ <field type="BOOL" name="same_screen" />
3264+ <field type="WINDOW" name="child" altenum="Window" />
3265+ <field type="INT16" name="dst_x" />
3266+ <field type="INT16" name="dst_y" />
3267+ </reply>
3268+ </request>
3269+
3270+ <request name="WarpPointer" opcode="41">
3271+ <pad bytes="1" />
3272+ <field type="WINDOW" name="src_window" altenum="Window" />
3273+ <field type="WINDOW" name="dst_window" altenum="Window" />
3274+ <field type="INT16" name="src_x" />
3275+ <field type="INT16" name="src_y" />
3276+ <field type="CARD16" name="src_width" />
3277+ <field type="CARD16" name="src_height" />
3278+ <field type="INT16" name="dst_x" />
3279+ <field type="INT16" name="dst_y" />
3280+ <doc>
3281+ <brief>move mouse pointer</brief>
3282+ <description><![CDATA[
3283+Moves the mouse pointer to the specified position.
3284+
3285+If `src_window` is not `XCB_NONE` (TODO), the move will only take place if the
3286+pointer is inside `src_window` and within the rectangle specified by (`src_x`,
3287+`src_y`, `src_width`, `src_height`). The rectangle coordinates are relative to
3288+`src_window`.
3289+
3290+If `dst_window` is not `XCB_NONE` (TODO), the pointer will be moved to the
3291+offsets (`dst_x`, `dst_y`) relative to `dst_window`. If `dst_window` is
3292+`XCB_NONE` (TODO), the pointer will be moved by the offsets (`dst_x`, `dst_y`)
3293+relative to the current position of the pointer.
3294+ ]]></description>
3295+ <field name="src_window"><![CDATA[
3296+If `src_window` is not `XCB_NONE` (TODO), the move will only take place if the
3297+pointer is inside `src_window` and within the rectangle specified by (`src_x`,
3298+`src_y`, `src_width`, `src_height`). The rectangle coordinates are relative to
3299+`src_window`.
3300+ ]]></field>
3301+ <field name="dst_window"><![CDATA[
3302+If `dst_window` is not `XCB_NONE` (TODO), the pointer will be moved to the
3303+offsets (`dst_x`, `dst_y`) relative to `dst_window`. If `dst_window` is
3304+`XCB_NONE` (TODO), the pointer will be moved by the offsets (`dst_x`, `dst_y`)
3305+relative to the current position of the pointer.
3306+ ]]></field>
3307+ <error type="Window"><![CDATA[
3308+TODO: reasons?
3309+ ]]></error>
3310+ <see type="request" name="SetInputFocus" />
3311+ </doc>
3312+ </request>
3313+
3314+ <!-- used for revert_to and focus -->
3315+ <enum name="InputFocus">
3316+ <item name="None"> <value>0</value></item>
3317+ <item name="PointerRoot"><value>1</value></item>
3318+ <item name="Parent"> <value>2</value></item> <!-- revert_to only -->
3319+ <item name="FollowKeyboard"><value>3</value></item> <!-- xinput extension only -->
3320+ <doc>
3321+ <field name="None"><![CDATA[
3322+The focus reverts to `XCB_NONE`, so no window will have the input focus.
3323+ ]]></field>
3324+ <field name="PointerRoot"><![CDATA[
3325+The focus reverts to `XCB_POINTER_ROOT` respectively. When the focus reverts,
3326+FocusIn and FocusOut events are generated, but the last-focus-change time is
3327+not changed.
3328+ ]]></field>
3329+ <field name="Parent"><![CDATA[
3330+The focus reverts to the parent (or closest viewable ancestor) and the new
3331+revert_to value is `XCB_INPUT_FOCUS_NONE`.
3332+ ]]></field>
3333+ <field name="FollowKeyboard"><![CDATA[
3334+NOT YET DOCUMENTED. Only relevant for the xinput extension.
3335+ ]]></field>
3336+ </doc>
3337+ </enum>
3338+
3339+ <request name="SetInputFocus" opcode="42">
3340+ <field type="CARD8" name="revert_to" enum="InputFocus" />
3341+ <field type="WINDOW" name="focus" altenum="InputFocus" />
3342+ <field type="TIMESTAMP" name="time" altenum="Time" />
3343+ <doc>
3344+ <brief>Sets input focus</brief>
3345+ <description><![CDATA[
3346+Changes the input focus and the last-focus-change time. If the specified `time`
3347+is earlier than the current last-focus-change time, the request is ignored (to
3348+avoid race conditions when running X over the network).
3349+
3350+A FocusIn and FocusOut event is generated when focus is changed.
3351+ ]]></description>
3352+ <field name="focus"><![CDATA[
3353+The window to focus. All keyboard events will be reported to this window. The
3354+window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO).
3355+
3356+If `focus` is `XCB_NONE` (TODO), all keyboard events are
3357+discarded until a new focus window is set.
3358+
3359+If `focus` is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the
3360+screen on which the pointer is on currently.
3361+ ]]></field>
3362+ <field name="time"><![CDATA[
3363+Timestamp to avoid race conditions when running X over the network.
3364+
3365+The special value `XCB_CURRENT_TIME` will be replaced with the current server
3366+time.
3367+ ]]></field>
3368+ <field name="revert_to"><![CDATA[
3369+Specifies what happens when the `focus` window becomes unviewable (if `focus`
3370+is neither `XCB_NONE` nor `XCB_POINTER_ROOT`).
3371+ ]]></field>
3372+ <error type="Window"><![CDATA[
3373+The specified `focus` window does not exist.
3374+ ]]></error>
3375+ <error type="Match"><![CDATA[
3376+The specified `focus` window is not viewable.
3377+ ]]></error>
3378+ <error type="Value"><![CDATA[
3379+TODO: Reasons?
3380+ ]]></error>
3381+ <see type="event" name="FocusIn" />
3382+ <see type="event" name="FocusOut" />
3383+ </doc>
3384+
3385+ </request>
3386+
3387+ <request name="GetInputFocus" opcode="43">
3388+ <reply>
3389+ <field type="CARD8" name="revert_to" enum="InputFocus" />
3390+ <field type="WINDOW" name="focus" altenum="InputFocus" />
3391+ </reply>
3392+ </request>
3393+
3394+ <request name="QueryKeymap" opcode="44">
3395+ <reply>
3396+ <pad bytes="1" />
3397+ <list type="CARD8" name="keys"><value>32</value></list>
3398+ </reply>
3399+ </request>
3400+
3401+ <request name="OpenFont" opcode="45">
3402+ <pad bytes="1" />
3403+ <field type="FONT" name="fid" />
3404+ <field type="CARD16" name="name_len" />
3405+ <pad bytes="2" />
3406+ <list type="char" name="name">
3407+ <fieldref>name_len</fieldref>
3408+ </list>
3409+ <doc>
3410+ <brief>opens a font</brief>
3411+ <description><![CDATA[
3412+Opens any X core font matching the given `name` (for example "-misc-fixed-*").
3413+
3414+Note that X core fonts are deprecated (but still supported) in favor of
3415+client-side rendering using Xft.
3416+ ]]></description>
3417+ <field name="fid"><![CDATA[
3418+The ID with which you will refer to the font, created by `xcb_generate_id`.
3419+ ]]></field>
3420+ <field name="name_len"><![CDATA[
3421+Length (in bytes) of `name`.
3422+ ]]></field>
3423+ <field name="name"><![CDATA[
3424+A pattern describing an X core font.
3425+ ]]></field>
3426+ <error type="Name"><![CDATA[
3427+No font matches the given `name`.
3428+ ]]></error>
3429+ <see type="function" name="xcb_generate_id" />
3430+ </doc>
3431+ </request>
3432+
3433+ <request name="CloseFont" opcode="46">
3434+ <pad bytes="1" />
3435+ <field type="FONT" name="font" />
3436+ </request>
3437+
3438+ <enum name="FontDraw">
3439+ <item name="LeftToRight"><value>0</value></item>
3440+ <item name="RightToLeft"><value>1</value></item>
3441+ </enum>
3442+
3443+ <struct name="FONTPROP">
3444+ <field type="ATOM" name="name" />
3445+ <field type="CARD32" name="value" />
3446+ </struct>
3447+
3448+ <struct name="CHARINFO">
3449+ <field type="INT16" name="left_side_bearing" />
3450+ <field type="INT16" name="right_side_bearing" />
3451+ <field type="INT16" name="character_width" />
3452+ <field type="INT16" name="ascent" />
3453+ <field type="INT16" name="descent" />
3454+ <field type="CARD16" name="attributes" />
3455+ </struct>
3456+
3457+ <request name="QueryFont" opcode="47">
3458+ <pad bytes="1" />
3459+ <field type="FONTABLE" name="font" />
3460+ <reply>
3461+ <pad bytes="1" />
3462+ <field type="CHARINFO" name="min_bounds" />
3463+ <pad bytes="4" />
3464+ <field type="CHARINFO" name="max_bounds" />
3465+ <pad bytes="4" />
3466+ <field type="CARD16" name="min_char_or_byte2" />
3467+ <field type="CARD16" name="max_char_or_byte2" />
3468+ <field type="CARD16" name="default_char" />
3469+ <field type="CARD16" name="properties_len" />
3470+ <field type="BYTE" name="draw_direction" enum="FontDraw" />
3471+ <field type="CARD8" name="min_byte1" />
3472+ <field type="CARD8" name="max_byte1" />
3473+ <field type="BOOL" name="all_chars_exist" />
3474+ <field type="INT16" name="font_ascent" />
3475+ <field type="INT16" name="font_descent" />
3476+ <field type="CARD32" name="char_infos_len" />
3477+ <list type="FONTPROP" name="properties">
3478+ <fieldref>properties_len</fieldref>
3479+ </list>
3480+ <list type="CHARINFO" name="char_infos">
3481+ <fieldref>char_infos_len</fieldref>
3482+ </list>
3483+ <doc>
3484+ <field name="min_bounds"><![CDATA[
3485+minimum bounds over all existing char
3486+ ]]></field>
3487+ <field name="max_bounds"><![CDATA[
3488+maximum bounds over all existing char
3489+ ]]></field>
3490+ <field name="min_char_or_byte2"><![CDATA[
3491+first character
3492+ ]]></field>
3493+ <field name="max_char_or_byte2"><![CDATA[
3494+last character
3495+ ]]></field>
3496+ <field name="default_char"><![CDATA[
3497+char to print for undefined character
3498+ ]]></field>
3499+ <field name="properties_len"><![CDATA[
3500+how many properties there are
3501+ ]]></field>
3502+ <field name="all_chars_exist"><![CDATA[
3503+flag if all characters have nonzero size
3504+ ]]></field>
3505+ <field name="font_ascent"><![CDATA[
3506+baseline to top edge of raster
3507+ ]]></field>
3508+ <field name="font_descent"><![CDATA[
3509+baseline to bottom edge of raster
3510+ ]]></field>
3511+ <!-- enum doc is sufficient -->
3512+ <field name="draw_direction" />
3513+ </doc>
3514+ </reply>
3515+ <doc>
3516+ <brief>query font metrics</brief>
3517+ <description><![CDATA[
3518+Queries information associated with the font.
3519+ ]]></description>
3520+ <field name="font"><![CDATA[
3521+The fontable (Font or Graphics Context) to query.
3522+ ]]></field>
3523+ <!-- TODO: example -->
3524+ </doc>
3525+ </request>
3526+
3527+ <request name="QueryTextExtents" opcode="48">
3528+ <exprfield type="BOOL" name="odd_length">
3529+ <op op="&amp;"><fieldref>string_len</fieldref><value>1</value></op>
3530+ </exprfield>
3531+ <field type="FONTABLE" name="font" />
3532+ <list type="CHAR2B" name="string" />
3533+ <reply>
3534+ <field type="BYTE" name="draw_direction" enum="FontDraw" />
3535+ <field type="INT16" name="font_ascent" />
3536+ <field type="INT16" name="font_descent" />
3537+ <field type="INT16" name="overall_ascent" />
3538+ <field type="INT16" name="overall_descent" />
3539+ <field type="INT32" name="overall_width" />
3540+ <field type="INT32" name="overall_left" />
3541+ <field type="INT32" name="overall_right" />
3542+ </reply>
3543+ <doc>
3544+ <brief>get text extents</brief>
3545+ <description><![CDATA[
3546+Query text extents from the X11 server. This request returns the bounding box
3547+of the specified 16-bit character string in the specified `font` or the font
3548+contained in the specified graphics context.
3549+
3550+`font_ascent` is set to the maximum of the ascent metrics of all characters in
3551+the string. `font_descent` is set to the maximum of the descent metrics.
3552+`overall_width` is set to the sum of the character-width metrics of all
3553+characters in the string. For each character in the string, let W be the sum of
3554+the character-width metrics of all characters preceding it in the string. Let L
3555+be the left-side-bearing metric of the character plus W. Let R be the
3556+right-side-bearing metric of the character plus W. The lbearing member is set
3557+to the minimum L of all characters in the string. The rbearing member is set to
3558+the maximum R.
3559+
3560+For fonts defined with linear indexing rather than 2-byte matrix indexing, each
3561+`xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the
3562+most significant byte. If the font has no defined default character, undefined
3563+characters in the string are taken to have all zero metrics.
3564+
3565+Characters with all zero metrics are ignored. If the font has no defined
3566+default_char, the undefined characters in the string are also ignored.
3567+ ]]></description>
3568+ <field name="font"><![CDATA[
3569+The `font` to calculate text extents in. You can also pass a graphics context.
3570+ ]]></field>
3571+ <field name="string_len"><![CDATA[
3572+The number of characters in `string`.
3573+ ]]></field>
3574+ <field name="string"><![CDATA[
3575+The text to get text extents for.
3576+ ]]></field>
3577+ <error type="GContext"><![CDATA[
3578+The specified graphics context does not exist.
3579+ ]]></error>
3580+ <error type="Font"><![CDATA[
3581+The specified `font` does not exist.
3582+ ]]></error>
3583+ </doc>
3584+ </request>
3585+
3586+ <struct name="STR">
3587+ <field type="CARD8" name="name_len" />
3588+ <list type="char" name="name">
3589+ <fieldref>name_len</fieldref>
3590+ </list>
3591+ </struct>
3592+
3593+ <request name="ListFonts" opcode="49">
3594+ <pad bytes="1" />
3595+ <field type="CARD16" name="max_names" />
3596+ <field type="CARD16" name="pattern_len" />
3597+ <list type="char" name="pattern">
3598+ <fieldref>pattern_len</fieldref>
3599+ </list>
3600+ <reply>
3601+ <pad bytes="1" />
3602+ <field type="CARD16" name="names_len" />
3603+ <pad bytes="22" />
3604+ <list type="STR" name="names">
3605+ <fieldref>names_len</fieldref>
3606+ </list>
3607+ <doc>
3608+ <field name="names_len"><![CDATA[
3609+The number of font names.
3610+ ]]></field>
3611+ </doc>
3612+ </reply>
3613+ <doc>
3614+ <brief>get matching font names</brief>
3615+ <description><![CDATA[
3616+Gets a list of available font names which match the given `pattern`.
3617+ ]]></description>
3618+ <field name="pattern_len"><![CDATA[
3619+The length (in bytes) of `pattern`.
3620+ ]]></field>
3621+ <field name="pattern"><![CDATA[
3622+A font pattern, for example "-misc-fixed-*".
3623+
3624+The asterisk (*) is a wildcard for any number of characters. The question mark
3625+(?) is a wildcard for a single character. Use of uppercase or lowercase does
3626+not matter.
3627+ ]]></field>
3628+ <field name="max_names"><![CDATA[
3629+The maximum number of fonts to be returned.
3630+ ]]></field>
3631+ </doc>
3632+ </request>
3633+
3634+ <request name="ListFontsWithInfo" opcode="50">
3635+ <pad bytes="1" />
3636+ <field type="CARD16" name="max_names" />
3637+ <field type="CARD16" name="pattern_len" />
3638+ <list type="char" name="pattern">
3639+ <fieldref>pattern_len</fieldref>
3640+ </list>
3641+ <reply>
3642+ <field type="CARD8" name="name_len" />
3643+ <field type="CHARINFO" name="min_bounds" />
3644+ <pad bytes="4" />
3645+ <field type="CHARINFO" name="max_bounds" />
3646+ <pad bytes="4" />
3647+ <field type="CARD16" name="min_char_or_byte2" />
3648+ <field type="CARD16" name="max_char_or_byte2" />
3649+ <field type="CARD16" name="default_char" />
3650+ <field type="CARD16" name="properties_len" />
3651+ <field type="BYTE" name="draw_direction" enum="FontDraw" />
3652+ <field type="CARD8" name="min_byte1" />
3653+ <field type="CARD8" name="max_byte1" />
3654+ <field type="BOOL" name="all_chars_exist" />
3655+ <field type="INT16" name="font_ascent" />
3656+ <field type="INT16" name="font_descent" />
3657+ <field type="CARD32" name="replies_hint" />
3658+ <list type="FONTPROP" name="properties">
3659+ <fieldref>properties_len</fieldref>
3660+ </list>
3661+ <list type="char" name="name">
3662+ <fieldref>name_len</fieldref>
3663+ </list>
3664+ <doc>
3665+ <field name="name_len"><![CDATA[
3666+The number of matched font names.
3667+ ]]></field>
3668+ <field name="min_bounds"><![CDATA[
3669+minimum bounds over all existing char
3670+ ]]></field>
3671+ <field name="max_bounds"><![CDATA[
3672+maximum bounds over all existing char
3673+ ]]></field>
3674+ <field name="min_char_or_byte2"><![CDATA[
3675+first character
3676+ ]]></field>
3677+ <field name="max_char_or_byte2"><![CDATA[
3678+last character
3679+ ]]></field>
3680+ <field name="default_char"><![CDATA[
3681+char to print for undefined character
3682+ ]]></field>
3683+ <field name="properties_len"><![CDATA[
3684+how many properties there are
3685+ ]]></field>
3686+ <field name="all_chars_exist"><![CDATA[
3687+flag if all characters have nonzero size
3688+ ]]></field>
3689+ <field name="font_ascent"><![CDATA[
3690+baseline to top edge of raster
3691+ ]]></field>
3692+ <field name="font_descent"><![CDATA[
3693+baseline to bottom edge of raster
3694+ ]]></field>
3695+ <field name="replies_hint"><![CDATA[
3696+An indication of how many more fonts will be returned. This is only a hint and
3697+may be larger or smaller than the number of fonts actually returned. A zero
3698+value does not guarantee that no more fonts will be returned.
3699+ ]]></field>
3700+ <!-- enum doc is sufficient -->
3701+ <field name="draw_direction" />
3702+ </doc>
3703+ </reply>
3704+ <doc>
3705+ <brief>get matching font names and information</brief>
3706+ <description><![CDATA[
3707+Gets a list of available font names which match the given `pattern`.
3708+ ]]></description>
3709+ <field name="pattern_len"><![CDATA[
3710+The length (in bytes) of `pattern`.
3711+ ]]></field>
3712+ <field name="pattern"><![CDATA[
3713+A font pattern, for example "-misc-fixed-*".
3714+
3715+The asterisk (*) is a wildcard for any number of characters. The question mark
3716+(?) is a wildcard for a single character. Use of uppercase or lowercase does
3717+not matter.
3718+ ]]></field>
3719+ <field name="max_names"><![CDATA[
3720+The maximum number of fonts to be returned.
3721+ ]]></field>
3722+ </doc>
3723+
3724+ </request>
3725+
3726+ <request name="SetFontPath" opcode="51">
3727+ <pad bytes="1" />
3728+ <field type="CARD16" name="font_qty" />
3729+ <pad bytes="2" />
3730+ <list type="STR" name="font">
3731+ <fieldref>font_qty</fieldref>
3732+ </list>
3733+ </request>
3734+
3735+ <request name="GetFontPath" opcode="52">
3736+ <reply>
3737+ <pad bytes="1" />
3738+ <field type="CARD16" name="path_len" />
3739+ <pad bytes="22" />
3740+ <list type="STR" name="path">
3741+ <fieldref>path_len</fieldref>
3742+ </list>
3743+ </reply>
3744+ </request>
3745+
3746+ <request name="CreatePixmap" opcode="53">
3747+ <field type="CARD8" name="depth" />
3748+ <field type="PIXMAP" name="pid" />
3749+ <field type="DRAWABLE" name="drawable" />
3750+ <field type="CARD16" name="width" />
3751+ <field type="CARD16" name="height" />
3752+ <doc>
3753+ <brief>Creates a pixmap</brief>
3754+ <description><![CDATA[
3755+Creates a pixmap. The pixmap can only be used on the same screen as `drawable`
3756+is on and only with drawables of the same `depth`.
3757+ ]]></description>
3758+ <field name="depth"><![CDATA[
3759+TODO
3760+ ]]></field>
3761+ <field name="pid"><![CDATA[
3762+The ID with which you will refer to the new pixmap, created by
3763+`xcb_generate_id`.
3764+ ]]></field>
3765+ <field name="drawable"><![CDATA[
3766+Drawable to get the screen from.
3767+ ]]></field>
3768+ <field name="width"><![CDATA[
3769+The width of the new pixmap.
3770+ ]]></field>
3771+ <field name="height"><![CDATA[
3772+The height of the new pixmap.
3773+ ]]></field>
3774+ <error type="Value"><![CDATA[
3775+TODO: reasons?
3776+ ]]></error>
3777+ <error type="Drawable"><![CDATA[
3778+The specified `drawable` (Window or Pixmap) does not exist.
3779+ ]]></error>
3780+ <error type="Alloc"><![CDATA[
3781+The X server could not allocate the requested resources (no memory?).
3782+ ]]></error>
3783+ <see type="function" name="xcb_generate_id" />
3784+ </doc>
3785+ </request>
3786+
3787+ <request name="FreePixmap" opcode="54">
3788+ <pad bytes="1" />
3789+ <field type="PIXMAP" name="pixmap" />
3790+ <doc>
3791+ <brief>Destroys a pixmap</brief>
3792+ <description><![CDATA[
3793+Deletes the association between the pixmap ID and the pixmap. The pixmap
3794+storage will be freed when there are no more references to it.
3795+ ]]></description>
3796+ <field name="pixmap"><![CDATA[The pixmap to destroy.]]></field>
3797+ <error type="Pixmap"><![CDATA[
3798+The specified pixmap does not exist.
3799+ ]]></error>
3800+ </doc>
3801+ </request>
3802+
3803+ <enum name="GC">
3804+ <item name="Function"> <bit>0</bit></item>
3805+ <item name="PlaneMask"> <bit>1</bit></item>
3806+ <item name="Foreground"> <bit>2</bit></item>
3807+ <item name="Background"> <bit>3</bit></item>
3808+ <item name="LineWidth"> <bit>4</bit></item>
3809+ <item name="LineStyle"> <bit>5</bit></item>
3810+ <item name="CapStyle"> <bit>6</bit></item>
3811+ <item name="JoinStyle"> <bit>7</bit></item>
3812+ <item name="FillStyle"> <bit>8</bit></item>
3813+ <item name="FillRule"> <bit>9</bit></item>
3814+ <item name="Tile"> <bit>10</bit></item>
3815+ <item name="Stipple"> <bit>11</bit></item>
3816+ <item name="TileStippleOriginX"><bit>12</bit></item>
3817+ <item name="TileStippleOriginY"><bit>13</bit></item>
3818+ <item name="Font"> <bit>14</bit></item>
3819+ <item name="SubwindowMode"> <bit>15</bit></item>
3820+ <item name="GraphicsExposures"> <bit>16</bit></item>
3821+ <item name="ClipOriginX"> <bit>17</bit></item>
3822+ <item name="ClipOriginY"> <bit>18</bit></item>
3823+ <item name="ClipMask"> <bit>19</bit></item>
3824+ <item name="DashOffset"> <bit>20</bit></item>
3825+ <item name="DashList"> <bit>21</bit></item>
3826+ <item name="ArcMode"> <bit>22</bit></item>
3827+ <doc>
3828+ <field name="Function"><![CDATA[
3829+TODO: Refer to GX
3830+ ]]></field>
3831+ <field name="PlaneMask"><![CDATA[
3832+In graphics operations, given a source and destination pixel, the result is
3833+computed bitwise on corresponding bits of the pixels; that is, a Boolean
3834+operation is performed in each bit plane. The plane-mask restricts the
3835+operation to a subset of planes, so the result is:
3836+
3837+ ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask))
3838+ ]]></field>
3839+ <field name="Foreground"><![CDATA[
3840+Foreground colorpixel.
3841+ ]]></field>
3842+ <field name="Background"><![CDATA[
3843+Background colorpixel.
3844+ ]]></field>
3845+ <field name="LineWidth"><![CDATA[
3846+The line-width is measured in pixels and can be greater than or equal to one, a wide line, or the
3847+special value zero, a thin line.
3848+ ]]></field>
3849+ <field name="LineStyle"><![CDATA[
3850+The line-style defines which sections of a line are drawn:
3851+Solid The full path of the line is drawn.
3852+DoubleDash The full path of the line is drawn, but the even dashes are filled differently
3853+ than the odd dashes (see fill-style), with Butt cap-style used where even and
3854+ odd dashes meet.
3855+OnOffDash Only the even dashes are drawn, and cap-style applies to all internal ends of
3856+ the individual dashes (except NotLast is treated as Butt).
3857+ ]]></field>
3858+ <field name="CapStyle"><![CDATA[
3859+The cap-style defines how the endpoints of a path are drawn:
3860+NotLast The result is equivalent to Butt, except that for a line-width of zero the final
3861+ endpoint is not drawn.
3862+Butt The result is square at the endpoint (perpendicular to the slope of the line)
3863+ with no projection beyond.
3864+Round The result is a circular arc with its diameter equal to the line-width, centered
3865+ on the endpoint; it is equivalent to Butt for line-width zero.
3866+Projecting The result is square at the end, but the path continues beyond the endpoint for
3867+ a distance equal to half the line-width; it is equivalent to Butt for line-width
3868+ zero.
3869+ ]]></field>
3870+ <field name="JoinStyle"><![CDATA[
3871+The join-style defines how corners are drawn for wide lines:
3872+Miter The outer edges of the two lines extend to meet at an angle. However, if the
3873+ angle is less than 11 degrees, a Bevel join-style is used instead.
3874+Round The result is a circular arc with a diameter equal to the line-width, centered
3875+ on the joinpoint.
3876+Bevel The result is Butt endpoint styles, and then the triangular notch is filled.
3877+ ]]></field>
3878+ <field name="FillStyle"><![CDATA[
3879+The fill-style defines the contents of the source for line, text, and fill requests. For all text and fill
3880+requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc)
3881+as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment,
3882+PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash
3883+or DoubleDash:
3884+Solid Foreground
3885+Tiled Tile
3886+OpaqueStippled A tile with the same width and height as stipple but with background
3887+ everywhere stipple has a zero and with foreground everywhere stipple
3888+ has a one
3889+Stippled Foreground masked by stipple
3890+For the odd dashes for line requests with line-style DoubleDash:
3891+Solid Background
3892+Tiled Same as for even dashes
3893+OpaqueStippled Same as for even dashes
3894+Stippled Background masked by stipple
3895+ ]]></field>
3896+ <field name="FillRule"><![CDATA[
3897+ ]]></field>
3898+ <field name="Tile"><![CDATA[
3899+The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all
3900+dimensions. When that plane is superimposed on the drawable for use in a graphics operation,
3901+the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable
3902+specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the
3903+origin of whatever destination drawable is specified in a graphics request.
3904+The tile pixmap must have the same root and depth as the gcontext (or a Match error results).
3905+The stipple pixmap must have depth one and must have the same root as the gcontext (or a
3906+Match error results). For fill-style Stippled (but not fill-style
3907+OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an
3908+additional clip mask to be ANDed with the clip-mask.
3909+Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than
3910+others.
3911+ ]]></field>
3912+ <field name="Stipple"><![CDATA[
3913+The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all
3914+dimensions. When that plane is superimposed on the drawable for use in a graphics operation,
3915+the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable
3916+specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the
3917+origin of whatever destination drawable is specified in a graphics request.
3918+The tile pixmap must have the same root and depth as the gcontext (or a Match error results).
3919+The stipple pixmap must have depth one and must have the same root as the gcontext (or a
3920+Match error results). For fill-style Stippled (but not fill-style
3921+OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an
3922+additional clip mask to be ANDed with the clip-mask.
3923+Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than
3924+others.
3925+ ]]></field>
3926+ <field name="TileStippleOriginX"><![CDATA[
3927+TODO
3928+ ]]></field>
3929+ <field name="TileStippleOriginY"><![CDATA[
3930+TODO
3931+ ]]></field>
3932+ <field name="Font"><![CDATA[
3933+Which font to use for the `ImageText8` and `ImageText16` requests.
3934+ ]]></field>
3935+ <field name="SubwindowMode"><![CDATA[
3936+For ClipByChildren, both source and destination windows are additionally
3937+clipped by all viewable InputOutput children. For IncludeInferiors, neither
3938+source nor destination window is
3939+clipped by inferiors. This will result in including subwindow contents in the source and drawing
3940+through subwindow boundaries of the destination. The use of IncludeInferiors with a source or
3941+destination window of one depth with mapped inferiors of differing depth is not illegal, but the
3942+semantics is undefined by the core protocol.
3943+ ]]></field>
3944+ <field name="GraphicsExposures"><![CDATA[
3945+Whether ExposureEvents should be generated (1) or not (0).
3946+
3947+The default is 1.
3948+ ]]></field>
3949+ <field name="ClipOriginX"><![CDATA[
3950+TODO
3951+ ]]></field>
3952+ <field name="ClipOriginY"><![CDATA[
3953+TODO
3954+ ]]></field>
3955+ <field name="ClipMask"><![CDATA[
3956+The clip-mask restricts writes to the destination drawable. Only pixels where the clip-mask has
3957+bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where
3958+the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip
3959+sources. The clip-mask origin is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. If a pixmap is specified as the clip-mask, it must have
3960+depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None,
3961+then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the
3962+SetClipRectangles request.
3963+ ]]></field>
3964+ <field name="DashOffset"><![CDATA[
3965+TODO
3966+ ]]></field>
3967+ <field name="DashList"><![CDATA[
3968+TODO
3969+ ]]></field>
3970+ <field name="ArcMode"><![CDATA[
3971+TODO
3972+ ]]></field>
3973+ </doc>
3974+
3975+ </enum>
3976+
3977+ <!-- GC Function values -->
3978+ <enum name="GX">
3979+ <item name="clear"> <value>0</value></item>
3980+ <item name="and"> <value>1</value></item>
3981+ <item name="andReverse"> <value>2</value></item>
3982+ <item name="copy"> <value>3</value></item>
3983+ <item name="andInverted"> <value>4</value></item>
3984+ <item name="noop"> <value>5</value></item>
3985+ <item name="xor"> <value>6</value></item>
3986+ <item name="or"> <value>7</value></item>
3987+ <item name="nor"> <value>8</value></item>
3988+ <item name="equiv"> <value>9</value></item>
3989+ <item name="invert"> <value>10</value></item>
3990+ <item name="orReverse"> <value>11</value></item>
3991+ <item name="copyInverted"><value>12</value></item>
3992+ <item name="orInverted"> <value>13</value></item>
3993+ <item name="nand"> <value>14</value></item>
3994+ <item name="set"> <value>15</value></item>
3995+ </enum>
3996+
3997+ <enum name="LineStyle">
3998+ <item name="Solid"> <value>0</value></item>
3999+ <item name="OnOffDash"> <value>1</value></item>
4000+ <item name="DoubleDash"><value>2</value></item>
4001+ </enum>
4002+
4003+ <enum name="CapStyle">
4004+ <item name="NotLast"> <value>0</value></item>
4005+ <item name="Butt"> <value>1</value></item>
4006+ <item name="Round"> <value>2</value></item>
4007+ <item name="Projecting"><value>3</value></item>
4008+ </enum>
4009+
4010+ <enum name="JoinStyle">
4011+ <item name="Miter"> <value>0</value></item>
4012+ <item name="Round"> <value>1</value></item>
4013+ <item name="Bevel"> <value>2</value></item>
4014+ </enum>
4015+
4016+ <enum name="FillStyle">
4017+ <item name="Solid"> <value>0</value></item>
4018+ <item name="Tiled"> <value>1</value></item>
4019+ <item name="Stippled"> <value>2</value></item>
4020+ <item name="OpaqueStippled"><value>3</value></item>
4021+ </enum>
4022+
4023+ <enum name="FillRule">
4024+ <item name="EvenOdd"><value>0</value></item>
4025+ <item name="Winding"><value>1</value></item>
4026+ </enum>
4027+
4028+ <enum name="SubwindowMode">
4029+ <item name="ClipByChildren"> <value>0</value></item>
4030+ <item name="IncludeInferiors"><value>1</value></item>
4031+ </enum>
4032+
4033+ <enum name="ArcMode">
4034+ <item name="Chord"> <value>0</value></item>
4035+ <item name="PieSlice"><value>1</value></item>
4036+ </enum>
4037+
4038+ <request name="CreateGC" opcode="55">
4039+ <pad bytes="1" />
4040+ <field type="GCONTEXT" name="cid" />
4041+ <field type="DRAWABLE" name="drawable" />
4042+ <field type="CARD32" name="value_mask" mask="GC" />
4043+ <switch name="value_list">
4044+ <fieldref>value_mask</fieldref>
4045+ <bitcase>
4046+ <enumref ref="GC">Function</enumref>
4047+ <field type="CARD32" name="function" enum="GX"/>
4048+ </bitcase>
4049+ <bitcase>
4050+ <enumref ref="GC">PlaneMask</enumref>
4051+ <field type="CARD32" name="plane_mask" />
4052+ </bitcase>
4053+ <bitcase>
4054+ <enumref ref="GC">Foreground</enumref>
4055+ <field type="CARD32" name="foreground" />
4056+ </bitcase>
4057+ <bitcase>
4058+ <enumref ref="GC">Background</enumref>
4059+ <field type="CARD32" name="background" />
4060+ </bitcase>
4061+ <bitcase>
4062+ <enumref ref="GC">LineWidth</enumref>
4063+ <field type="CARD32" name="line_width" />
4064+ </bitcase>
4065+ <bitcase>
4066+ <enumref ref="GC">LineStyle</enumref>
4067+ <field type="CARD32" name="line_style" enum="LineStyle"/>
4068+ </bitcase>
4069+ <bitcase>
4070+ <enumref ref="GC">CapStyle</enumref>
4071+ <field type="CARD32" name="cap_style" enum="CapStyle"/>
4072+ </bitcase>
4073+ <bitcase>
4074+ <enumref ref="GC">JoinStyle</enumref>
4075+ <field type="CARD32" name="join_style" enum="JoinStyle"/>
4076+ </bitcase>
4077+ <bitcase>
4078+ <enumref ref="GC">FillStyle</enumref>
4079+ <field type="CARD32" name="fill_style" enum="FillStyle"/>
4080+ </bitcase>
4081+ <bitcase>
4082+ <enumref ref="GC">FillRule</enumref>
4083+ <field type="CARD32" name="fill_rule" enum="FillRule"/>
4084+ </bitcase>
4085+ <bitcase>
4086+ <enumref ref="GC">Tile</enumref>
4087+ <field type="PIXMAP" name="tile" altenum="Pixmap"/>
4088+ </bitcase>
4089+ <bitcase>
4090+ <enumref ref="GC">Stipple</enumref>
4091+ <field type="PIXMAP" name="stipple" altenum="Pixmap"/>
4092+ </bitcase>
4093+ <bitcase>
4094+ <enumref ref="GC">TileStippleOriginX</enumref>
4095+ <field type="INT32" name="tile_stipple_x_origin" />
4096+ </bitcase>
4097+ <bitcase>
4098+ <enumref ref="GC">TileStippleOriginY</enumref>
4099+ <field type="INT32" name="tile_stipple_y_origin" />
4100+ </bitcase>
4101+ <bitcase>
4102+ <enumref ref="GC">Font</enumref>
4103+ <field type="FONT" name="font" altenum="Font"/>
4104+ </bitcase>
4105+ <bitcase>
4106+ <enumref ref="GC">SubwindowMode</enumref>
4107+ <field type="CARD32" name="subwindow_mode" enum="SubwindowMode"/>
4108+ </bitcase>
4109+ <bitcase>
4110+ <enumref ref="GC">GraphicsExposures</enumref>
4111+ <field type="BOOL32" name="graphics_exposures" />
4112+ </bitcase>
4113+ <bitcase>
4114+ <enumref ref="GC">ClipOriginX</enumref>
4115+ <field type="INT32" name="clip_x_origin" />
4116+ </bitcase>
4117+ <bitcase>
4118+ <enumref ref="GC">ClipOriginY</enumref>
4119+ <field type="INT32" name="clip_y_origin" />
4120+ </bitcase>
4121+ <bitcase>
4122+ <enumref ref="GC">ClipMask</enumref>
4123+ <field type="PIXMAP" name="clip_mask" altenum="Pixmap"/>
4124+ </bitcase>
4125+ <bitcase>
4126+ <enumref ref="GC">DashOffset</enumref>
4127+ <field type="CARD32" name="dash_offset" />
4128+ </bitcase>
4129+ <bitcase>
4130+ <enumref ref="GC">DashList</enumref>
4131+ <field type="CARD32" name="dashes" />
4132+ </bitcase>
4133+ <bitcase>
4134+ <enumref ref="GC">ArcMode</enumref>
4135+ <field type="CARD32" name="arc_mode" enum="ArcMode"/>
4136+ </bitcase>
4137+ </switch>
4138+ <doc>
4139+ <brief>Creates a graphics context</brief>
4140+ <description><![CDATA[
4141+Creates a graphics context. The graphics context can be used with any drawable
4142+that has the same root and depth as the specified drawable.
4143+ ]]></description>
4144+ <field name="cid"><![CDATA[
4145+The ID with which you will refer to the graphics context, created by
4146+`xcb_generate_id`.
4147+ ]]></field>
4148+ <field name="drawable"><![CDATA[
4149+Drawable to get the root/depth from.
4150+ ]]></field>
4151+ <error type="Drawable"><![CDATA[
4152+The specified `drawable` (Window or Pixmap) does not exist.
4153+ ]]></error>
4154+ <error type="Match"><![CDATA[
4155+TODO: reasons?
4156+ ]]></error>
4157+ <error type="Font"><![CDATA[
4158+TODO: reasons?
4159+ ]]></error>
4160+ <error type="Pixmap"><![CDATA[
4161+TODO: reasons?
4162+ ]]></error>
4163+ <error type="Value"><![CDATA[
4164+TODO: reasons?
4165+ ]]></error>
4166+ <error type="Alloc"><![CDATA[
4167+The X server could not allocate the requested resources (no memory?).
4168+ ]]></error>
4169+ <see type="function" name="xcb_generate_id" />
4170+ </doc>
4171+ </request>
4172+
4173+ <request name="ChangeGC" opcode="56">
4174+ <pad bytes="1" />
4175+ <field type="GCONTEXT" name="gc" />
4176+ <field type="CARD32" name="value_mask" mask="GC" />
4177+ <switch name="value_list">
4178+ <fieldref>value_mask</fieldref>
4179+ <bitcase>
4180+ <enumref ref="GC">Function</enumref>
4181+ <field type="CARD32" name="function" enum="GX"/>
4182+ </bitcase>
4183+ <bitcase>
4184+ <enumref ref="GC">PlaneMask</enumref>
4185+ <field type="CARD32" name="plane_mask" />
4186+ </bitcase>
4187+ <bitcase>
4188+ <enumref ref="GC">Foreground</enumref>
4189+ <field type="CARD32" name="foreground" />
4190+ </bitcase>
4191+ <bitcase>
4192+ <enumref ref="GC">Background</enumref>
4193+ <field type="CARD32" name="background" />
4194+ </bitcase>
4195+ <bitcase>
4196+ <enumref ref="GC">LineWidth</enumref>
4197+ <field type="CARD32" name="line_width" />
4198+ </bitcase>
4199+ <bitcase>
4200+ <enumref ref="GC">LineStyle</enumref>
4201+ <field type="CARD32" name="line_style" enum="LineStyle"/>
4202+ </bitcase>
4203+ <bitcase>
4204+ <enumref ref="GC">CapStyle</enumref>
4205+ <field type="CARD32" name="cap_style" enum="CapStyle"/>
4206+ </bitcase>
4207+ <bitcase>
4208+ <enumref ref="GC">JoinStyle</enumref>
4209+ <field type="CARD32" name="join_style" enum="JoinStyle"/>
4210+ </bitcase>
4211+ <bitcase>
4212+ <enumref ref="GC">FillStyle</enumref>
4213+ <field type="CARD32" name="fill_style" enum="FillStyle"/>
4214+ </bitcase>
4215+ <bitcase>
4216+ <enumref ref="GC">FillRule</enumref>
4217+ <field type="CARD32" name="fill_rule" enum="FillRule"/>
4218+ </bitcase>
4219+ <bitcase>
4220+ <enumref ref="GC">Tile</enumref>
4221+ <field type="PIXMAP" name="tile" altenum="Pixmap"/>
4222+ </bitcase>
4223+ <bitcase>
4224+ <enumref ref="GC">Stipple</enumref>
4225+ <field type="PIXMAP" name="stipple" altenum="Pixmap"/>
4226+ </bitcase>
4227+ <bitcase>
4228+ <enumref ref="GC">TileStippleOriginX</enumref>
4229+ <field type="INT32" name="tile_stipple_x_origin" />
4230+ </bitcase>
4231+ <bitcase>
4232+ <enumref ref="GC">TileStippleOriginY</enumref>
4233+ <field type="INT32" name="tile_stipple_y_origin" />
4234+ </bitcase>
4235+ <bitcase>
4236+ <enumref ref="GC">Font</enumref>
4237+ <field type="FONT" name="font" altenum="Font"/>
4238+ </bitcase>
4239+ <bitcase>
4240+ <enumref ref="GC">SubwindowMode</enumref>
4241+ <field type="CARD32" name="subwindow_mode" enum="SubwindowMode"/>
4242+ </bitcase>
4243+ <bitcase>
4244+ <enumref ref="GC">GraphicsExposures</enumref>
4245+ <field type="BOOL32" name="graphics_exposures" />
4246+ </bitcase>
4247+ <bitcase>
4248+ <enumref ref="GC">ClipOriginX</enumref>
4249+ <field type="INT32" name="clip_x_origin" />
4250+ </bitcase>
4251+ <bitcase>
4252+ <enumref ref="GC">ClipOriginY</enumref>
4253+ <field type="INT32" name="clip_y_origin" />
4254+ </bitcase>
4255+ <bitcase>
4256+ <enumref ref="GC">ClipMask</enumref>
4257+ <field type="PIXMAP" name="clip_mask" altenum="Pixmap"/>
4258+ </bitcase>
4259+ <bitcase>
4260+ <enumref ref="GC">DashOffset</enumref>
4261+ <field type="CARD32" name="dash_offset" />
4262+ </bitcase>
4263+ <bitcase>
4264+ <enumref ref="GC">DashList</enumref>
4265+ <field type="CARD32" name="dashes" />
4266+ </bitcase>
4267+ <bitcase>
4268+ <enumref ref="GC">ArcMode</enumref>
4269+ <field type="CARD32" name="arc_mode" enum="ArcMode"/>
4270+ </bitcase>
4271+ </switch>
4272+ <doc>
4273+ <brief>change graphics context components</brief>
4274+ <description><![CDATA[
4275+Changes the components specified by `value_mask` for the specified graphics context.
4276+ ]]></description>
4277+ <example><![CDATA[
4278+/*
4279+ * Changes the foreground color component of the specified graphics context.
4280+ *
4281+ */
4282+void my_example(xcb_connection_t *conn, xcb_gcontext_t gc, uint32_t fg, uint32_t bg) {
4283+ /* C99 allows us to use a compact way of changing a single component: */
4284+ xcb_change_gc(conn, gc, XCB_GC_FOREGROUND, (uint32_t[]){ fg });
4285+
4286+ /* The more explicit way. Beware that the order of values is important! */
4287+ uint32_t mask = 0;
4288+ mask |= XCB_GC_FOREGROUND;
4289+ mask |= XCB_GC_BACKGROUND;
4290+
4291+ uint32_t values[] = {
4292+ fg,
4293+ bg
4294+ };
4295+ xcb_change_gc(conn, gc, mask, values);
4296+ xcb_flush(conn);
4297+}
4298+ ]]></example>
4299+ <field name="gc"><![CDATA[
4300+The graphics context to change.
4301+ ]]></field>
4302+ <!-- the enum documentation is good enough. -->
4303+ <field name="value_mask" />
4304+ <field name="value_list"><![CDATA[
4305+Values for each of the components specified in the bitmask `value_mask`. The
4306+order has to correspond to the order of possible `value_mask` bits. See the
4307+example.
4308+ ]]></field>
4309+ <error type="Font"><![CDATA[
4310+TODO: reasons?
4311+ ]]></error>
4312+ <error type="GContext"><![CDATA[
4313+TODO: reasons?
4314+ ]]></error>
4315+ <error type="Match"><![CDATA[
4316+TODO: reasons?
4317+ ]]></error>
4318+ <error type="Pixmap"><![CDATA[
4319+TODO: reasons?
4320+ ]]></error>
4321+ <error type="Value"><![CDATA[
4322+TODO: reasons?
4323+ ]]></error>
4324+ <error type="Alloc"><![CDATA[
4325+The X server could not allocate the requested resources (no memory?).
4326+ ]]></error>
4327+ </doc>
4328+ </request>
4329+
4330+ <request name="CopyGC" opcode="57">
4331+ <pad bytes="1" />
4332+ <field type="GCONTEXT" name="src_gc" />
4333+ <field type="GCONTEXT" name="dst_gc" />
4334+ <field type="CARD32" name="value_mask" mask="GC" />
4335+ </request>
4336+
4337+ <request name="SetDashes" opcode="58">
4338+ <pad bytes="1" />
4339+ <field type="GCONTEXT" name="gc" />
4340+ <field type="CARD16" name="dash_offset" />
4341+ <field type="CARD16" name="dashes_len" />
4342+ <list type="CARD8" name="dashes">
4343+ <fieldref>dashes_len</fieldref>
4344+ </list>
4345+ </request>
4346+
4347+ <enum name="ClipOrdering">
4348+ <item name="Unsorted"><value>0</value></item>
4349+ <item name="YSorted"> <value>1</value></item>
4350+ <item name="YXSorted"><value>2</value></item>
4351+ <item name="YXBanded"><value>3</value></item>
4352+ </enum>
4353+
4354+ <request name="SetClipRectangles" opcode="59">
4355+ <field type="BYTE" name="ordering" enum="ClipOrdering" />
4356+ <field type="GCONTEXT" name="gc" />
4357+ <field type="INT16" name="clip_x_origin" />
4358+ <field type="INT16" name="clip_y_origin" />
4359+ <list type="RECTANGLE" name="rectangles" />
4360+ </request>
4361+
4362+ <request name="FreeGC" opcode="60">
4363+ <pad bytes="1" />
4364+ <field type="GCONTEXT" name="gc" />
4365+ <doc>
4366+ <brief>Destroys a graphics context</brief>
4367+ <description><![CDATA[
4368+Destroys the specified `gc` and all associated storage.
4369+ ]]></description>
4370+ <field name="gc"><![CDATA[The graphics context to destroy.]]></field>
4371+ <error type="GContext"><![CDATA[
4372+The specified graphics context does not exist.
4373+ ]]></error>
4374+ </doc>
4375+ </request>
4376+
4377+ <request name="ClearArea" opcode="61">
4378+ <field type="BOOL" name="exposures" />
4379+ <field type="WINDOW" name="window" />
4380+ <field type="INT16" name="x" />
4381+ <field type="INT16" name="y" />
4382+ <field type="CARD16" name="width" />
4383+ <field type="CARD16" name="height" />
4384+ </request>
4385+
4386+ <request name="CopyArea" opcode="62">
4387+ <pad bytes="1" />
4388+ <field type="DRAWABLE" name="src_drawable" />
4389+ <field type="DRAWABLE" name="dst_drawable" />
4390+ <field type="GCONTEXT" name="gc" />
4391+ <field type="INT16" name="src_x" />
4392+ <field type="INT16" name="src_y" />
4393+ <field type="INT16" name="dst_x" />
4394+ <field type="INT16" name="dst_y" />
4395+ <field type="CARD16" name="width" />
4396+ <field type="CARD16" name="height" />
4397+ <doc>
4398+ <brief>copy areas</brief>
4399+ <description><![CDATA[
4400+Copies the specified rectangle from `src_drawable` to `dst_drawable`.
4401+ ]]></description>
4402+ <field name="dst_drawable"><![CDATA[
4403+The destination drawable (Window or Pixmap).
4404+ ]]></field>
4405+ <field name="src_drawable"><![CDATA[
4406+The source drawable (Window or Pixmap).
4407+ ]]></field>
4408+ <field name="gc"><![CDATA[
4409+The graphics context to use.
4410+ ]]></field>
4411+ <field name="src_x"><![CDATA[
4412+The source X coordinate.
4413+ ]]></field>
4414+ <field name="src_y"><![CDATA[
4415+The source Y coordinate.
4416+ ]]></field>
4417+ <field name="dst_x"><![CDATA[
4418+The destination X coordinate.
4419+ ]]></field>
4420+ <field name="dst_y"><![CDATA[
4421+The destination Y coordinate.
4422+ ]]></field>
4423+ <field name="width"><![CDATA[
4424+The width of the area to copy (in pixels).
4425+ ]]></field>
4426+ <field name="height"><![CDATA[
4427+The height of the area to copy (in pixels).
4428+ ]]></field>
4429+ <error type="Drawable"><![CDATA[
4430+The specified `drawable` (Window or Pixmap) does not exist.
4431+ ]]></error>
4432+ <error type="GContext"><![CDATA[
4433+The specified graphics context does not exist.
4434+ ]]></error>
4435+ <error type="Match"><![CDATA[
4436+`src_drawable` has a different root or depth than `dst_drawable`.
4437+ ]]></error>
4438+ </doc>
4439+ </request>
4440+
4441+ <request name="CopyPlane" opcode="63">
4442+ <pad bytes="1" />
4443+ <field type="DRAWABLE" name="src_drawable" />
4444+ <field type="DRAWABLE" name="dst_drawable" />
4445+ <field type="GCONTEXT" name="gc" />
4446+ <field type="INT16" name="src_x" />
4447+ <field type="INT16" name="src_y" />
4448+ <field type="INT16" name="dst_x" />
4449+ <field type="INT16" name="dst_y" />
4450+ <field type="CARD16" name="width" />
4451+ <field type="CARD16" name="height" />
4452+ <field type="CARD32" name="bit_plane" />
4453+ </request>
4454+
4455+ <enum name="CoordMode">
4456+ <item name="Origin"> <value>0</value></item>
4457+ <item name="Previous"><value>1</value></item>
4458+ <doc>
4459+ <field name="Origin"><![CDATA[
4460+Treats all coordinates as relative to the origin.
4461+ ]]></field>
4462+ <field name="Previous"><![CDATA[
4463+Treats all coordinates after the first as relative to the previous coordinate.
4464+ ]]></field>
4465+ </doc>
4466+ </enum>
4467+
4468+ <!-- combine-adjacent doesn't work for mode==Relative -->
4469+ <request name="PolyPoint" opcode="64">
4470+ <field type="BYTE" name="coordinate_mode" enum="CoordMode" />
4471+ <field type="DRAWABLE" name="drawable" />
4472+ <field type="GCONTEXT" name="gc" />
4473+ <list type="POINT" name="points" />
4474+ </request>
4475+
4476+ <request name="PolyLine" opcode="65" combine-adjacent="true">
4477+ <field type="BYTE" name="coordinate_mode" enum="CoordMode" />
4478+ <field type="DRAWABLE" name="drawable" />
4479+ <field type="GCONTEXT" name="gc" />
4480+ <list type="POINT" name="points" />
4481+ <doc>
4482+ <brief>draw lines</brief>
4483+ <description><![CDATA[
4484+Draws `points_len`-1 lines between each pair of points (point[i], point[i+1])
4485+in the `points` array. The lines are drawn in the order listed in the array.
4486+They join correctly at all intermediate points, and if the first and last
4487+points coincide, the first and last lines also join correctly. For any given
4488+line, a pixel is not drawn more than once. If thin (zero line-width) lines
4489+intersect, the intersecting pixels are drawn multiple times. If wide lines
4490+intersect, the intersecting pixels are drawn only once, as though the entire
4491+request were a single, filled shape.
4492+ ]]></description>
4493+ <example><![CDATA[
4494+/*
4495+ * Draw a straight line.
4496+ *
4497+ */
4498+void my_example(xcb_connection_t *conn, xcb_drawable_t drawable, xcb_gcontext_t gc) {
4499+ xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, drawable, gc, 2,
4500+ (xcb_point_t[]) { {10, 10}, {100, 10} });
4501+ xcb_flush(conn);
4502+}
4503+ ]]></example>
4504+ <field name="drawable"><![CDATA[
4505+The drawable to draw the line(s) on.
4506+ ]]></field>
4507+ <field name="gc"><![CDATA[
4508+The graphics context to use.
4509+ ]]></field>
4510+ <field name="points_len"><![CDATA[
4511+The number of `xcb_point_t` structures in `points`.
4512+ ]]></field>
4513+ <field name="points"><![CDATA[
4514+An array of points.
4515+ ]]></field>
4516+ <!-- the enum doc is sufficient. -->
4517+ <field name="coordinate_mode" />
4518+ <error type="Drawable"><![CDATA[
4519+TODO: reasons?
4520+ ]]></error>
4521+ <error type="GContext"><![CDATA[
4522+TODO: reasons?
4523+ ]]></error>
4524+ <error type="Match"><![CDATA[
4525+TODO: reasons?
4526+ ]]></error>
4527+ <error type="Value"><![CDATA[
4528+TODO: reasons?
4529+ ]]></error>
4530+ </doc>
4531+ </request>
4532+
4533+ <struct name="SEGMENT">
4534+ <field type="INT16" name="x1" />
4535+ <field type="INT16" name="y1" />
4536+ <field type="INT16" name="x2" />
4537+ <field type="INT16" name="y2" />
4538+ </struct>
4539+
4540+ <request name="PolySegment" opcode="66" combine-adjacent="true">
4541+ <pad bytes="1" />
4542+ <field type="DRAWABLE" name="drawable" />
4543+ <field type="GCONTEXT" name="gc" />
4544+ <list type="SEGMENT" name="segments" />
4545+ <doc>
4546+ <brief>draw lines</brief>
4547+ <description><![CDATA[
4548+Draws multiple, unconnected lines. For each segment, a line is drawn between
4549+(x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of
4550+`xcb_segment_t` structures and does not perform joining at coincident
4551+endpoints. For any given line, a pixel is not drawn more than once. If lines
4552+intersect, the intersecting pixels are drawn multiple times.
4553+
4554+TODO: include the xcb_segment_t data structure
4555+
4556+TODO: an example
4557+ ]]></description>
4558+ <field name="drawable"><![CDATA[
4559+A drawable (Window or Pixmap) to draw on.
4560+ ]]></field>
4561+ <field name="gc"><![CDATA[
4562+The graphics context to use.
4563+
4564+TODO: document which attributes of a gc are used
4565+ ]]></field>
4566+ <field name="segments_len"><![CDATA[
4567+The number of `xcb_segment_t` structures in `segments`.
4568+ ]]></field>
4569+ <field name="segments"><![CDATA[
4570+An array of `xcb_segment_t` structures.
4571+ ]]></field>
4572+ <error type="Drawable"><![CDATA[
4573+The specified `drawable` does not exist.
4574+ ]]></error>
4575+ <error type="GContext"><![CDATA[
4576+The specified `gc` does not exist.
4577+ ]]></error>
4578+ <error type="Match"><![CDATA[
4579+TODO: reasons?
4580+ ]]></error>
4581+ </doc>
4582+ </request>
4583+
4584+ <request name="PolyRectangle" opcode="67" combine-adjacent="true">
4585+ <pad bytes="1" />
4586+ <field type="DRAWABLE" name="drawable" />
4587+ <field type="GCONTEXT" name="gc" />
4588+ <list type="RECTANGLE" name="rectangles" />
4589+ </request>
4590+
4591+ <!--
4592+ The semantics of PolyArc change after the first arc: the GC's
4593+ join style may be applied to successive arcs under some circumstances.
4594+ So using combine-adjacent here is bad.
4595+ -->
4596+ <request name="PolyArc" opcode="68">
4597+ <pad bytes="1" />
4598+ <field type="DRAWABLE" name="drawable" />
4599+ <field type="GCONTEXT" name="gc" />
4600+ <list type="ARC" name="arcs" />
4601+ </request>
4602+
4603+ <enum name="PolyShape">
4604+ <item name="Complex"> <value>0</value></item>
4605+ <item name="Nonconvex"><value>1</value></item>
4606+ <item name="Convex"> <value>2</value></item>
4607+ </enum>
4608+
4609+ <request name="FillPoly" opcode="69">
4610+ <pad bytes="1" />
4611+ <field type="DRAWABLE" name="drawable" />
4612+ <field type="GCONTEXT" name="gc" />
4613+ <field type="CARD8" name="shape" enum="PolyShape" />
4614+ <field type="CARD8" name="coordinate_mode" enum="CoordMode" />
4615+ <pad bytes="2" />
4616+ <list type="POINT" name="points" />
4617+ </request>
4618+
4619+ <request name="PolyFillRectangle" opcode="70" combine-adjacent="true">
4620+ <pad bytes="1" />
4621+ <field type="DRAWABLE" name="drawable" />
4622+ <field type="GCONTEXT" name="gc" />
4623+ <list type="RECTANGLE" name="rectangles" />
4624+ <doc>
4625+ <brief>Fills rectangles</brief>
4626+ <description><![CDATA[
4627+Fills the specified rectangle(s) in the order listed in the array. For any
4628+given rectangle, each pixel is not drawn more than once. If rectangles
4629+intersect, the intersecting pixels are drawn multiple times.
4630+ ]]></description>
4631+ <field name="drawable"><![CDATA[
4632+The drawable (Window or Pixmap) to draw on.
4633+ ]]></field>
4634+ <field name="gc"><![CDATA[
4635+The graphics context to use.
4636+
4637+The following graphics context components are used: function, plane-mask,
4638+fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
4639+
4640+The following graphics context mode-dependent components are used:
4641+foreground, background, tile, stipple, tile-stipple-x-origin, and
4642+tile-stipple-y-origin.
4643+ ]]></field>
4644+ <field name="rectangles_len"><![CDATA[
4645+The number of `xcb_rectangle_t` structures in `rectangles`.
4646+ ]]></field>
4647+ <field name="rectangles"><![CDATA[
4648+The rectangles to fill.
4649+ ]]></field>
4650+ <error type="Drawable"><![CDATA[
4651+The specified `drawable` (Window or Pixmap) does not exist.
4652+ ]]></error>
4653+ <error type="GContext"><![CDATA[
4654+The specified graphics context does not exist.
4655+ ]]></error>
4656+ <error type="Match"><![CDATA[
4657+TODO: reasons?
4658+ ]]></error>
4659+ </doc>
4660+ </request>
4661+
4662+ <request name="PolyFillArc" opcode="71" combine-adjacent="true">
4663+ <pad bytes="1" />
4664+ <field type="DRAWABLE" name="drawable" />
4665+ <field type="GCONTEXT" name="gc" />
4666+ <list type="ARC" name="arcs" />
4667+ </request>
4668+
4669+ <enum name="ImageFormat">
4670+ <item name="XYBitmap"><value>0</value></item>
4671+ <item name="XYPixmap"><value>1</value></item>
4672+ <item name="ZPixmap"> <value>2</value></item>
4673+ </enum>
4674+
4675+ <request name="PutImage" opcode="72">
4676+ <field type="CARD8" name="format" enum="ImageFormat" />
4677+ <field type="DRAWABLE" name="drawable" />
4678+ <field type="GCONTEXT" name="gc" />
4679+ <field type="CARD16" name="width" />
4680+ <field type="CARD16" name="height" />
4681+ <field type="INT16" name="dst_x" />
4682+ <field type="INT16" name="dst_y" />
4683+ <field type="CARD8" name="left_pad" />
4684+ <field type="CARD8" name="depth" />
4685+ <pad bytes="2" />
4686+ <list type="BYTE" name="data" />
4687+ </request>
4688+
4689+ <!-- FIXME: data array in reply will include padding, but ought not to. -->
4690+ <request name="GetImage" opcode="73">
4691+ <field type="CARD8" name="format" enum="ImageFormat" />
4692+ <field type="DRAWABLE" name="drawable" />
4693+ <field type="INT16" name="x" />
4694+ <field type="INT16" name="y" />
4695+ <field type="CARD16" name="width" />
4696+ <field type="CARD16" name="height" />
4697+ <field type="CARD32" name="plane_mask" />
4698+ <reply>
4699+ <field type="CARD8" name="depth" />
4700+ <field type="VISUALID" name="visual" />
4701+ <pad bytes="20" />
4702+ <list type="BYTE" name="data">
4703+ <op op="*">
4704+ <fieldref>length</fieldref>
4705+ <value>4</value>
4706+ </op>
4707+ </list>
4708+ </reply>
4709+ </request>
4710+
4711+ <request name="PolyText8" opcode="74">
4712+ <pad bytes="1" />
4713+ <field type="DRAWABLE" name="drawable" />
4714+ <field type="GCONTEXT" name="gc" />
4715+ <field type="INT16" name="x" />
4716+ <field type="INT16" name="y" />
4717+ <list type="BYTE" name="items" />
4718+ </request>
4719+
4720+ <request name="PolyText16" opcode="75">
4721+ <pad bytes="1" />
4722+ <field type="DRAWABLE" name="drawable" />
4723+ <field type="GCONTEXT" name="gc" />
4724+ <field type="INT16" name="x" />
4725+ <field type="INT16" name="y" />
4726+ <list type="BYTE" name="items" />
4727+ </request>
4728+
4729+ <request name="ImageText8" opcode="76">
4730+ <field type="BYTE" name="string_len" />
4731+ <field type="DRAWABLE" name="drawable" />
4732+ <field type="GCONTEXT" name="gc" />
4733+ <field type="INT16" name="x" />
4734+ <field type="INT16" name="y" />
4735+ <list type="char" name="string">
4736+ <fieldref>string_len</fieldref>
4737+ </list>
4738+ <doc>
4739+ <brief>Draws text</brief>
4740+ <description><![CDATA[
4741+Fills the destination rectangle with the background pixel from `gc`, then
4742+paints the text with the foreground pixel from `gc`. The upper-left corner of
4743+the filled rectangle is at [x, y - font-ascent]. The width is overall-width,
4744+the height is font-ascent + font-descent. The overall-width, font-ascent and
4745+font-descent are as returned by `xcb_query_text_extents` (TODO).
4746+
4747+Note that using X core fonts is deprecated (but still supported) in favor of
4748+client-side rendering using Xft.
4749+ ]]></description>
4750+ <field name="drawable"><![CDATA[
4751+The drawable (Window or Pixmap) to draw text on.
4752+ ]]></field>
4753+ <field name="string_len"><![CDATA[
4754+The length of the `string`. Note that this parameter limited by 255 due to
4755+using 8 bits!
4756+ ]]></field>
4757+ <field name="string"><![CDATA[
4758+The string to draw. Only the first 255 characters are relevant due to the data
4759+type of `string_len`.
4760+ ]]></field>
4761+ <field name="x"><![CDATA[
4762+The x coordinate of the first character, relative to the origin of `drawable`.
4763+ ]]></field>
4764+ <field name="y"><![CDATA[
4765+The y coordinate of the first character, relative to the origin of `drawable`.
4766+ ]]></field>
4767+ <field name="gc"><![CDATA[
4768+The graphics context to use.
4769+
4770+The following graphics context components are used: plane-mask, foreground,
4771+background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
4772+ ]]></field>
4773+ <error type="Drawable"><![CDATA[
4774+The specified `drawable` (Window or Pixmap) does not exist.
4775+ ]]></error>
4776+ <error type="GContext"><![CDATA[
4777+The specified graphics context does not exist.
4778+ ]]></error>
4779+ <error type="Match"><![CDATA[
4780+TODO: reasons?
4781+ ]]></error>
4782+ <see type="request" name="ImageText16" />
4783+ </doc>
4784+ </request>
4785+
4786+ <request name="ImageText16" opcode="77">
4787+ <field type="BYTE" name="string_len" />
4788+ <field type="DRAWABLE" name="drawable" />
4789+ <field type="GCONTEXT" name="gc" />
4790+ <field type="INT16" name="x" />
4791+ <field type="INT16" name="y" />
4792+ <list type="CHAR2B" name="string">
4793+ <fieldref>string_len</fieldref>
4794+ </list>
4795+ <doc>
4796+ <brief>Draws text</brief>
4797+ <description><![CDATA[
4798+Fills the destination rectangle with the background pixel from `gc`, then
4799+paints the text with the foreground pixel from `gc`. The upper-left corner of
4800+the filled rectangle is at [x, y - font-ascent]. The width is overall-width,
4801+the height is font-ascent + font-descent. The overall-width, font-ascent and
4802+font-descent are as returned by `xcb_query_text_extents` (TODO).
4803+
4804+Note that using X core fonts is deprecated (but still supported) in favor of
4805+client-side rendering using Xft.
4806+ ]]></description>
4807+ <field name="drawable"><![CDATA[
4808+The drawable (Window or Pixmap) to draw text on.
4809+ ]]></field>
4810+ <field name="string_len"><![CDATA[
4811+The length of the `string` in characters. Note that this parameter limited by
4812+255 due to using 8 bits!
4813+ ]]></field>
4814+ <field name="string"><![CDATA[
4815+The string to draw. Only the first 255 characters are relevant due to the data
4816+type of `string_len`. Every character uses 2 bytes (hence the 16 in this
4817+request's name).
4818+ ]]></field>
4819+ <field name="x"><![CDATA[
4820+The x coordinate of the first character, relative to the origin of `drawable`.
4821+ ]]></field>
4822+ <field name="y"><![CDATA[
4823+The y coordinate of the first character, relative to the origin of `drawable`.
4824+ ]]></field>
4825+ <field name="gc"><![CDATA[
4826+The graphics context to use.
4827+
4828+The following graphics context components are used: plane-mask, foreground,
4829+background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
4830+ ]]></field>
4831+ <error type="Drawable"><![CDATA[
4832+The specified `drawable` (Window or Pixmap) does not exist.
4833+ ]]></error>
4834+ <error type="GContext"><![CDATA[
4835+The specified graphics context does not exist.
4836+ ]]></error>
4837+ <error type="Match"><![CDATA[
4838+TODO: reasons?
4839+ ]]></error>
4840+ <see type="request" name="ImageText8" />
4841+ </doc>
4842+ </request>
4843+
4844+ <enum name= "ColormapAlloc">
4845+ <item name="None"><value>0</value></item>
4846+ <item name="All"> <value>1</value></item>
4847+ </enum>
4848+
4849+ <request name="CreateColormap" opcode="78">
4850+ <field type="BYTE" name="alloc" enum="ColormapAlloc" />
4851+ <field type="COLORMAP" name="mid" />
4852+ <field type="WINDOW" name="window" />
4853+ <field type="VISUALID" name="visual" />
4854+ </request>
4855+
4856+ <request name="FreeColormap" opcode="79">
4857+ <pad bytes="1" />
4858+ <field type="COLORMAP" name="cmap" />
4859+ </request>
4860+
4861+ <request name="CopyColormapAndFree" opcode="80">
4862+ <pad bytes="1" />
4863+ <field type="COLORMAP" name="mid" />
4864+ <field type="COLORMAP" name="src_cmap" />
4865+ </request>
4866+
4867+ <request name="InstallColormap" opcode="81">
4868+ <pad bytes="1" />
4869+ <field type="COLORMAP" name="cmap" />
4870+ </request>
4871+
4872+ <request name="UninstallColormap" opcode="82">
4873+ <pad bytes="1" />
4874+ <field type="COLORMAP" name="cmap" />
4875+ </request>
4876+
4877+ <request name="ListInstalledColormaps" opcode="83">
4878+ <pad bytes="1" />
4879+ <field type="WINDOW" name="window" />
4880+ <reply>
4881+ <pad bytes="1" />
4882+ <field type="CARD16" name="cmaps_len" />
4883+ <pad bytes="22" />
4884+ <list type="COLORMAP" name="cmaps">
4885+ <fieldref>cmaps_len</fieldref>
4886+ </list>
4887+ </reply>
4888+ </request>
4889+
4890+ <request name="AllocColor" opcode="84">
4891+ <pad bytes="1" />
4892+ <field type="COLORMAP" name="cmap" />
4893+ <field type="CARD16" name="red" />
4894+ <field type="CARD16" name="green" />
4895+ <field type="CARD16" name="blue" />
4896+ <pad bytes="2" />
4897+ <reply>
4898+ <pad bytes="1" />
4899+ <field type="CARD16" name="red" />
4900+ <field type="CARD16" name="green" />
4901+ <field type="CARD16" name="blue" />
4902+ <pad bytes="2" />
4903+ <field type="CARD32" name="pixel" />
4904+ </reply>
4905+ <doc>
4906+ <brief>Allocate a color</brief>
4907+ <description><![CDATA[
4908+Allocates a read-only colormap entry corresponding to the closest RGB value
4909+supported by the hardware. If you are using TrueColor, you can take a shortcut
4910+and directly calculate the color pixel value to avoid the round trip. But, for
4911+example, on 16-bit color setups (VNC), you can easily get the closest supported
4912+RGB value to the RGB value you are specifying.
4913+ ]]></description>
4914+ <field name="cmap"><![CDATA[
4915+TODO
4916+ ]]></field>
4917+ <field name="red"><![CDATA[
4918+The red value of your color.
4919+ ]]></field>
4920+ <field name="green"><![CDATA[
4921+The green value of your color.
4922+ ]]></field>
4923+ <field name="blue"><![CDATA[
4924+The blue value of your color.
4925+ ]]></field>
4926+ <error type="Colormap"><![CDATA[
4927+The specified colormap `cmap` does not exist.
4928+ ]]></error>
4929+ </doc>
4930+ </request>
4931+
4932+ <request name="AllocNamedColor" opcode="85">
4933+ <pad bytes="1" />
4934+ <field type="COLORMAP" name="cmap" />
4935+ <field type="CARD16" name="name_len" />
4936+ <pad bytes="2" />
4937+ <list type="char" name="name">
4938+ <fieldref>name_len</fieldref>
4939+ </list>
4940+ <reply>
4941+ <pad bytes="1" />
4942+ <field type="CARD32" name="pixel" />
4943+ <field type="CARD16" name="exact_red" />
4944+ <field type="CARD16" name="exact_green" />
4945+ <field type="CARD16" name="exact_blue" />
4946+ <field type="CARD16" name="visual_red" />
4947+ <field type="CARD16" name="visual_green" />
4948+ <field type="CARD16" name="visual_blue" />
4949+ </reply>
4950+ </request>
4951+
4952+ <request name="AllocColorCells" opcode="86">
4953+ <field type="BOOL" name="contiguous" />
4954+ <field type="COLORMAP" name="cmap" />
4955+ <field type="CARD16" name="colors" />
4956+ <field type="CARD16" name="planes" />
4957+ <reply>
4958+ <pad bytes="1" />
4959+ <field type="CARD16" name="pixels_len" />
4960+ <field type="CARD16" name="masks_len" />
4961+ <pad bytes="20" />
4962+ <list type="CARD32" name="pixels">
4963+ <fieldref>pixels_len</fieldref>
4964+ </list>
4965+ <list type="CARD32" name="masks">
4966+ <fieldref>masks_len</fieldref>
4967+ </list>
4968+ </reply>
4969+ </request>
4970+
4971+ <request name="AllocColorPlanes" opcode="87">
4972+ <field type="BOOL" name="contiguous" />
4973+ <field type="COLORMAP" name="cmap" />
4974+ <field type="CARD16" name="colors" />
4975+ <field type="CARD16" name="reds" />
4976+ <field type="CARD16" name="greens" />
4977+ <field type="CARD16" name="blues" />
4978+ <reply>
4979+ <pad bytes="1" />
4980+ <field type="CARD16" name="pixels_len" />
4981+ <pad bytes="2" />
4982+ <field type="CARD32" name="red_mask" />
4983+ <field type="CARD32" name="green_mask" />
4984+ <field type="CARD32" name="blue_mask" />
4985+ <pad bytes="8" />
4986+ <list type="CARD32" name="pixels">
4987+ <fieldref>pixels_len</fieldref>
4988+ </list>
4989+ </reply>
4990+ </request>
4991+
4992+ <request name="FreeColors" opcode="88">
4993+ <pad bytes="1" />
4994+ <field type="COLORMAP" name="cmap" />
4995+ <field type="CARD32" name="plane_mask" />
4996+ <list type="CARD32" name="pixels" />
4997+ </request>
4998+
4999+ <enum name="ColorFlag">
5000+ <item name="Red"> <bit>0</bit></item>
5001+ <item name="Green"><bit>1</bit></item>
5002+ <item name="Blue"> <bit>2</bit></item>
5003+ </enum>
5004+
5005+ <struct name="COLORITEM">
5006+ <field type="CARD32" name="pixel" />
5007+ <field type="CARD16" name="red" />
5008+ <field type="CARD16" name="green" />
5009+ <field type="CARD16" name="blue" />
5010+ <field type="BYTE" name="flags" mask="ColorFlag" />
5011+ <pad bytes="1" />
5012+ </struct>
5013+
5014+ <request name="StoreColors" opcode="89" combine-adjacent="true">
5015+ <pad bytes="1" />
5016+ <field type="COLORMAP" name="cmap" />
5017+ <list type="COLORITEM" name="items" />
5018+ </request>
5019+
5020+ <request name="StoreNamedColor" opcode="90">
5021+ <field type="CARD8" name="flags" mask="ColorFlag" />
5022+ <field type="COLORMAP" name="cmap" />
5023+ <field type="CARD32" name="pixel" />
5024+ <field type="CARD16" name="name_len" />
5025+ <pad bytes="2" />
5026+ <list type="char" name="name">
5027+ <fieldref>name_len</fieldref>
5028+ </list>
5029+ </request>
5030+
5031+ <struct name="RGB">
5032+ <field type="CARD16" name="red" />
5033+ <field type="CARD16" name="green" />
5034+ <field type="CARD16" name="blue" />
5035+ <pad bytes="2" />
5036+ </struct>
5037+
5038+ <request name="QueryColors" opcode="91">
5039+ <pad bytes="1" />
5040+ <field type="COLORMAP" name="cmap" />
5041+ <list type="CARD32" name="pixels" />
5042+ <reply>
5043+ <pad bytes="1" />
5044+ <field type="CARD16" name="colors_len" />
5045+ <pad bytes="22" />
5046+ <list type="RGB" name="colors">
5047+ <fieldref>colors_len</fieldref>
5048+ </list>
5049+ </reply>
5050+ </request>
5051+
5052+ <request name="LookupColor" opcode="92">
5053+ <pad bytes="1" />
5054+ <field type="COLORMAP" name="cmap" />
5055+ <field type="CARD16" name="name_len" />
5056+ <pad bytes="2" />
5057+ <list type="char" name="name">
5058+ <fieldref>name_len</fieldref>
5059+ </list>
5060+ <reply>
5061+ <pad bytes="1" />
5062+ <field type="CARD16" name="exact_red" />
5063+ <field type="CARD16" name="exact_green" />
5064+ <field type="CARD16" name="exact_blue" />
5065+ <field type="CARD16" name="visual_red" />
5066+ <field type="CARD16" name="visual_green" />
5067+ <field type="CARD16" name="visual_blue" />
5068+ </reply>
5069+ </request>
5070+
5071+ <enum name="Pixmap">
5072+ <item name="None"> <value>0</value></item>
5073+ </enum>
5074+
5075+ <request name="CreateCursor" opcode="93">
5076+ <pad bytes="1" />
5077+ <field type="CURSOR" name="cid" />
5078+ <field type="PIXMAP" name="source" />
5079+ <field type="PIXMAP" name="mask" altenum="Pixmap" />
5080+ <field type="CARD16" name="fore_red" />
5081+ <field type="CARD16" name="fore_green" />
5082+ <field type="CARD16" name="fore_blue" />
5083+ <field type="CARD16" name="back_red" />
5084+ <field type="CARD16" name="back_green" />
5085+ <field type="CARD16" name="back_blue" />
5086+ <field type="CARD16" name="x" />
5087+ <field type="CARD16" name="y" />
5088+ </request>
5089+
5090+ <enum name="Font">
5091+ <item name="None"> <value>0</value></item>
5092+ </enum>
5093+
5094+ <request name="CreateGlyphCursor" opcode="94">
5095+ <pad bytes="1" />
5096+ <field type="CURSOR" name="cid" />
5097+ <field type="FONT" name="source_font" />
5098+ <field type="FONT" name="mask_font" altenum="Font" />
5099+ <field type="CARD16" name="source_char" />
5100+ <field type="CARD16" name="mask_char" />
5101+ <field type="CARD16" name="fore_red" />
5102+ <field type="CARD16" name="fore_green" />
5103+ <field type="CARD16" name="fore_blue" />
5104+ <field type="CARD16" name="back_red" />
5105+ <field type="CARD16" name="back_green" />
5106+ <field type="CARD16" name="back_blue" />
5107+ <doc>
5108+ <brief>create cursor</brief>
5109+ <description><![CDATA[
5110+Creates a cursor from a font glyph. X provides a set of standard cursor shapes
5111+in a special font named cursor. Applications are encouraged to use this
5112+interface for their cursors because the font can be customized for the
5113+individual display type.
5114+
5115+All pixels which are set to 1 in the source will use the foreground color (as
5116+specified by `fore_red`, `fore_green` and `fore_blue`). All pixels set to 0
5117+will use the background color (as specified by `back_red`, `back_green` and
5118+`back_blue`).
5119+ ]]></description>
5120+ <field name="cid"><![CDATA[
5121+The ID with which you will refer to the cursor, created by `xcb_generate_id`.
5122+ ]]></field>
5123+ <field name="source_font"><![CDATA[
5124+In which font to look for the cursor glyph.
5125+ ]]></field>
5126+ <field name="mask_font"><![CDATA[
5127+In which font to look for the mask glyph.
5128+ ]]></field>
5129+ <field name="source_char"><![CDATA[
5130+The glyph of `source_font` to use.
5131+ ]]></field>
5132+ <field name="mask_char"><![CDATA[
5133+The glyph of `mask_font` to use as a mask: Pixels which are set to 1 define
5134+which source pixels are displayed. All pixels which are set to 0 are not
5135+displayed.
5136+ ]]></field>
5137+ <field name="fore_red"><![CDATA[
5138+The red value of the foreground color.
5139+ ]]></field>
5140+ <field name="fore_green"><![CDATA[
5141+The green value of the foreground color.
5142+ ]]></field>
5143+ <field name="fore_blue"><![CDATA[
5144+The blue value of the foreground color.
5145+ ]]></field>
5146+ <field name="back_red"><![CDATA[
5147+The red value of the background color.
5148+ ]]></field>
5149+ <field name="back_green"><![CDATA[
5150+The green value of the background color.
5151+ ]]></field>
5152+ <field name="back_blue"><![CDATA[
5153+The blue value of the background color.
5154+ ]]></field>
5155+ <error type="Alloc"><![CDATA[
5156+The X server could not allocate the requested resources (no memory?).
5157+ ]]></error>
5158+ <error type="Font"><![CDATA[
5159+The specified `source_font` or `mask_font` does not exist.
5160+ ]]></error>
5161+ <error type="Value"><![CDATA[
5162+Either `source_char` or `mask_char` are not defined in `source_font` or `mask_font`, respectively.
5163+ ]]></error>
5164+ <!-- TODO: example -->
5165+ </doc>
5166+ </request>
5167+
5168+ <request name="FreeCursor" opcode="95">
5169+ <pad bytes="1" />
5170+ <field type="CURSOR" name="cursor" />
5171+ <doc>
5172+ <brief>Deletes a cursor</brief>
5173+ <description><![CDATA[
5174+Deletes the association between the cursor resource ID and the specified
5175+cursor. The cursor is freed when no other resource references it.
5176+ ]]></description>
5177+ <field name="cursor"><![CDATA[The cursor to destroy.]]></field>
5178+ <error type="Cursor"><![CDATA[
5179+The specified cursor does not exist.
5180+ ]]></error>
5181+ </doc>
5182+
5183+ </request>
5184+
5185+ <request name="RecolorCursor" opcode="96">
5186+ <pad bytes="1" />
5187+ <field type="CURSOR" name="cursor" />
5188+ <field type="CARD16" name="fore_red" />
5189+ <field type="CARD16" name="fore_green" />
5190+ <field type="CARD16" name="fore_blue" />
5191+ <field type="CARD16" name="back_red" />
5192+ <field type="CARD16" name="back_green" />
5193+ <field type="CARD16" name="back_blue" />
5194+ </request>
5195+
5196+ <enum name="QueryShapeOf">
5197+ <item name="LargestCursor"> <value>0</value></item>
5198+ <item name="FastestTile"> <value>1</value></item>
5199+ <item name="FastestStipple"><value>2</value></item>
5200+ </enum>
5201+
5202+ <request name="QueryBestSize" opcode="97">
5203+ <field type="CARD8" name="class" enum="QueryShapeOf" />
5204+ <field type="DRAWABLE" name="drawable" />
5205+ <field type="CARD16" name="width" />
5206+ <field type="CARD16" name="height" />
5207+ <reply>
5208+ <pad bytes="1" />
5209+ <field type="CARD16" name="width" />
5210+ <field type="CARD16" name="height" />
5211+ </reply>
5212+ </request>
5213+
5214+ <request name="QueryExtension" opcode="98">
5215+ <pad bytes="1" />
5216+ <field type="CARD16" name="name_len" />
5217+ <pad bytes="2" />
5218+ <list type="char" name="name">
5219+ <fieldref>name_len</fieldref>
5220+ </list>
5221+ <reply>
5222+ <pad bytes="1" />
5223+ <field type="BOOL" name="present" />
5224+ <field type="CARD8" name="major_opcode" />
5225+ <field type="CARD8" name="first_event" />
5226+ <field type="CARD8" name="first_error" />
5227+ <doc>
5228+ <field name="present"><![CDATA[
5229+Whether the extension is present on this X11 server.
5230+ ]]></field>
5231+ <field name="major_opcode"><![CDATA[
5232+The major opcode for requests.
5233+ ]]></field>
5234+ <field name="first_event"><![CDATA[
5235+The first event code, if any.
5236+ ]]></field>
5237+ <field name="first_error"><![CDATA[
5238+The first error code, if any.
5239+ ]]></field>
5240+ </doc>
5241+ </reply>
5242+ <doc>
5243+ <brief>check if extension is present</brief>
5244+ <description><![CDATA[
5245+Determines if the specified extension is present on this X11 server.
5246+
5247+Every extension has a unique `major_opcode` to identify requests, the minor
5248+opcodes and request formats are extension-specific. If the extension provides
5249+events and errors, the `first_event` and `first_error` fields in the reply are
5250+set accordingly.
5251+
5252+There should rarely be a need to use this request directly, XCB provides the
5253+`xcb_get_extension_data` function instead.
5254+ ]]></description>
5255+ <field name="name_len"><![CDATA[
5256+The length of `name` in bytes.
5257+ ]]></field>
5258+ <field name="name"><![CDATA[
5259+The name of the extension to query, for example "RANDR". This is case
5260+sensitive!
5261+ ]]></field>
5262+ <see type="program" name="xdpyinfo" />
5263+ <see type="function" name="xcb_get_extension_data" />
5264+ </doc>
5265+ </request>
5266+
5267+ <request name="ListExtensions" opcode="99">
5268+ <reply>
5269+ <field type="CARD8" name="names_len" />
5270+ <pad bytes="24" />
5271+ <list type="STR" name="names">
5272+ <fieldref>names_len</fieldref>
5273+ </list>
5274+ </reply>
5275+ </request>
5276+
5277+ <request name="ChangeKeyboardMapping" opcode="100">
5278+ <field type="CARD8" name="keycode_count" />
5279+ <field type="KEYCODE" name="first_keycode" />
5280+ <field type="CARD8" name="keysyms_per_keycode" />
5281+ <pad bytes="2" />
5282+ <list type="KEYSYM" name="keysyms">
5283+ <op op="*">
5284+ <fieldref>keycode_count</fieldref>
5285+ <fieldref>keysyms_per_keycode</fieldref>
5286+ </op>
5287+ </list>
5288+ </request>
5289+
5290+ <request name="GetKeyboardMapping" opcode="101">
5291+ <pad bytes="1" />
5292+ <field type="KEYCODE" name="first_keycode" />
5293+ <field type="CARD8" name="count" />
5294+ <reply>
5295+ <field type="BYTE" name="keysyms_per_keycode" />
5296+ <pad bytes="24" />
5297+ <list type="KEYSYM" name="keysyms">
5298+ <fieldref>length</fieldref>
5299+ </list>
5300+ </reply>
5301+ </request>
5302+
5303+ <enum name="KB">
5304+ <item name="KeyClickPercent"><bit>0</bit></item>
5305+ <item name="BellPercent"> <bit>1</bit></item>
5306+ <item name="BellPitch"> <bit>2</bit></item>
5307+ <item name="BellDuration"> <bit>3</bit></item>
5308+ <item name="Led"> <bit>4</bit></item>
5309+ <item name="LedMode"> <bit>5</bit></item>
5310+ <item name="Key"> <bit>6</bit></item>
5311+ <item name="AutoRepeatMode"> <bit>7</bit></item>
5312+ </enum>
5313+
5314+ <enum name="LedMode">
5315+ <item name="Off"><value>0</value></item>
5316+ <item name="On"> <value>1</value></item>
5317+ </enum>
5318+
5319+ <enum name="AutoRepeatMode">
5320+ <item name="Off"> <value>0</value></item>
5321+ <item name="On"> <value>1</value></item>
5322+ <item name="Default"><value>2</value></item>
5323+ </enum>
5324+
5325+ <request name="ChangeKeyboardControl" opcode="102">
5326+ <pad bytes="1" />
5327+ <field type="CARD32" name="value_mask" mask="KB" />
5328+ <switch name="value_list">
5329+ <fieldref>value_mask</fieldref>
5330+ <bitcase>
5331+ <enumref ref="KB">KeyClickPercent</enumref>
5332+ <field type="INT32" name="key_click_percent" />
5333+ </bitcase>
5334+ <bitcase>
5335+ <enumref ref="KB">BellPercent</enumref>
5336+ <field type="INT32" name="bell_percent" />
5337+ </bitcase>
5338+ <bitcase>
5339+ <enumref ref="KB">BellPitch</enumref>
5340+ <field type="INT32" name="bell_pitch" />
5341+ </bitcase>
5342+ <bitcase>
5343+ <enumref ref="KB">BellDuration</enumref>
5344+ <field type="INT32" name="bell_duration" />
5345+ </bitcase>
5346+ <bitcase>
5347+ <enumref ref="KB">Led</enumref>
5348+ <field type="CARD32" name="led" />
5349+ </bitcase>
5350+ <bitcase>
5351+ <enumref ref="KB">LedMode</enumref>
5352+ <field type="CARD32" name="led_mode" enum="LedMode"/>
5353+ </bitcase>
5354+ <bitcase>
5355+ <enumref ref="KB">Key</enumref>
5356+ <field type="KEYCODE32" name="key" />
5357+ </bitcase>
5358+ <bitcase>
5359+ <enumref ref="KB">AutoRepeatMode</enumref>
5360+ <field type="CARD32" name="auto_repeat_mode" enum="AutoRepeatMode"/>
5361+ </bitcase>
5362+ </switch>
5363+
5364+ </request>
5365+
5366+ <request name="GetKeyboardControl" opcode="103">
5367+ <reply>
5368+ <field type="BYTE" name="global_auto_repeat" enum="AutoRepeatMode" />
5369+ <field type="CARD32" name="led_mask" />
5370+ <field type="CARD8" name="key_click_percent" />
5371+ <field type="CARD8" name="bell_percent" />
5372+ <field type="CARD16" name="bell_pitch" />
5373+ <field type="CARD16" name="bell_duration" />
5374+ <pad bytes="2" />
5375+ <list type="CARD8" name="auto_repeats"><value>32</value></list>
5376+ </reply>
5377+ </request>
5378+
5379+ <request name="Bell" opcode="104">
5380+ <field type="INT8" name="percent" />
5381+ </request>
5382+
5383+ <request name="ChangePointerControl" opcode="105">
5384+ <pad bytes="1" />
5385+ <field type="INT16" name="acceleration_numerator" />
5386+ <field type="INT16" name="acceleration_denominator" />
5387+ <field type="INT16" name="threshold" />
5388+ <field type="BOOL" name="do_acceleration" />
5389+ <field type="BOOL" name="do_threshold" />
5390+ </request>
5391+
5392+ <request name="GetPointerControl" opcode="106">
5393+ <reply>
5394+ <pad bytes="1" />
5395+ <field type="CARD16" name="acceleration_numerator" />
5396+ <field type="CARD16" name="acceleration_denominator" />
5397+ <field type="CARD16" name="threshold" />
5398+ <pad bytes="18" />
5399+ </reply>
5400+ </request>
5401+
5402+ <!-- Screen saver timeout and interval can be set to -1 to restore defaults
5403+ and set to 0 to disable the screen saver. -->
5404+
5405+ <enum name="Blanking">
5406+ <item name="NotPreferred"><value>0</value></item>
5407+ <item name="Preferred"> <value>1</value></item>
5408+ <item name="Default"> <value>2</value></item>
5409+ </enum>
5410+
5411+ <enum name="Exposures">
5412+ <item name="NotAllowed"><value>0</value></item>
5413+ <item name="Allowed"> <value>1</value></item>
5414+ <item name="Default"> <value>2</value></item>
5415+ </enum>
5416+
5417+ <request name="SetScreenSaver" opcode="107">
5418+ <pad bytes="1" />
5419+ <field type="INT16" name="timeout" />
5420+ <field type="INT16" name="interval" />
5421+ <field type="CARD8" name="prefer_blanking" enum="Blanking" />
5422+ <field type="CARD8" name="allow_exposures" enum="Exposures" />
5423+ </request>
5424+
5425+ <request name="GetScreenSaver" opcode="108">
5426+ <reply>
5427+ <pad bytes="1" />
5428+ <field type="CARD16" name="timeout" />
5429+ <field type="CARD16" name="interval" />
5430+ <field type="BYTE" name="prefer_blanking" enum="Blanking" />
5431+ <field type="BYTE" name="allow_exposures" enum="Exposures" />
5432+ <pad bytes="18" />
5433+ </reply>
5434+ </request>
5435+
5436+ <enum name="HostMode">
5437+ <item name="Insert"><value>0</value></item>
5438+ <item name="Delete"><value>1</value></item>
5439+ </enum>
5440+
5441+ <!-- also used and extended for Xau authentication -->
5442+ <enum name="Family">
5443+ <item name="Internet"> <value>0</value></item>
5444+ <item name="DECnet"> <value>1</value></item>
5445+ <item name="Chaos"> <value>2</value></item>
5446+ <item name="ServerInterpreted"><value>5</value></item>
5447+ <item name="Internet6"> <value>6</value></item>
5448+ </enum>
5449+
5450+ <request name="ChangeHosts" opcode="109">
5451+ <field type="CARD8" name="mode" enum="HostMode" />
5452+ <field type="CARD8" name="family" enum="Family" />
5453+ <pad bytes="1" />
5454+ <field type="CARD16" name="address_len" />
5455+ <list type="BYTE" name="address">
5456+ <fieldref>address_len</fieldref>
5457+ </list>
5458+ </request>
5459+
5460+ <struct name="HOST">
5461+ <field type="CARD8" name="family" enum="Family" />
5462+ <pad bytes="1" />
5463+ <field type="CARD16" name="address_len" />
5464+ <list type="BYTE" name="address">
5465+ <fieldref>address_len</fieldref>
5466+ </list>
5467+ <pad align="4" />
5468+ </struct>
5469+
5470+ <request name="ListHosts" opcode="110">
5471+ <reply>
5472+ <field type="BYTE" name="mode" enum="AccessControl" />
5473+ <field type="CARD16" name="hosts_len" />
5474+ <pad bytes="22" />
5475+ <list type="HOST" name="hosts">
5476+ <fieldref>hosts_len</fieldref>
5477+ </list>
5478+ </reply>
5479+ </request>
5480+
5481+ <enum name="AccessControl">
5482+ <item name="Disable"><value>0</value></item>
5483+ <item name="Enable"> <value>1</value></item>
5484+ </enum>
5485+
5486+ <request name="SetAccessControl" opcode="111">
5487+ <field type="CARD8" name="mode" enum="AccessControl" />
5488+ </request>
5489+
5490+ <enum name="CloseDown">
5491+ <item name="DestroyAll"> <value>0</value></item>
5492+ <item name="RetainPermanent"><value>1</value></item>
5493+ <item name="RetainTemporary"><value>2</value></item>
5494+ </enum>
5495+
5496+ <request name="SetCloseDownMode" opcode="112">
5497+ <field type="CARD8" name="mode" enum="CloseDown" />
5498+ </request>
5499+
5500+ <enum name="Kill">
5501+ <item name="AllTemporary"><value>0</value></item>
5502+ </enum>
5503+
5504+ <request name="KillClient" opcode="113">
5505+ <pad bytes="1" />
5506+ <field type="CARD32" name="resource" altenum="Kill" />
5507+ <doc>
5508+ <brief>kills a client</brief>
5509+ <description><![CDATA[
5510+Forces a close down of the client that created the specified `resource`.
5511+ ]]></description>
5512+ <field name="resource"><![CDATA[
5513+Any resource belonging to the client (for example a Window), used to identify
5514+the client connection.
5515+
5516+The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients
5517+that have terminated in `RetainTemporary` (TODO) are destroyed.
5518+ ]]></field>
5519+ <error type="Value"><![CDATA[
5520+The specified `resource` does not exist.
5521+ ]]></error>
5522+ <see type="program" name="xkill" />
5523+ </doc>
5524+
5525+ </request>
5526+
5527+ <request name="RotateProperties" opcode="114">
5528+ <pad bytes="1" />
5529+ <field type="WINDOW" name="window" />
5530+ <field type="CARD16" name="atoms_len" />
5531+ <field type="INT16" name="delta" />
5532+ <list type="ATOM" name="atoms">
5533+ <fieldref>atoms_len</fieldref>
5534+ </list>
5535+ </request>
5536+
5537+ <enum name="ScreenSaver">
5538+ <item name="Reset"> <value>0</value></item>
5539+ <item name="Active"><value>1</value></item>
5540+ </enum>
5541+
5542+ <request name="ForceScreenSaver" opcode="115">
5543+ <field type="CARD8" name="mode" enum="ScreenSaver" />
5544+ </request>
5545+
5546+ <!-- Reply from SetPointerMapping or SetModifierMapping -->
5547+ <enum name="MappingStatus">
5548+ <item name="Success"><value>0</value></item>
5549+ <item name="Busy"> <value>1</value></item>
5550+ <item name="Failure"><value>2</value></item>
5551+ </enum>
5552+
5553+ <request name="SetPointerMapping" opcode="116">
5554+ <field type="CARD8" name="map_len" />
5555+ <list type="CARD8" name="map">
5556+ <fieldref>map_len</fieldref>
5557+ </list>
5558+ <reply>
5559+ <field type="BYTE" name="status" enum="MappingStatus" />
5560+ </reply>
5561+ </request>
5562+
5563+ <request name="GetPointerMapping" opcode="117">
5564+ <reply>
5565+ <field type="CARD8" name="map_len" />
5566+ <pad bytes="24" />
5567+ <list type="CARD8" name="map">
5568+ <fieldref>map_len</fieldref>
5569+ </list>
5570+ </reply>
5571+ </request>
5572+
5573+ <enum name="MapIndex">
5574+ <item name="Shift"> <value>0</value></item>
5575+ <item name="Lock"> <value>1</value></item>
5576+ <item name="Control"><value>2</value></item>
5577+ <item name="1"> <value>3</value></item>
5578+ <item name="2"> <value>4</value></item>
5579+ <item name="3"> <value>5</value></item>
5580+ <item name="4"> <value>6</value></item>
5581+ <item name="5"> <value>7</value></item>
5582+ </enum>
5583+
5584+ <request name="SetModifierMapping" opcode="118">
5585+ <field type="CARD8" name="keycodes_per_modifier" />
5586+ <list type="KEYCODE" name="keycodes">
5587+ <op op="*">
5588+ <fieldref>keycodes_per_modifier</fieldref>
5589+ <value>8</value>
5590+ </op>
5591+ </list>
5592+ <reply>
5593+ <field type="BYTE" name="status" enum="MappingStatus" />
5594+ </reply>
5595+ </request>
5596+
5597+ <request name="GetModifierMapping" opcode="119">
5598+ <reply>
5599+ <field type="CARD8" name="keycodes_per_modifier" />
5600+ <pad bytes="24" />
5601+ <list type="KEYCODE" name="keycodes">
5602+ <op op="*">
5603+ <fieldref>keycodes_per_modifier</fieldref>
5604+ <value>8</value>
5605+ </op>
5606+ </list>
5607+ </reply>
5608+ </request>
5609+
5610+ <!--
5611+ FIXME: NoOperation should allow specifying payload length
5612+ but geez, malloc()ing a 262140 byte buffer just so I have something
5613+ to hand to write(2) seems silly...!
5614+ -->
5615+ <request name="NoOperation" opcode="127" />
5616+
5617+</xcb>

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 1

↑↓ moveenter openesc close