Remove now unnecessary files as everything is implemented in xcbgen.
[free-sw/xcb/proto] / src / xf86vidmode.xml
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
28 <xcb header="xf86vidmode" extension-xname="XFree86-VidModeExtension" extension-name="XF86VidMode"
29     major-version="2" minor-version="2">
30
31     <!-- In places where there are multiple versions of the protocol, this
32          describes version 2.2. If you do not call xcb_xf86vidmode_set_client_version()
33          then some requests may fail and some replies may not be what you expect. -->
34
35     <typedef oldname="CARD32" newname="SYNCRANGE" />  <!-- Min and Max fixed-decimal-point values -->
36     <typedef oldname="CARD32" newname="DOTCLOCK" />   <!-- A single fixed-decimal-point value -->
37
38     <enum name="ModeFlag">
39         <item name="Positive_HSync">    <bit>0</bit></item>
40         <item name="Negative_HSync">    <bit>1</bit></item>
41         <item name="Positive_VSync">    <bit>2</bit></item>
42         <item name="Negative_VSync">    <bit>3</bit></item>
43         <item name="Interlace">         <bit>4</bit></item>
44         <item name="Composite_Sync">    <bit>5</bit></item>
45         <item name="Positive_CSync">    <bit>6</bit></item>
46         <item name="Negative_CSync">    <bit>7</bit></item>
47         <item name="HSkew">             <bit>8</bit></item>
48         <item name="Broadcast">         <bit>9</bit></item>
49         <item name="Pixmux">            <bit>10</bit></item>
50         <item name="Double_Clock">      <bit>11</bit></item>
51         <item name="Half_Clock">        <bit>12</bit></item>
52     </enum>
53
54     <enum name="ClockFlag">
55         <item name="Programable">       <bit>0</bit></item>
56     </enum>
57
58     <enum name="Permission">
59         <item name="Read">              <bit>0</bit></item>
60         <item name="Write">             <bit>1</bit></item>
61     </enum>
62
63     <struct name="ModeInfo">
64         <field type="DOTCLOCK" name="dotclock" />
65         <field type="CARD16" name= "hdisplay" />
66         <field type="CARD16" name= "hsyncstart" />
67         <field type="CARD16" name= "hsyncend" />
68         <field type="CARD16" name= "htotal" />
69         <field type="CARD32" name= "hskew" />
70         <field type="CARD16" name= "vdisplay" />
71         <field type="CARD16" name= "vsyncstart" />
72         <field type="CARD16" name= "vsyncend" />
73         <field type="CARD16" name= "vtotal" />
74         <pad bytes="4" />
75         <field type="CARD32" name="flags" mask="ModeFlag" />
76         <pad bytes="12" />
77         <field type="CARD32" name="privsize" />
78     </struct>
79
80     <request name="QueryVersion" opcode="0">
81         <reply>
82             <pad bytes="1" />
83             <field type="CARD16" name="major_version" />
84             <field type="CARD16" name="minor_version" />
85         </reply>
86     </request>
87
88     <request name="GetModeLine" opcode="1">
89         <field type="CARD16" name="screen" />
90         <pad bytes="2" />
91         <reply>
92             <pad bytes="1" />
93             <field type="DOTCLOCK" name="dotclock" />
94             <field type="CARD16" name= "hdisplay" />
95             <field type="CARD16" name= "hsyncstart" />
96             <field type="CARD16" name= "hsyncend" />
97             <field type="CARD16" name= "htotal" />
98             <field type="CARD16" name= "hskew" />
99             <field type="CARD16" name= "vdisplay" />
100             <field type="CARD16" name= "vsyncstart" />
101             <field type="CARD16" name= "vsyncend" />
102             <field type="CARD16" name= "vtotal" />
103             <pad bytes="2" />
104             <field type="CARD32" name="flags" mask="ModeFlag" />
105             <pad bytes="12" />
106             <field type="CARD32" name="privsize" />
107             <list type="CARD8" name="private">
108                 <fieldref>privsize</fieldref>
109             </list>
110         </reply>
111     </request>
112
113     <request name="ModModeLine" opcode="2">
114         <field type="CARD32" name="screen" />
115         <field type="CARD16" name= "hdisplay" />
116         <field type="CARD16" name= "hsyncstart" />
117         <field type="CARD16" name= "hsyncend" />
118         <field type="CARD16" name= "htotal" />
119         <field type="CARD16" name= "hskew" />
120         <field type="CARD16" name= "vdisplay" />
121         <field type="CARD16" name= "vsyncstart" />
122         <field type="CARD16" name= "vsyncend" />
123         <field type="CARD16" name= "vtotal" />
124         <pad bytes="2" />
125         <field type="CARD32" name="flags" mask="ModeFlag" />
126         <pad bytes="12" />
127         <field type="CARD32" name="privsize" />
128         <list type="CARD8" name="private">
129             <fieldref>privsize</fieldref>
130         </list>
131     </request>
132
133     <request name="SwitchMode" opcode="3">
134         <field type="CARD16" name="screen" />
135         <field type="CARD16" name="zoom" />
136     </request>
137
138     <request name="GetMonitor" opcode="4">
139         <field type="CARD16" name="screen" />
140         <pad bytes="2" />
141         <reply>
142             <pad bytes="1" />
143             <field type="CARD8" name="vendor_length" />
144             <field type="CARD8" name="model_length" />
145             <field type="CARD8" name="num_hsync" />
146             <field type="CARD8" name="num_vsync" />
147             <pad bytes="20" />
148             <list type="SYNCRANGE" name="hsync">
149                 <fieldref>num_hsync</fieldref>
150             </list>
151             <list type="SYNCRANGE" name="vsync">
152                 <fieldref>num_vsync</fieldref>
153             </list>
154             <list type="char" name="vendor">
155                 <fieldref>vendor_length</fieldref>
156             </list>
157             <list type="void" name="alignment_pad">
158                 <op op="-">
159                     <op op="&amp;">
160                         <op op="+">
161                             <fieldref>vendor_length</fieldref>
162                             <value> 3 </value>
163                         </op>
164                         <unop op="~">
165                             <value>3</value>
166                         </unop>
167                     </op>
168                     <fieldref>vendor_length</fieldref>
169                 </op>
170             </list>
171             <list type="char" name="model">
172                 <fieldref>model_length</fieldref>
173             </list>
174         </reply>
175     </request>
176
177     <request name="LockModeSwitch" opcode="5">
178         <field type="CARD16" name="screen" />
179         <field type="CARD16" name="lock" />
180     </request>
181
182     <request name="GetAllModeLines" opcode="6">
183         <field type="CARD16" name="screen" />
184         <pad bytes="2" />
185         <reply>
186             <pad bytes="1" />
187             <field type="CARD32" name="modecount" />
188             <pad bytes="20" />
189             <list type="ModeInfo" name="modeinfo">
190                 <fieldref>modecount</fieldref>
191             </list>
192         </reply>
193     </request>
194
195     <request name="AddModeLine" opcode="7">
196         <field type="CARD32" name="screen" />
197         <field type="DOTCLOCK" name="dotclock" />
198         <field type="CARD16" name= "hdisplay" />
199         <field type="CARD16" name= "hsyncstart" />
200         <field type="CARD16" name= "hsyncend" />
201         <field type="CARD16" name= "htotal" />
202         <field type="CARD16" name= "hskew" />
203         <field type="CARD16" name= "vdisplay" />
204         <field type="CARD16" name= "vsyncstart" />
205         <field type="CARD16" name= "vsyncend" />
206         <field type="CARD16" name= "vtotal" />
207         <pad bytes="2" />
208         <field type="CARD32" name="flags" mask="ModeFlag" />
209         <pad bytes="12" />
210         <field type="CARD32" name="privsize" />
211         <field type="DOTCLOCK" name="after_dotclock" />
212         <field type="CARD16" name= "after_hdisplay" />
213         <field type="CARD16" name= "after_hsyncstart" />
214         <field type="CARD16" name= "after_hsyncend" />
215         <field type="CARD16" name= "after_htotal" />
216         <field type="CARD16" name= "after_hskew" />
217         <field type="CARD16" name= "after_vdisplay" />
218         <field type="CARD16" name= "after_vsyncstart" />
219         <field type="CARD16" name= "after_vsyncend" />
220         <field type="CARD16" name= "after_vtotal" />
221         <pad bytes="2" />
222         <field type="CARD32" name="after_flags" mask="ModeFlag" />
223         <pad bytes="12" />
224         <list type="CARD8" name="private">
225             <fieldref>privsize</fieldref>
226         </list>
227     </request>
228
229     <request name="DeleteModeLine" opcode="8">
230         <field type="CARD32" name="screen" />
231         <field type="DOTCLOCK" name="dotclock" />
232         <field type="CARD16" name= "hdisplay" />
233         <field type="CARD16" name= "hsyncstart" />
234         <field type="CARD16" name= "hsyncend" />
235         <field type="CARD16" name= "htotal" />
236         <field type="CARD16" name= "hskew" />
237         <field type="CARD16" name= "vdisplay" />
238         <field type="CARD16" name= "vsyncstart" />
239         <field type="CARD16" name= "vsyncend" />
240         <field type="CARD16" name= "vtotal" />
241         <pad bytes="2" />
242         <field type="CARD32" name="flags" mask="ModeFlag" />
243         <pad bytes="12" />
244         <field type="CARD32" name="privsize" />
245         <list type="CARD8" name="private">
246             <fieldref>privsize</fieldref>
247         </list>
248     </request>
249
250     <request name="ValidateModeLine" opcode="9">
251         <field type="CARD32" name="screen" />
252         <field type="DOTCLOCK" name="dotclock" />
253         <field type="CARD16" name= "hdisplay" />
254         <field type="CARD16" name= "hsyncstart" />
255         <field type="CARD16" name= "hsyncend" />
256         <field type="CARD16" name= "htotal" />
257         <field type="CARD16" name= "hskew" />
258         <field type="CARD16" name= "vdisplay" />
259         <field type="CARD16" name= "vsyncstart" />
260         <field type="CARD16" name= "vsyncend" />
261         <field type="CARD16" name= "vtotal" />
262         <pad bytes="2" />
263         <field type="CARD32" name="flags" mask="ModeFlag" />
264         <pad bytes="12" />
265         <field type="CARD32" name="privsize" />
266         <list type="CARD8" name="private">
267             <fieldref>privsize</fieldref>
268         </list>
269         <reply>
270             <pad bytes="1" />
271             <field type="CARD32" name="status" />
272             <pad bytes="20" />
273         </reply>
274     </request>
275
276     <request name="SwitchToMode" opcode="10">
277         <field type="CARD32" name="screen" />
278         <field type="DOTCLOCK" name="dotclock" />
279         <field type="CARD16" name= "hdisplay" />
280         <field type="CARD16" name= "hsyncstart" />
281         <field type="CARD16" name= "hsyncend" />
282         <field type="CARD16" name= "htotal" />
283         <field type="CARD16" name= "hskew" />
284         <field type="CARD16" name= "vdisplay" />
285         <field type="CARD16" name= "vsyncstart" />
286         <field type="CARD16" name= "vsyncend" />
287         <field type="CARD16" name= "vtotal" />
288         <pad bytes="2" />
289         <field type="CARD32" name="flags" mask="ModeFlag" />
290         <pad bytes="12" />
291         <field type="CARD32" name="privsize" />
292         <list type="CARD8" name="private">
293             <fieldref>privsize</fieldref>
294         </list>
295     </request>
296
297     <request name="GetViewPort" opcode="11">
298         <field type="CARD16" name="screen" />
299         <pad bytes="2" />
300         <reply>
301             <pad bytes="1" />
302             <field type="CARD32" name="x" />
303             <field type="CARD32" name="y" />
304             <pad bytes="16" />
305         </reply>
306     </request>
307
308     <request name="SetViewPort" opcode="12">
309         <field type="CARD16" name="screen" />
310         <pad bytes="2" />
311         <field type="CARD32" name="x" />
312         <field type="CARD32" name="y" />
313     </request>
314
315     <!-- new for version 2.x  -->
316     <request name="GetDotClocks" opcode="13">
317         <field type="CARD16" name="screen" />
318         <pad bytes="2" />
319         <reply>
320             <pad bytes="1" />
321             <field type="CARD32" name="flags" mask="ClockFlag" />
322             <field type="CARD32" name="clocks" />
323             <field type="CARD32" name="maxclocks" />
324             <pad bytes="12" />
325             <list type="CARD32" name="clock">
326                 <!-- Only if flags does not include Programable:
327                     (1 - (flags & 1)) * clocks
328                 -->
329                 <op op="*">
330                     <op op = "-">
331                         <value>1</value>
332                         <op op="&amp;">
333                             <fieldref>flags</fieldref>
334                             <value>1</value>
335                         </op>
336                     </op>
337                     <fieldref>clocks</fieldref>
338                 </op>
339             </list>
340         </reply>
341     </request>
342
343     <request name="SetClientVersion" opcode="14">
344         <field type="CARD16" name="major" />
345         <field type="CARD16" name="minor" />
346     </request>
347
348     <request name="SetGamma" opcode="15">
349         <field type="CARD16" name="screen" />
350         <pad bytes="2" />
351         <field type="CARD32" name="red" />
352         <field type="CARD32" name="green" />
353         <field type="CARD32" name="blue" />
354         <pad bytes="12" />
355     </request>
356
357     <request name="GetGamma" opcode="16">
358         <field type="CARD16" name="screen" />
359         <pad bytes="26" />
360         <reply>
361             <pad bytes="1" />
362             <field type="CARD32" name="red" />
363             <field type="CARD32" name="green" />
364             <field type="CARD32" name="blue" />
365             <pad bytes="12" />
366         </reply>
367     </request>
368
369     <request name="GetGammaRamp" opcode="17">
370         <field type="CARD16" name="screen" />
371         <field type="CARD16" name="size" />
372         <reply>
373             <pad bytes="1" />
374             <field type="CARD16" name="size" />
375             <pad bytes="22" />
376             <list type="CARD16" name="red">
377                 <op op="&amp;">
378                     <op op = "+">
379                         <fieldref>size</fieldref>
380                         <value>1</value>
381                     </op>
382                     <unop op="~">
383                         <value>1</value>
384                     </unop>
385                 </op>
386             </list>
387             <list type="CARD16" name="green">
388                 <op op="&amp;">
389                     <op op = "+">
390                         <fieldref>size</fieldref>
391                         <value>1</value>
392                     </op>
393                     <unop op="~">
394                         <value>1</value>
395                     </unop>
396                 </op>
397             </list>
398             <list type="CARD16" name="blue">
399                 <op op="&amp;">
400                     <op op = "+">
401                         <fieldref>size</fieldref>
402                         <value>1</value>
403                     </op>
404                     <unop op="~">
405                         <value>1</value>
406                     </unop>
407                 </op>
408             </list>
409         </reply>
410     </request>
411
412     <request name="SetGammaRamp" opcode="18">
413         <field type="CARD16" name="screen" />
414         <field type="CARD16" name="size" />
415         <list type="CARD16" name="red">
416             <op op="&amp;">
417                 <op op = "+">
418                     <fieldref>size</fieldref>
419                     <value>1</value>
420                 </op>
421                 <unop op="~">
422                     <value>1</value>
423                 </unop>
424             </op>
425         </list>
426         <list type="CARD16" name="green">
427             <op op="&amp;">
428                 <op op = "+">
429                     <fieldref>size</fieldref>
430                     <value>1</value>
431                 </op>
432                 <unop op="~">
433                     <value>1</value>
434                 </unop>
435             </op>
436         </list>
437         <list type="CARD16" name="blue">
438             <op op="&amp;">
439                 <op op = "+">
440                     <fieldref>size</fieldref>
441                     <value>1</value>
442                 </op>
443                 <unop op="~">
444                     <value>1</value>
445                 </unop>
446             </op>
447         </list>
448     </request>
449
450     <request name="GetGammaRampSize" opcode="19">
451         <field type="CARD16" name="screen" />
452         <pad bytes="2" />
453         <reply>
454             <pad bytes="1" />
455             <field type="CARD16" name="size" />
456             <pad bytes="22" />
457         </reply>
458     </request>
459
460     <request name="GetPermissions" opcode="20">
461         <field type="CARD16" name="screen" />
462         <pad bytes="2" />
463         <reply>
464             <pad bytes="1" />
465             <field type="CARD32" name="permissions" mask="Permission" />
466             <pad bytes="20" />
467         </reply>
468     </request>
469
470     <error name="BadClock" number="0" />
471     <error name="BadHTimings" number="1" />
472     <error name="BadVTimings" number="2" />
473     <error name="ModeUnsuitable" number="3" />
474     <error name="ExtensionDisabled" number="4" />
475     <error name="ClientNotLocal" number="5" />
476     <error name="ZoomLocked" number="6" />
477
478 </xcb>