Remove now unnecessary files as everything is implemented in xcbgen.
[free-sw/xcb/proto] / src / render.xml
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" />
15     <item name="Direct" />
16   </enum>
17
18   <enum name="Picture">
19     <item name="None" />
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" />
26     <item name="Src" />
27     <item name="Dst" />
28     <item name="Over" />
29     <item name="OverReverse" />
30     <item name="In" />
31     <item name="InReverse" />
32     <item name="Out" />
33     <item name="OutReverse" />
34     <item name="Atop" />
35     <item name="AtopReverse" />
36     <item name="Xor" />
37     <item name="Add" />
38     <item name="Saturate" />
39     
40     <item name="DisjointClear"><value>16</value></item>
41     <item name="DisjointSrc" />
42     <item name="DisjointDst" />
43     <item name="DisjointOver" />
44     <item name="DisjointOverReverse" />
45     <item name="DisjointIn" />
46     <item name="DisjointInReverse" />
47     <item name="DisjointOut" />
48     <item name="DisjointOutReverse" />
49     <item name="DisjointAtop" />
50     <item name="DisjointAtopReverse" />
51     <item name="DisjointXor" />
52     
53     <item name="ConjointClear"><value>32</value></item>
54     <item name="ConjointSrc" />
55     <item name="ConjointDst" />
56     <item name="ConjointOver" />
57     <item name="ConjointOverReverse" />
58     <item name="ConjointIn" />
59     <item name="ConjointInReverse" />
60     <item name="ConjointOut" />
61     <item name="ConjointOutReverse" />
62     <item name="ConjointAtop" />
63     <item name="ConjointAtopReverse" />
64     <item name="ConjointXor" />
65
66     <!-- PDF blend modes are new in version 0.11 -->
67     <item name="Multiply"><value>48</value></item>
68     <item name="Screen" />
69     <item name="Overlay" />
70     <item name="Darken" />
71     <item name="Lighten" />
72     <item name="ColorDodge" />
73     <item name="ColorBurn" />
74     <item name="HardLight" />
75     <item name="SoftLight" />
76     <item name="Difference" />
77     <item name="Exclusion" />
78     <item name="HSLHue" />
79     <item name="HSLSaturation" />
80     <item name="HSLColor" />
81     <item name="HSLLuminosity" />
82   </enum>
83
84   <enum name="PolyEdge">
85     <item name="Sharp" />
86     <item name="Smooth" />
87   </enum>
88
89   <enum name="PolyMode">
90     <item name="Precise" />
91     <item name="Imprecise" />
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" />
112     <item name="HorizontalRGB" />
113     <item name="HorizontalBGR" />
114     <item name="VerticalRGB" />
115     <item name="VerticalBGR" />
116     <item name="None" />
117   </enum>
118
119   <!-- Extended repeat attributes introduced in 0.10 -->
120   <enum name="Repeat">
121     <item name="None" />
122     <item name="Normal" />
123     <item name="Pad" />
124     <item name="Reflect" />
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     <valueparam value-mask-type="CARD32"
284                 value-mask-name="value_mask"
285                 value-list-name="value_list" />
286   </request>
287
288   <request name="ChangePicture" opcode="5">
289     <field type="PICTURE" name="picture" />
290     <valueparam value-mask-type="CARD32"
291                 value-mask-name="value_mask"
292                 value-list-name="value_list" />
293   </request>
294
295   <request name="SetPictureClipRectangles" opcode="6">
296     <field type="PICTURE" name="picture" />
297     <field type="INT16" name="clip_x_origin" />
298     <field type="INT16" name="clip_y_origin" />
299     <list type="RECTANGLE" name="rectangles" />
300   </request>
301
302   <request name="FreePicture" opcode="7">
303     <field type="PICTURE" name="picture" />
304   </request>
305
306   <request name="Composite" opcode="8">
307     <field type="CARD8" name="op" enum="PictOp" />
308     <pad bytes="3" />
309     <field type="PICTURE" name="src" />
310     <field type="PICTURE" name="mask" altenum="Picture" />
311     <field type="PICTURE" name="dst" />
312     <field type="INT16" name="src_x" />
313     <field type="INT16" name="src_y" />
314     <field type="INT16" name="mask_x" />
315     <field type="INT16" name="mask_y" />
316     <field type="INT16" name="dst_x" />
317     <field type="INT16" name="dst_y" />
318     <field type="CARD16" name="width" />
319     <field type="CARD16" name="height" />
320   </request>
321
322   <!-- opcode 9 reserved for Scale -->
323
324   <request name="Trapezoids" opcode="10">
325     <field type="CARD8" name="op" enum="PictOp" />
326     <pad bytes="3" />
327     <field type="PICTURE" name="src" />
328     <field type="PICTURE" name="dst" />
329     <field type="PICTFORMAT" name="mask_format" />
330     <field type="INT16" name="src_x" />
331     <field type="INT16" name="src_y" />
332     <list type="TRAPEZOID" name="traps" />
333   </request>
334
335   <request name="Triangles" opcode="11">
336     <field type="CARD8" name="op" enum="PictOp" />
337     <pad bytes="3" />
338     <field type="PICTURE" name="src" />
339     <field type="PICTURE" name="dst" />
340     <field type="PICTFORMAT" name="mask_format" />
341     <field type="INT16" name="src_x" />
342     <field type="INT16" name="src_y" />
343     <list type="TRIANGLE" name="triangles" />
344   </request>
345
346   <request name="TriStrip" opcode="12">
347     <field type="CARD8" name="op" enum="PictOp" />
348     <pad bytes="3" />
349     <field type="PICTURE" name="src" />
350     <field type="PICTURE" name="dst" />
351     <field type="PICTFORMAT" name="mask_format" />
352     <field type="INT16" name="src_x" />
353     <field type="INT16" name="src_y" />
354     <list type="POINTFIX" name="points" />
355   </request>
356
357   <request name="TriFan" opcode="13">
358     <field type="CARD8" name="op" enum="PictOp" />
359     <pad bytes="3" />
360     <field type="PICTURE" name="src" />
361     <field type="PICTURE" name="dst" />
362     <field type="PICTFORMAT" name="mask_format" />
363     <field type="INT16" name="src_x" />
364     <field type="INT16" name="src_y" />
365     <list type="POINTFIX" name="points" />
366   </request>
367
368   <!-- opcode 14 reserved for ColorTrapezoids -->
369
370   <!-- opcode 15 reserved for ColorTriangles -->
371
372   <!-- opcode 16 reserved for Transform -->
373
374   <request name="CreateGlyphSet" opcode="17">
375     <field type="GLYPHSET" name="gsid" />
376     <field type="PICTFORMAT" name="format" />
377   </request>
378
379   <request name="ReferenceGlyphSet" opcode="18">
380     <field type="GLYPHSET" name="gsid" />
381     <field type="GLYPHSET" name="existing" />
382   </request>
383
384   <request name="FreeGlyphSet" opcode="19">
385     <field type="GLYPHSET" name="glyphset" />
386   </request>
387
388   <request name="AddGlyphs" opcode="20">
389     <field type="GLYPHSET" name="glyphset" />
390     <field type="CARD32" name="glyphs_len" />
391     <list type="CARD32" name="glyphids">
392       <fieldref>glyphs_len</fieldref>
393     </list>
394     <list type="GLYPHINFO" name="glyphs">
395       <fieldref>glyphs_len</fieldref>
396     </list>
397     <list type="BYTE" name="data" />
398   </request>
399
400   <!-- opcode 21 reserved for AddGlyphsFromPicture -->
401
402   <request name="FreeGlyphs" opcode="22">
403     <field type="GLYPHSET" name="glyphset" />
404     <list type="GLYPH" name="glyphs" />
405   </request>
406
407   <request name="CompositeGlyphs8" opcode="23">
408     <field type="CARD8" name="op" enum="PictOp" />
409     <pad bytes="3" />
410     <field type="PICTURE" name="src" />
411     <field type="PICTURE" name="dst" />
412     <field type="PICTFORMAT" name="mask_format" />
413     <field type="GLYPHSET" name="glyphset" />
414     <field type="INT16" name="src_x" />
415     <field type="INT16" name="src_y" />
416     <list type="BYTE" name="glyphcmds" />
417   </request>
418
419   <request name="CompositeGlyphs16" opcode="24">
420     <field type="CARD8" name="op" enum="PictOp" />
421     <pad bytes="3" />
422     <field type="PICTURE" name="src" />
423     <field type="PICTURE" name="dst" />
424     <field type="PICTFORMAT" name="mask_format" />
425     <field type="GLYPHSET" name="glyphset" />
426     <field type="INT16" name="src_x" />
427     <field type="INT16" name="src_y" />
428     <list type="BYTE" name="glyphcmds" />
429   </request>
430
431   <request name="CompositeGlyphs32" opcode="25">
432     <field type="CARD8" name="op" enum="PictOp" />
433     <pad bytes="3" />
434     <field type="PICTURE" name="src" />
435     <field type="PICTURE" name="dst" />
436     <field type="PICTFORMAT" name="mask_format" />
437     <field type="GLYPHSET" name="glyphset" />
438     <field type="INT16" name="src_x" />
439     <field type="INT16" name="src_y" />
440     <list type="BYTE" name="glyphcmds" />
441   </request>
442
443   <!-- new in version 0.1 -->
444
445   <request name="FillRectangles" opcode="26">
446     <field type="CARD8" name="op" enum="PictOp" />
447     <pad bytes="3" />
448     <field type="PICTURE" name="dst" />
449     <field type="COLOR" name="color" />
450     <list type="RECTANGLE" name="rects" />
451   </request>
452
453   <!-- new in version 0.5 -->
454
455   <request name="CreateCursor" opcode="27">
456     <field type="CURSOR" name="cid" />
457     <field type="PICTURE" name="source" />
458     <field type="CARD16" name="x" />
459     <field type="CARD16" name="y" />
460   </request>
461
462   <!-- new in version 0.6 -->
463
464   <struct name="TRANSFORM">
465     <field type="FIXED" name="matrix11" />
466     <field type="FIXED" name="matrix12" />
467     <field type="FIXED" name="matrix13" />
468     <field type="FIXED" name="matrix21" />
469     <field type="FIXED" name="matrix22" />
470     <field type="FIXED" name="matrix23" />
471     <field type="FIXED" name="matrix31" />
472     <field type="FIXED" name="matrix32" />
473     <field type="FIXED" name="matrix33" />
474   </struct>
475
476   <request name="SetPictureTransform" opcode="28">
477     <field type="PICTURE" name="picture" />
478     <field type="TRANSFORM" name="transform" />
479   </request>
480
481   <request name="QueryFilters" opcode="29">
482     <field type="DRAWABLE" name="drawable" />
483     <reply>
484       <pad bytes="1" />
485       <field type="CARD32" name="num_aliases" />
486       <field type="CARD32" name="num_filters" />
487       <pad bytes="16" />
488       <list type="CARD16" name="aliases">
489         <fieldref>num_aliases</fieldref>
490       </list>
491       <list type="STR" name="filters">
492         <fieldref>num_filters</fieldref>
493       </list>
494     </reply>
495   </request>
496
497   <request name="SetPictureFilter" opcode="30">
498     <field type="PICTURE" name="picture" />
499     <field type="CARD16" name="filter_len" />
500     <pad bytes="2" />
501     <list type="char" name="filter">
502       <fieldref>filter_len</fieldref>
503     </list>
504     <list type="FIXED" name="values" />
505   </request>
506
507   <!-- new in version 0.8 -->
508
509   <struct name="ANIMCURSORELT">
510     <field type="CURSOR" name="cursor" />
511     <field type="CARD32" name="delay" />
512   </struct>
513
514   <request name="CreateAnimCursor" opcode="31">
515     <field type="CURSOR" name="cid" />
516     <list type="ANIMCURSORELT" name="cursors" />
517   </request>
518
519   <!-- new in version 0.9 -->
520  
521   <struct name="SPANFIX">
522     <field type="FIXED" name="l" />
523     <field type="FIXED" name="r" />
524     <field type="FIXED" name="y" />
525   </struct>
526
527   <struct name="TRAP">
528     <field type="SPANFIX" name="top" />
529     <field type="SPANFIX" name="bot" />
530   </struct>
531
532   <request name="AddTraps" opcode="32">
533     <field type="PICTURE" name="picture" />
534     <field type="INT16" name="x_off" />
535     <field type="INT16" name="y_off" />
536     <list type="TRAP" name="traps" />
537   </request>
538   
539   <!-- new in version 0.10 -->
540
541   <request name="CreateSolidFill" opcode="33">
542     <field type="PICTURE" name="picture" />
543     <field type="COLOR" name="color" />
544   </request>
545
546   <request name="CreateLinearGradient" opcode="34">
547     <field type="PICTURE" name="picture" />
548     <field type="POINTFIX" name="p1" />
549     <field type="POINTFIX" name="p2" />
550     <field type="CARD32" name="num_stops" />
551     <list type="FIXED" name="stops">
552       <fieldref>num_stops</fieldref>
553     </list>
554     <list type="COLOR" name="colors">
555       <fieldref>num_stops</fieldref>
556     </list>
557   </request>
558
559   <request name="CreateRadialGradient" opcode="35">
560     <field type="PICTURE" name="picture" />
561     <field type="POINTFIX" name="inner" />
562     <field type="POINTFIX" name="outer" />
563     <field type="FIXED" name="inner_radius" />
564     <field type="FIXED" name="outer_radius" />
565     <field type="CARD32" name="num_stops" />
566     <list type="FIXED" name="stops">
567       <fieldref>num_stops</fieldref>
568     </list>
569     <list type="COLOR" name="colors">
570       <fieldref>num_stops</fieldref>
571     </list>
572   </request>
573
574   <request name="CreateConicalGradient" opcode="36">
575     <field type="PICTURE" name="picture" />
576     <field type="POINTFIX" name="center" />
577     <field type="FIXED" name="angle" />        <!-- degrees -->
578     <field type="CARD32" name="num_stops" />
579     <list type="FIXED" name="stops">
580       <fieldref>num_stops</fieldref>
581     </list>
582     <list type="COLOR" name="colors">
583       <fieldref>num_stops</fieldref>
584     </list>
585   </request>
586 </xcb>