xref: /aoo42x/main/x11_extensions/inc/render.h (revision cdf0e10c)
1 /*
2  * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $
3  *
4  * Copyright © 2000 SuSE, Inc.
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of SuSE not be used in advertising or
11  * publicity pertaining to distribution of the software without specific,
12  * written prior permission.  SuSE makes no representations about the
13  * suitability of this software for any purpose.  It is provided "as is"
14  * without express or implied warranty.
15  *
16  * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
18  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22  *
23  * Author:  Keith Packard, SuSE, Inc.
24  */
25 
26 #ifndef _RENDER_H_
27 #define _RENDER_H_
28 
29 typedef XID		Glyph;
30 typedef XID		GlyphSet;
31 typedef XID		Picture;
32 typedef XID		PictFormat;
33 
34 #define RENDER_NAME	"RENDER"
35 #define RENDER_MAJOR	0
36 #define RENDER_MINOR	10
37 
38 #define X_RenderQueryVersion		    0
39 #define X_RenderQueryPictFormats	    1
40 #define X_RenderQueryPictIndexValues	    2	/* 0.7 */
41 #define X_RenderQueryDithers		    3
42 #define X_RenderCreatePicture		    4
43 #define X_RenderChangePicture		    5
44 #define X_RenderSetPictureClipRectangles    6
45 #define X_RenderFreePicture		    7
46 #define X_RenderComposite		    8
47 #define X_RenderScale			    9
48 #define X_RenderTrapezoids		    10
49 #define X_RenderTriangles		    11
50 #define X_RenderTriStrip		    12
51 #define X_RenderTriFan			    13
52 #define X_RenderColorTrapezoids		    14
53 #define X_RenderColorTriangles		    15
54 /* #define X_RenderTransform		    16 */
55 #define X_RenderCreateGlyphSet		    17
56 #define X_RenderReferenceGlyphSet	    18
57 #define X_RenderFreeGlyphSet		    19
58 #define X_RenderAddGlyphs		    20
59 #define X_RenderAddGlyphsFromPicture	    21
60 #define X_RenderFreeGlyphs		    22
61 #define X_RenderCompositeGlyphs8	    23
62 #define X_RenderCompositeGlyphs16	    24
63 #define X_RenderCompositeGlyphs32	    25
64 #define X_RenderFillRectangles		    26
65 /* 0.5 */
66 #define X_RenderCreateCursor		    27
67 /* 0.6 */
68 #define X_RenderSetPictureTransform	    28
69 #define X_RenderQueryFilters		    29
70 #define X_RenderSetPictureFilter	    30
71 /* 0.8 */
72 #define X_RenderCreateAnimCursor	    31
73 /* 0.9 */
74 #define X_RenderAddTraps		    32
75 /* 0.10 */
76 #define X_RenderCreateSolidFill             33
77 #define X_RenderCreateLinearGradient        34
78 #define X_RenderCreateRadialGradient        35
79 #define X_RenderCreateConicalGradient       36
80 #define RenderNumberRequests		    (X_RenderCreateConicalGradient+1)
81 
82 #define BadPictFormat			    0
83 #define BadPicture			    1
84 #define BadPictOp			    2
85 #define BadGlyphSet			    3
86 #define BadGlyph			    4
87 #define RenderNumberErrors		    (BadGlyph+1)
88 
89 #define PictTypeIndexed			    0
90 #define PictTypeDirect			    1
91 
92 #define PictOpMinimum			    0
93 #define PictOpClear			    0
94 #define PictOpSrc			    1
95 #define PictOpDst			    2
96 #define PictOpOver			    3
97 #define PictOpOverReverse		    4
98 #define PictOpIn			    5
99 #define PictOpInReverse			    6
100 #define PictOpOut			    7
101 #define PictOpOutReverse		    8
102 #define PictOpAtop			    9
103 #define PictOpAtopReverse		    10
104 #define PictOpXor			    11
105 #define PictOpAdd			    12
106 #define PictOpSaturate			    13
107 #define PictOpMaximum			    13
108 
109 /*
110  * Operators only available in version 0.2
111  */
112 #define PictOpDisjointMinimum			    0x10
113 #define PictOpDisjointClear			    0x10
114 #define PictOpDisjointSrc			    0x11
115 #define PictOpDisjointDst			    0x12
116 #define PictOpDisjointOver			    0x13
117 #define PictOpDisjointOverReverse		    0x14
118 #define PictOpDisjointIn			    0x15
119 #define PictOpDisjointInReverse			    0x16
120 #define PictOpDisjointOut			    0x17
121 #define PictOpDisjointOutReverse		    0x18
122 #define PictOpDisjointAtop			    0x19
123 #define PictOpDisjointAtopReverse		    0x1a
124 #define PictOpDisjointXor			    0x1b
125 #define PictOpDisjointMaximum			    0x1b
126 
127 #define PictOpConjointMinimum			    0x20
128 #define PictOpConjointClear			    0x20
129 #define PictOpConjointSrc			    0x21
130 #define PictOpConjointDst			    0x22
131 #define PictOpConjointOver			    0x23
132 #define PictOpConjointOverReverse		    0x24
133 #define PictOpConjointIn			    0x25
134 #define PictOpConjointInReverse			    0x26
135 #define PictOpConjointOut			    0x27
136 #define PictOpConjointOutReverse		    0x28
137 #define PictOpConjointAtop			    0x29
138 #define PictOpConjointAtopReverse		    0x2a
139 #define PictOpConjointXor			    0x2b
140 #define PictOpConjointMaximum			    0x2b
141 
142 #define PolyEdgeSharp			    0
143 #define PolyEdgeSmooth			    1
144 
145 #define PolyModePrecise			    0
146 #define PolyModeImprecise		    1
147 
148 #define CPRepeat			    (1 << 0)
149 #define CPAlphaMap			    (1 << 1)
150 #define CPAlphaXOrigin			    (1 << 2)
151 #define CPAlphaYOrigin			    (1 << 3)
152 #define CPClipXOrigin			    (1 << 4)
153 #define CPClipYOrigin			    (1 << 5)
154 #define CPClipMask			    (1 << 6)
155 #define CPGraphicsExposure		    (1 << 7)
156 #define CPSubwindowMode			    (1 << 8)
157 #define CPPolyEdge			    (1 << 9)
158 #define CPPolyMode			    (1 << 10)
159 #define CPDither			    (1 << 11)
160 #define CPComponentAlpha		    (1 << 12)
161 #define CPLastBit			    12
162 
163 /* Filters included in 0.6 */
164 #define FilterNearest			    "nearest"
165 #define FilterBilinear			    "bilinear"
166 /* Filters included in 0.10 */
167 #define FilterConvolution		    "convolution"
168 
169 #define FilterFast			    "fast"
170 #define FilterGood			    "good"
171 #define FilterBest			    "best"
172 
173 #define FilterAliasNone			    -1
174 
175 /* Subpixel orders included in 0.6 */
176 #define SubPixelUnknown			    0
177 #define SubPixelHorizontalRGB		    1
178 #define SubPixelHorizontalBGR		    2
179 #define SubPixelVerticalRGB		    3
180 #define SubPixelVerticalBGR		    4
181 #define SubPixelNone			    5
182 
183 /* Extended repeat attributes included in 0.10 */
184 #define RepeatNone                          0
185 #define RepeatNormal                        1
186 #define RepeatPad                           2
187 #define RepeatReflect                       3
188 
189 #endif	/* _RENDER_H_ */
190