randr: Use explicit enum value
[free-sw/xcb/proto] / src / randr.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (C) 2006 Jeremy Kolb, Ian Osgood
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
29 <xcb header="randr" extension-xname="RANDR" extension-name="RandR"
30     major-version="1" minor-version="4">
31
32         <import>xproto</import>
33         <import>render</import>
34
35         <!-- XIDs -->
36         <xidtype name="MODE" />
37         <xidtype name="CRTC" />
38         <xidtype name="OUTPUT" />
39         <xidtype name="PROVIDER" />
40         
41         <!-- Errors -->
42
43         <error name="BadOutput"   number="0" />
44         <error name="BadCrtc"     number="1" />
45         <error name="BadMode"     number="2" />
46         <error name="BadProvider" number="3" />
47
48         <!-- Requests -->
49
50         <enum name="Rotation">
51                 <item name="Rotate_0">  <bit>0</bit></item>
52                 <item name="Rotate_90"> <bit>1</bit></item>
53                 <item name="Rotate_180"><bit>2</bit></item>
54                 <item name="Rotate_270"><bit>3</bit></item>
55                 <item name="Reflect_X"> <bit>4</bit></item>
56                 <item name="Reflect_Y"> <bit>5</bit></item>
57         </enum>
58
59         <struct name="ScreenSize">
60                 <field type="CARD16" name="width" />   <!-- pixels -->
61                 <field type="CARD16" name="height" />
62                 <field type="CARD16" name="mwidth" />  <!-- millimeters -->
63                 <field type="CARD16" name="mheight" />
64         </struct>
65         
66         <struct name="RefreshRates">
67                 <field type="CARD16" name="nRates" />
68                 <list type="CARD16" name="rates">
69                         <fieldref>nRates</fieldref>
70                 </list>
71         </struct>
72         
73         <request name="QueryVersion" opcode="0">
74                 <field type="CARD32" name="major_version" />
75                 <field type="CARD32" name="minor_version" />
76                 <reply>
77                         <pad bytes="1" />
78                         <field type="CARD32" name="major_version" />
79                         <field type="CARD32" name="minor_version" />
80                         <pad bytes="16" />
81                 </reply>
82         </request>
83         
84         <!-- Skip obsolete opcode 1 so old clients fail immediately -->
85
86         <enum name="SetConfig">
87                 <item name="Success"><value>0</value></item>
88                 <item name="InvalidConfigTime"><value>1</value></item>
89                 <item name="InvalidTime"><value>2</value></item>
90                 <item name="Failed"><value>3</value></item>
91         </enum>
92
93         <!-- This is for the 1.1 version request.  I don't believe we need to specify a 1.0 request
94         as few things used randr 1.0.  The only difference is the removal of refresh and padding I think.
95         BEWARE: the docs lie!
96         -->
97         <request name="SetScreenConfig" opcode="2">
98                 <field type="WINDOW" name="window" />
99                 <field type="TIMESTAMP" name="timestamp" />
100                 <field type="TIMESTAMP" name="config_timestamp" />
101                 <field type="CARD16" name="sizeID" />
102                 <field type="CARD16" name="rotation" mask="Rotation" />
103                 <field type="CARD16" name="rate" />
104                 <pad bytes="2" />
105                 <reply>
106                         <field type="CARD8" name="status" enum="SetConfig" />
107                         <field type="TIMESTAMP" name="new_timestamp" />
108                         <field type="TIMESTAMP" name="config_timestamp" />
109                         <field type="WINDOW" name="root" />
110                         <field type="CARD16" name="subpixel_order" enum="SubPixel" />
111                         <pad bytes="10" />
112                 </reply>
113         </request>
114         
115         <!-- opcode 3 is obsolete -->
116
117         <enum name="NotifyMask" >
118                 <item name="ScreenChange">    <bit>0</bit></item>
119                 <!-- New in version 1.2 -->
120                 <item name="CrtcChange">      <bit>1</bit></item>
121                 <item name="OutputChange">    <bit>2</bit></item>
122                 <item name="OutputProperty">  <bit>3</bit></item>
123                 <!-- New in version 1.4 -->
124                 <item name="ProviderChange">  <bit>4</bit></item>
125                 <item name="ProviderProperty"><bit>5</bit></item>
126                 <item name="ResourceChange">  <bit>6</bit></item>
127         </enum>
128
129         <request name="SelectInput" opcode="4"> 
130                 <field type="WINDOW" name="window" />
131                 <field type="CARD16" name="enable" mask="NotifyMask" />
132                 <pad bytes="2" />
133         </request>
134
135         <!--
136         I think this is correct.  It works. though I believe nInfo is a bit high...
137         -->
138         <request name="GetScreenInfo" opcode="5">
139                 <field type="WINDOW" name="window" />
140                 <reply>
141                         <field type="CARD8" name="rotations" mask="Rotation" />
142                         <field type="WINDOW" name="root" />
143                         <field type="TIMESTAMP" name="timestamp" />
144                         <field type="TIMESTAMP" name="config_timestamp" />
145                         <field type="CARD16" name="nSizes" />
146                         <field type="CARD16" name="sizeID" />
147                         <field type="CARD16" name="rotation" mask="Rotation" />
148                         <field type="CARD16" name="rate" />
149                         <field type="CARD16" name="nInfo" />
150                         <pad bytes="2" />
151                         <list type="ScreenSize" name="sizes">
152                             <fieldref>nSizes</fieldref>
153                         </list>
154                         <list type="RefreshRates" name="rates">
155                                 <op op="-">
156                                         <fieldref>nInfo</fieldref>
157                                         <fieldref>nSizes</fieldref>
158                                 </op>
159                         </list>
160                 </reply>
161         </request>
162
163         <!-- new in version 1.2 -->
164
165         <request name="GetScreenSizeRange" opcode="6">
166                 <field type="WINDOW" name="window" />
167                 <reply>
168                         <pad bytes="1" />
169                         <field type="CARD16" name="min_width" />
170                         <field type="CARD16" name="min_height" />
171                         <field type="CARD16" name="max_width" />
172                         <field type="CARD16" name="max_height" />
173                         <pad bytes="16" />
174                 </reply>
175         </request>
176
177         <request name="SetScreenSize" opcode="7">
178                 <field type="WINDOW" name="window" />
179                 <field type="CARD16" name="width" />    <!-- pixels -->
180                 <field type="CARD16" name="height" />
181                 <field type="CARD32" name="mm_width" />  <!-- millimeters -->
182                 <field type="CARD32" name="mm_height" />
183         </request>
184
185         <!-- for GetScreenResources.ModeInfo.ModeFlag -->
186         <enum name="ModeFlag">
187                 <item name="HsyncPositive"> <bit>0</bit></item>
188                 <item name="HsyncNegative"> <bit>1</bit></item>
189                 <item name="VsyncPositive"> <bit>2</bit></item>
190                 <item name="VsyncNegative"> <bit>3</bit></item>
191                 <item name="Interlace">     <bit>4</bit></item>
192                 <item name="DoubleScan">    <bit>5</bit></item>
193                 <item name="Csync">         <bit>6</bit></item>
194                 <item name="CsyncPositive"> <bit>7</bit></item>
195                 <item name="CsyncNegative"> <bit>8</bit></item>
196                 <item name="HskewPresent">  <bit>9</bit></item>
197                 <item name="Bcast">         <bit>10</bit></item>
198                 <item name="PixelMultiplex"><bit>11</bit></item>
199                 <item name="DoubleClock">   <bit>12</bit></item>
200                 <item name="HalveClock">    <bit>13</bit></item>
201         </enum>
202
203         <struct name="ModeInfo">
204                 <field type="CARD32" name="id" />
205                 <field type="CARD16" name="width" />
206                 <field type="CARD16" name="height" />
207                 <field type="CARD32" name="dot_clock" />
208                 <field type="CARD16" name="hsync_start" />
209                 <field type="CARD16" name="hsync_end" />
210                 <field type="CARD16" name="htotal" />
211                 <field type="CARD16" name="hskew" />
212                 <field type="CARD16" name="vsync_start" />
213                 <field type="CARD16" name="vsync_end" />
214                 <field type="CARD16" name="vtotal" />
215                 <field type="CARD16" name="name_len" />
216                 <field type="CARD32" name="mode_flags" mask="ModeFlag" />
217                 <!-- the mode name itself -->
218         </struct>
219
220         <request name="GetScreenResources" opcode="8">
221                 <field type="WINDOW" name="window" />
222                 <reply>
223                         <pad bytes="1" />
224                         <field type="TIMESTAMP" name="timestamp" />
225                         <field type="TIMESTAMP" name="config_timestamp" />
226                         <field type="CARD16" name="num_crtcs" />
227                         <field type="CARD16" name="num_outputs" />
228                         <field type="CARD16" name="num_modes" />
229                         <field type="CARD16" name="names_len" />
230                         <pad bytes="8" />
231                         <list type="CRTC" name="crtcs">
232                             <fieldref>num_crtcs</fieldref>
233                         </list>
234                         <list type="OUTPUT" name="outputs">
235                             <fieldref>num_outputs</fieldref>
236                         </list>
237                         <list type="ModeInfo" name="modes">
238                             <fieldref>num_modes</fieldref>
239                         </list>
240                         <!-- FIXME: this is *not* null separated!
241                              One must use ModeInfo.name_len from each previous
242                              ModeInfo to infer the position of the name. -->
243                         <list type="BYTE" name="names">
244                             <fieldref>names_len</fieldref>
245                         </list>
246                 </reply>
247         </request>
248
249         <!-- for GetOutputInfo.connection -->
250         <enum name="Connection">
251                 <item name="Connected">    <value>0</value> </item>
252                 <item name="Disconnected"> <value>1</value> </item>
253                 <item name="Unknown">      <value>2</value> </item>
254         </enum>
255
256         <request name="GetOutputInfo" opcode="9">
257                 <field type="OUTPUT" name="output" />
258                 <field type="TIMESTAMP" name="config_timestamp" />
259                 <reply>
260                         <field type="CARD8" name="status" enum="SetConfig" />
261                         <field type="TIMESTAMP" name="timestamp" />
262                         <field type="CRTC" name="crtc" />
263                         <field type="CARD32" name="mm_width" />  <!-- millimeters -->
264                         <field type="CARD32" name="mm_height" />
265                         <field type="CARD8" name="connection" enum="Connection" />
266                         <field type="CARD8" name="subpixel_order" enum="SubPixel" />
267                         <field type="CARD16" name="num_crtcs" />
268                         <field type="CARD16" name="num_modes" />
269                         <field type="CARD16" name="num_preferred" />
270                         <field type="CARD16" name="num_clones" />
271                         <field type="CARD16" name="name_len" />
272                         <list type="CRTC" name="crtcs">
273                             <fieldref>num_crtcs</fieldref>
274                         </list>
275                         <list type="MODE" name="modes">
276                             <fieldref>num_modes</fieldref>
277                         </list>
278                         <list type="OUTPUT" name="clones">
279                             <fieldref>num_clones</fieldref>
280                         </list>
281                         <list type="BYTE" name="name">
282                             <fieldref>name_len</fieldref>
283                         </list>
284                 </reply>
285         </request>
286
287         <request name="ListOutputProperties" opcode="10">
288                 <field type="OUTPUT" name="output" />
289                 <reply>
290                         <pad bytes="1" />
291                         <field type="CARD16" name="num_atoms" />
292                         <pad bytes="22" />
293                         <list type="ATOM" name="atoms">
294                                 <fieldref>num_atoms</fieldref>
295                         </list>
296                 </reply>
297         </request>
298
299         <request name="QueryOutputProperty" opcode="11">
300                 <field type="OUTPUT" name="output" />
301                 <field type="ATOM" name="property" />
302                 <reply>
303                         <pad bytes="1" />
304                         <field type="BOOL" name="pending" />
305                         <field type="BOOL" name="range" />
306                         <field type="BOOL" name="immutable" />
307                         <pad bytes="21" />
308                         <list type="INT32" name="validValues">
309                                 <fieldref>length</fieldref>
310                         </list>
311                 </reply>
312         </request>
313
314         <request name="ConfigureOutputProperty" opcode="12">
315                 <field type="OUTPUT" name="output" />
316                 <field type="ATOM" name="property" />
317                 <field type="BOOL" name="pending" />
318                 <field type="BOOL" name="range" />
319                 <pad bytes="2" />
320                 <list type="INT32" name="values" />
321         </request>
322
323         <request name="ChangeOutputProperty" opcode="13">
324                 <field type="OUTPUT" name="output" />
325                 <field type="ATOM" name="property" />
326                 <field type="ATOM" name="type" />
327                 <field type="CARD8" name="format" />
328                 <field type="CARD8" name="mode" enum="PropMode" />
329                 <pad bytes="2" />
330                 <field type="CARD32" name="num_units" />
331                 <list type="void" name="data">
332                     <op op="/">
333                         <op op="*">
334                             <fieldref>num_units</fieldref>
335                             <fieldref>format</fieldref>
336                         </op>
337                         <value>8</value>
338                     </op>
339                 </list>
340         </request>
341
342         <request name="DeleteOutputProperty" opcode="14">
343                 <field type="OUTPUT" name="output" />
344                 <field type="ATOM" name="property" />
345         </request>
346
347         <!-- NOTE: num_items depends on format (8/16/32) -->
348         <request name="GetOutputProperty" opcode="15">
349                 <field type="OUTPUT" name="output" />
350                 <field type="ATOM" name="property" />
351                 <field type="ATOM" name="type" altenum="GetPropertyType" />
352                 <field type="CARD32" name="long_offset" />
353                 <field type="CARD32" name="long_length" />
354                 <field type="BOOL" name="delete" />
355                 <field type="BOOL" name="pending" />
356                 <pad bytes="2" />
357                 <reply>
358                         <field type="CARD8" name="format" />
359                         <field type="ATOM" name="type" altenum="Atom" />
360                         <field type="CARD32" name="bytes_after" />
361                         <field type="CARD32" name="num_items" />
362                         <pad bytes="12" />
363                         <list type="BYTE" name="data">
364                                 <!-- n * format / 8 -->
365                                 <op op="*">
366                                         <fieldref>num_items</fieldref>
367                                         <op op="/">
368                                                 <fieldref>format</fieldref>
369                                                 <value>8</value>
370                                         </op>
371                                 </op>
372                         </list>
373                 </reply>
374         </request>
375
376         <request name="CreateMode" opcode="16">
377                 <field type="WINDOW" name="window" />
378                 <field type="ModeInfo" name="mode_info" />
379                 <list type="char" name="name" />
380                 <reply>
381                         <pad bytes="1" />
382                         <field type="MODE" name="mode" />
383                         <pad bytes="20" />
384                 </reply>
385         </request>
386
387         <request name="DestroyMode" opcode="17">
388                 <field type="MODE" name="mode" />
389         </request>
390
391         <request name="AddOutputMode" opcode="18">
392                 <field type="OUTPUT" name="output" />
393                 <field type="MODE" name="mode" />
394         </request>
395
396         <request name="DeleteOutputMode" opcode="19">
397                 <field type="OUTPUT" name="output" />
398                 <field type="MODE" name="mode" />
399         </request>
400
401         <request name="GetCrtcInfo" opcode="20">
402                 <field type="CRTC" name="crtc" />
403                 <field type="TIMESTAMP" name="config_timestamp" />
404                 <reply>
405                         <field type="CARD8" name="status" enum="SetConfig" />
406                         <field type="TIMESTAMP" name="timestamp" />
407                         <field type="INT16" name="x" />
408                         <field type="INT16" name="y" />
409                         <field type="CARD16" name="width" />
410                         <field type="CARD16" name="height" />
411                         <field type="MODE" name="mode" />
412                         <field type="CARD16" name="rotation" mask="Rotation" />
413                         <field type="CARD16" name="rotations" mask="Rotation" />
414                         <field type="CARD16" name="num_outputs" />
415                         <field type="CARD16" name="num_possible_outputs" />
416                         <list type="OUTPUT" name="outputs">
417                                 <fieldref>num_outputs</fieldref>
418                         </list>
419                         <list type="OUTPUT" name="possible">
420                                 <fieldref>num_possible_outputs</fieldref>
421                         </list>
422                 </reply>
423         </request>
424
425         <request name="SetCrtcConfig" opcode="21">
426                 <field type="CRTC" name="crtc" />
427                 <field type="TIMESTAMP" name="timestamp" />
428                 <field type="TIMESTAMP" name="config_timestamp" />
429                 <field type="INT16" name="x" />
430                 <field type="INT16" name="y" />
431                 <field type="MODE" name="mode" />
432                 <field type="CARD16" name="rotation" mask="Rotation" />
433                 <pad bytes="2" />
434                 <list type="OUTPUT" name="outputs" />
435                 <reply>
436                         <field type="CARD8" name="status" enum="SetConfig" />
437                         <field type="TIMESTAMP" name="timestamp" />
438                         <pad bytes="20" />
439                 </reply>
440         </request>
441
442         <request name="GetCrtcGammaSize" opcode="22">
443                 <field type="CRTC" name="crtc" />
444                 <reply>
445                         <pad bytes="1" />
446                         <field type="CARD16" name="size" />
447                         <pad bytes="22" />
448                 </reply>
449         </request>
450
451         <request name="GetCrtcGamma" opcode="23">
452                 <field type="CRTC" name="crtc" />
453                 <reply>
454                         <pad bytes="1" />
455                         <field type="CARD16" name="size" />
456                         <pad bytes="22" />
457                         <list type="CARD16" name="red">
458                                 <fieldref>size</fieldref>
459                         </list>
460                         <list type="CARD16" name="green">
461                                 <fieldref>size</fieldref>
462                         </list>
463                         <list type="CARD16" name="blue">
464                                 <fieldref>size</fieldref>
465                         </list>
466                 </reply>
467         </request>
468
469         <request name="SetCrtcGamma" opcode="24">
470                 <field type="CRTC" name="crtc" />
471                 <field type="CARD16" name="size" />
472                 <pad bytes="2"/>
473                 <list type="CARD16" name="red">
474                         <fieldref>size</fieldref>
475                 </list>
476                 <list type="CARD16" name="green">
477                         <fieldref>size</fieldref>
478                 </list>
479                 <list type="CARD16" name="blue">
480                         <fieldref>size</fieldref>
481                 </list>
482         </request>
483
484         <!-- new in 1.3 -->
485
486         <request name="GetScreenResourcesCurrent" opcode="25">
487                 <field type="WINDOW" name="window" />
488                 <reply>
489                         <pad bytes="1" />
490                         <field type="TIMESTAMP" name="timestamp" />
491                         <field type="TIMESTAMP" name="config_timestamp" />
492                         <field type="CARD16" name="num_crtcs" />
493                         <field type="CARD16" name="num_outputs" />
494                         <field type="CARD16" name="num_modes" />
495                         <field type="CARD16" name="names_len" />
496                         <pad bytes="8" />
497                         <list type="CRTC" name="crtcs">
498                             <fieldref>num_crtcs</fieldref>
499                         </list>
500                         <list type="OUTPUT" name="outputs">
501                             <fieldref>num_outputs</fieldref>
502                         </list>
503                         <list type="ModeInfo" name="modes">
504                             <fieldref>num_modes</fieldref>
505                         </list>
506                         <!-- FIXME: this is *not* null separated!
507                              One must use ModeInfo.name_len from each previous
508                              ModeInfo to infer the position of the name. -->
509                         <list type="BYTE" name="names">
510                             <fieldref>names_len</fieldref>
511                         </list>
512                 </reply>
513         </request>
514
515         <enum name="Transform">
516                 <!-- Introduced in version 1.3, but not referenced. -->
517                 <item name="Unit">       <bit>0</bit></item>
518                 <item name="ScaleUp">    <bit>1</bit></item>
519                 <item name="ScaleDown">  <bit>2</bit></item>
520                 <item name="Projective"> <bit>3</bit></item>
521         </enum>
522
523         <request name="SetCrtcTransform" opcode="26">
524                 <field type="CRTC" name="crtc" />
525                 <field type="TRANSFORM" name="transform" />
526                 <field type="CARD16" name="filter_len" />
527                 <pad bytes="2" />
528                 <list type="char" name="filter_name">
529                         <fieldref>filter_len</fieldref>
530                 </list>
531                 <list type="FIXED" name="filter_params" />
532         </request>
533
534         <request name="GetCrtcTransform" opcode="27">
535                 <field type="CRTC" name="crtc" />
536                 <reply>
537                         <pad bytes="1" />
538                         <field type="TRANSFORM" name="pending_transform" />
539                         <field type="BOOL" name="has_transforms" />
540                         <pad bytes="3" />
541                         <field type="TRANSFORM" name="current_transform" />
542                         <pad bytes="4" />
543                         <field type="CARD16" name="pending_len" />
544                         <field type="CARD16" name="pending_nparams" />
545                         <field type="CARD16" name="current_len" />
546                         <field type="CARD16" name="current_nparams" />
547                         <list type="char" name="pending_filter_name" >
548                                 <fieldref>pending_len</fieldref>
549                         </list>
550                         <list type="FIXED" name="pending_params" >
551                                 <fieldref>pending_nparams</fieldref>
552                         </list>
553                         <list type="char" name="current_filter_name" >
554                                 <fieldref>current_len</fieldref>
555                         </list>
556                         <list type="FIXED" name="current_params" >
557                                 <fieldref>current_nparams</fieldref>
558                         </list>
559                 </reply>
560         </request>
561
562         <request name="GetPanning" opcode="28">
563                 <field type="CRTC" name="crtc" />
564                 <reply>
565                         <field type="CARD8" name="status" enum="SetConfig" />
566                         <field type="TIMESTAMP" name="timestamp" />
567                         <field type="CARD16" name="left" />
568                         <field type="CARD16" name="top" />
569                         <field type="CARD16" name="width" />
570                         <field type="CARD16" name="height" />
571                         <field type="CARD16" name="track_left" />
572                         <field type="CARD16" name="track_top" />
573                         <field type="CARD16" name="track_width" />
574                         <field type="CARD16" name="track_height" />
575                         <field type="INT16" name="border_left" />
576                         <field type="INT16" name="border_top" />
577                         <field type="INT16" name="border_right" />
578                         <field type="INT16" name="border_bottom" />
579                 </reply>
580         </request>
581
582         <request name="SetPanning" opcode="29">
583                 <field type="CRTC" name="crtc" />
584                 <field type="TIMESTAMP" name="timestamp" />
585                 <field type="CARD16" name="left" />
586                 <field type="CARD16" name="top" />
587                 <field type="CARD16" name="width" />
588                 <field type="CARD16" name="height" />
589                 <field type="CARD16" name="track_left" />
590                 <field type="CARD16" name="track_top" />
591                 <field type="CARD16" name="track_width" />
592                 <field type="CARD16" name="track_height" />
593                 <field type="INT16" name="border_left" />
594                 <field type="INT16" name="border_top" />
595                 <field type="INT16" name="border_right" />
596                 <field type="INT16" name="border_bottom" />
597                 <reply>
598                         <field type="CARD8" name="status" enum="SetConfig" />
599                         <field type="TIMESTAMP" name="timestamp" />
600                 </reply>
601         </request>
602
603         <request name="SetOutputPrimary" opcode="30">
604                 <field type="WINDOW" name="window" />
605                 <field type="OUTPUT" name="output" />
606         </request>
607
608         <request name="GetOutputPrimary" opcode="31">
609                 <field type="WINDOW" name="window" />
610                 <reply>
611                         <pad bytes="1" />
612                         <field type="OUTPUT" name="output" />
613                 </reply>
614         </request>
615
616         <!-- New in version 1.4 -->
617
618         <request name="GetProviders" opcode="32">
619                 <field type="WINDOW" name="window" />
620                 <reply>
621                         <pad bytes="1" />
622                         <field type="TIMESTAMP" name="timestamp" />
623                         <field type="CARD16" name="num_providers" />
624                         <pad bytes="18" />
625                         <list type="PROVIDER" name="providers">
626                                 <fieldref>num_providers</fieldref>
627                         </list>
628                 </reply>
629         </request>
630
631         <enum name="ProviderCapability">
632                 <item name="SourceOutput">  <bit>0</bit></item>
633                 <item name="SinkOutput">    <bit>1</bit></item>
634                 <item name="SourceOffload"> <bit>2</bit></item>
635                 <item name="SinkOffload">   <bit>3</bit></item>
636         </enum>
637
638         <request name="GetProviderInfo" opcode="33">
639                 <field type="PROVIDER" name="provider" />
640                 <field type="TIMESTAMP" name="config_timestamp" />
641                 <reply>
642                         <field type="CARD8" name="status" />
643                         <field type="TIMESTAMP" name="timestamp" />
644                         <field type="CARD32" name="capabilities" mask="ProviderCapability" />
645                         <field type="CARD16" name="num_crtcs" />
646                         <field type="CARD16" name="num_outputs" />
647                         <field type="CARD16" name="num_associated_providers" />
648                         <field type="CARD16" name="name_len" />
649                         <pad bytes="8" />
650                         <list type="CRTC" name="crtcs">
651                                 <fieldref>num_crtcs</fieldref>
652                         </list>
653                         <list type="OUTPUT" name="outputs">
654                                 <fieldref>num_outputs</fieldref>
655                         </list>
656                         <list type="PROVIDER" name="associated_providers">
657                                 <fieldref>num_associated_providers</fieldref>
658                         </list>
659                         <list type="CARD32" name="associated_capability">
660                                 <fieldref>num_associated_providers</fieldref>
661                         </list>
662                         <list type="char" name="name">
663                                 <fieldref>name_len</fieldref>
664                         </list>
665                         <!-- XXX: Prepared for the future. Until xcbgen supports
666                                   the align attribute in <pad>, we ignore the
667                                   trailing pad bytes here.
668                         <pad align="4" />
669                         -->
670                 </reply>
671         </request>
672
673         <request name="SetProviderOffloadSink" opcode="34">
674                 <field type="PROVIDER" name="provider" />
675                 <field type="PROVIDER" name="sink_provider" />
676                 <field type="TIMESTAMP" name="config_timestamp" />
677         </request>
678
679         <request name="SetProviderOutputSource" opcode="35">
680                 <field type="PROVIDER" name="provider" />
681                 <field type="PROVIDER" name="source_provider" />
682                 <field type="TIMESTAMP" name="config_timestamp" />
683         </request>
684
685         <request name="ListProviderProperties" opcode="36">
686                 <field type="PROVIDER" name="provider" />
687                 <reply>
688                         <pad bytes="1" />
689                         <field type="CARD16" name="num_atoms" />
690                         <pad bytes="22" />
691                         <list type="ATOM" name="atoms">
692                                 <fieldref>num_atoms</fieldref>
693                         </list>
694                 </reply>
695         </request>
696
697         <request name="QueryProviderProperty" opcode="37">
698                 <field type="PROVIDER" name="provider" />
699                 <field type="ATOM" name="property" />
700                 <reply>
701                         <pad bytes="1" />
702                         <field type="BOOL" name="pending" />
703                         <field type="BOOL" name="range" />
704                         <field type="BOOL" name="immutable" />
705                         <pad bytes="21" />
706                         <list type="INT32" name="valid_values">
707                                 <fieldref>length</fieldref>
708                         </list>
709                 </reply>
710         </request>
711
712         <request name="ConfigureProviderProperty" opcode="38">
713                 <field type="PROVIDER" name="provider" />
714                 <field type="ATOM" name="property" />
715                 <field type="BOOL" name="pending" />
716                 <field type="BOOL" name="range" />
717                 <pad bytes="2" />
718                 <list type="INT32" name="values" />
719         </request>
720
721         <request name="ChangeProviderProperty" opcode="39">
722                 <field type="PROVIDER" name="provider" />
723                 <field type="ATOM" name="property" />
724                 <field type="ATOM" name="type" />
725                 <field type="CARD8" name="format" />
726                 <field type="CARD8" name="mode" />
727                 <pad bytes="2" />
728                 <field type="CARD32" name="num_items" />
729                 <list type="void" name="data">
730                         <op op="*">
731                                 <fieldref>num_items</fieldref>
732                                 <op op="/">
733                                         <fieldref>format</fieldref>
734                                         <value>8</value>
735                                 </op>
736                         </op>
737                 </list>
738         </request>
739
740         <request name="DeleteProviderProperty" opcode="40">
741                 <field type="PROVIDER" name="provider" />
742                 <field type="ATOM" name="property" />
743         </request>
744
745         <request name="GetProviderProperty" opcode="41">
746                 <field type="PROVIDER" name="provider" />
747                 <field type="ATOM" name="property" />
748                 <field type="ATOM" name="type" /> <!-- AnyProperty -->
749                 <field type="CARD32" name="long_offset" />
750                 <field type="CARD32" name="long_length" />
751                 <field type="BOOL" name="delete" />
752                 <field type="BOOL" name="pending" />
753                 <pad bytes="2" />
754                 <reply>
755                         <pad bytes="1" />
756                         <field type="CARD8" name="format" />
757                         <field type="ATOM" name="type" /> <!-- None -->
758                         <field type="CARD32" name="bytes_after" />
759                         <field type="CARD16" name="num_items" />
760                         <pad bytes="12" />
761                         <list type="void" name="data">
762                                 <op op="*">
763                                         <fieldref>num_items</fieldref>
764                                         <op op="/">
765                                                 <fieldref>format</fieldref>
766                                                 <value>8</value>
767                                         </op>
768                                 </op>
769                         </list>
770                 </reply>
771         </request>
772
773         <!-- Events -->
774
775         <event name="ScreenChangeNotify" number="0">
776                 <field type="CARD8" name="rotation" mask="Rotation" />
777                 <field type="TIMESTAMP" name="timestamp" />
778                 <field type="TIMESTAMP" name="config_timestamp" />
779                 <field type="WINDOW" name="root" />
780                 <field type="WINDOW" name="request_window" />
781                 <field type="CARD16" name="sizeID" />
782                 <field type="CARD16" name="subpixel_order" enum="SubPixel" />
783                 <field type="CARD16" name="width" />
784                 <field type="CARD16" name="height" />
785                 <field type="CARD16" name="mwidth" />
786                 <field type="CARD16" name="mheight" />
787         </event>
788
789         <!-- New in version 1.2 -->
790
791         <!-- subcode -->
792         <enum name="Notify" >
793                 <item name="CrtcChange">      <value>0</value></item>
794                 <item name="OutputChange">    <value>1</value></item>
795                 <item name="OutputProperty">  <value>2</value></item>
796                 <item name="ProviderChange">  <value>3</value></item>
797                 <item name="ProviderProperty"><value>4</value></item>
798                 <item name="ResourceChange">  <value>5</value></item>
799         </enum>
800
801         <struct name="CrtcChange">
802                 <field type="TIMESTAMP" name="timestamp" />
803                 <field type="WINDOW" name="window" />
804                 <field type="CRTC" name="crtc" />
805                 <field type="MODE" name="mode" />
806                 <field type="CARD16" name="rotation" mask="Rotation" />
807                 <pad bytes="2" />
808                 <field type="INT16" name="x" />
809                 <field type="INT16" name="y" />
810                 <field type="CARD16" name="width" />
811                 <field type="CARD16" name="height" />
812         </struct>
813
814         <struct name="OutputChange">
815                 <field type="TIMESTAMP" name="timestamp" />
816                 <field type="TIMESTAMP" name="config_timestamp" />
817                 <field type="WINDOW" name="window" />
818                 <field type="OUTPUT" name="output" />
819                 <field type="CRTC" name="crtc" />
820                 <field type="MODE" name="mode" />
821                 <field type="CARD16" name="rotation" mask="Rotation" />
822                 <field type="CARD8" name="connection" enum="Connection" />
823                 <field type="CARD8" name="subpixel_order" enum="SubPixel" />
824         </struct>
825
826         <struct name="OutputProperty">
827                 <field type="WINDOW" name="window" />
828                 <field type="OUTPUT" name="output" />
829                 <field type="ATOM" name="atom" />
830                 <field type="TIMESTAMP" name="timestamp" />
831                 <field type="CARD8" name="status" enum="Property" />
832                 <pad bytes="11" />
833         </struct>
834
835         <!-- New in version 1.4 -->
836
837         <struct name="ProviderChange">
838                 <field type="TIMESTAMP" name="timestamp" />
839                 <field type="WINDOW" name="window" />
840                 <field type="PROVIDER" name="provider" />
841                 <pad bytes="16" />
842         </struct>
843
844         <struct name="ProviderProperty">
845                 <field type="WINDOW" name="window" />
846                 <field type="PROVIDER" name="provider" />
847                 <field type="ATOM" name="atom" />
848                 <field type="TIMESTAMP" name="timestamp" />
849                 <field type="CARD8" name="state" />
850                 <pad bytes="11" />
851         </struct>
852
853         <struct name="ResourceChange">
854                 <field type="TIMESTAMP" name="timestamp" />
855                 <field type="WINDOW" name="window" />
856                 <pad bytes="20" />
857         </struct>
858
859         <union name="NotifyData">
860                 <field type="CrtcChange"       name="cc" />
861                 <field type="OutputChange"     name="oc" />
862                 <field type="OutputProperty"   name="op" />
863                 <field type="ProviderChange"   name="pc" />
864                 <field type="ProviderProperty" name="pp" />
865                 <field type="ResourceChange"   name="rc" />
866         </union>
867
868         <event name="Notify" number="1">
869                 <field type="CARD8" name="subCode" enum="Notify" />
870                 <field type="NotifyData" name="u" />
871         </event>
872 </xcb>