PageRenderTime 34ms CodeModel.GetById 2ms app.highlight 28ms RepoModel.GetById 1ms app.codeStats 1ms

/binding/x/render.d

http://github.com/wilkie/djehuty
D | 313 lines | 132 code | 133 blank | 48 comment | 0 complexity | 9f6a02fc49ac6cd76e25e514af46eb41 MD5 | raw file
  1/*
  2 * render.d
  3 *
  4 * This file holds bindings to 'render'. This file was created from render.h
  5 * which is provided with xrender proper. The original copyright notice is
  6 * displayed below, but does not pertain to this file.
  7 *
  8 * Author: Dave Wilkinson
  9 *
 10 */
 11
 12/* Converted to D from render.h by htod */
 13
 14module binding.x.render;
 15
 16/*
 17 * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $
 18 *
 19 * Copyright © 2000 SuSE, Inc.
 20 *
 21 * Permission to use, copy, modify, distribute, and sell this software and its
 22 * documentation for any purpose is hereby granted without fee, provided that
 23 * the above copyright notice appear in all copies and that both that
 24 * copyright notice and this permission notice appear in supporting
 25 * documentation, and that the name of SuSE not be used in advertising or
 26 * publicity pertaining to distribution of the software without specific,
 27 * written prior permission.  SuSE makes no representations about the
 28 * suitability of this software for any purpose.  It is provided "as is"
 29 * without express or implied warranty.
 30 *
 31 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
 33 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 34 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 35 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 36 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 37 *
 38 * Author:  Keith Packard, SuSE, Inc.
 39 */
 40
 41import binding.x.X;
 42
 43extern (C):
 44alias XID Glyph;
 45alias XID GlyphSet;
 46alias XID Picture;
 47alias XID PictFormat;
 48
 49const auto RENDER_NAME = "RENDER";
 50const auto RENDER_MAJOR = 0;
 51const auto RENDER_MINOR = 10;
 52
 53const auto X_RenderQueryVersion = 0;
 54
 55const auto X_RenderQueryPictFormats = 1;
 56
 57const auto X_RenderQueryPictIndexValues = 2;
 58
 59const auto X_RenderQueryDithers = 3;
 60
 61const auto X_RenderCreatePicture = 4;
 62
 63const auto X_RenderChangePicture = 5;
 64
 65const auto X_RenderSetPictureClipRectangles = 6;
 66
 67const auto X_RenderFreePicture = 7;
 68
 69const auto X_RenderComposite = 8;
 70
 71const auto X_RenderScale = 9;
 72
 73const auto X_RenderTrapezoids = 10;
 74
 75const auto X_RenderTriangles = 11;
 76
 77const auto X_RenderTriStrip = 12;
 78
 79const auto X_RenderTriFan = 13;
 80
 81const auto X_RenderColorTrapezoids = 14;
 82
 83const auto X_RenderColorTriangles = 15;
 84
 85/* #define X_RenderTransform		    16 */
 86
 87const auto X_RenderCreateGlyphSet = 17;
 88
 89const auto X_RenderReferenceGlyphSet = 18;
 90
 91const auto X_RenderFreeGlyphSet = 19;
 92
 93const auto X_RenderAddGlyphs = 20;
 94
 95const auto X_RenderAddGlyphsFromPicture = 21;
 96
 97const auto X_RenderFreeGlyphs = 22;
 98
 99const auto X_RenderCompositeGlyphs8 = 23;
100
101const auto X_RenderCompositeGlyphs16 = 24;
102
103const auto X_RenderCompositeGlyphs32 = 25;
104/* 0.5 */
105const auto X_RenderFillRectangles = 26;
106
107/* 0.6 */
108const auto X_RenderCreateCursor = 27;
109
110
111const auto X_RenderSetPictureTransform = 28;
112
113const auto X_RenderQueryFilters = 29;
114/* 0.8 */
115const auto X_RenderSetPictureFilter = 30;
116
117/* 0.9 */
118const auto X_RenderCreateAnimCursor = 31;
119
120/* 0.10 */
121const auto X_RenderAddTraps = 32;
122
123
124const auto X_RenderCreateSolidFill = 33;
125
126const auto X_RenderCreateLinearGradient = 34;
127
128const auto X_RenderCreateRadialGradient = 35;
129
130const auto X_RenderCreateConicalGradient = 36;
131
132
133
134
135const auto BadPictFormat = 0;
136
137const auto BadPicture = 1;
138
139const auto BadPictOp = 2;
140
141const auto BadGlyphSet = 3;
142
143const auto BadGlyph = 4;
144
145
146const auto PictTypeIndexed = 0;
147
148const auto PictTypeDirect = 1;
149
150
151const auto PictOpMinimum = 0;
152
153const auto PictOpClear = 0;
154
155const auto PictOpSrc = 1;
156
157const auto PictOpDst = 2;
158
159const auto PictOpOver = 3;
160
161const auto PictOpOverReverse = 4;
162
163const auto PictOpIn = 5;
164
165const auto PictOpInReverse = 6;
166
167const auto PictOpOut = 7;
168
169const auto PictOpOutReverse = 8;
170
171const auto PictOpAtop = 9;
172
173const auto PictOpAtopReverse = 10;
174
175const auto PictOpXor = 11;
176
177const auto PictOpAdd = 12;
178
179const auto PictOpSaturate = 13;
180
181const auto PictOpMaximum = 13;
182
183/*
184 * Operators only available in version 0.2
185 */
186
187const auto PictOpDisjointMinimum = 0x10;
188
189const auto PictOpDisjointClear = 0x10;
190
191const auto PictOpDisjointSrc = 0x11;
192
193const auto PictOpDisjointDst = 0x12;
194
195const auto PictOpDisjointOver = 0x13;
196
197const auto PictOpDisjointOverReverse = 0x14;
198
199const auto PictOpDisjointIn = 0x15;
200
201const auto PictOpDisjointInReverse = 0x16;
202
203const auto PictOpDisjointOut = 0x17;
204
205const auto PictOpDisjointOutReverse = 0x18;
206
207const auto PictOpDisjointAtop = 0x19;
208
209const auto PictOpDisjointAtopReverse = 0x1a;
210
211const auto PictOpDisjointXor = 0x1b;
212
213const auto PictOpDisjointMaximum = 0x1b;
214
215
216const auto PictOpConjointMinimum = 0x20;
217
218const auto PictOpConjointClear = 0x20;
219
220const auto PictOpConjointSrc = 0x21;
221
222const auto PictOpConjointDst = 0x22;
223
224const auto PictOpConjointOver = 0x23;
225
226const auto PictOpConjointOverReverse = 0x24;
227
228const auto PictOpConjointIn = 0x25;
229
230const auto PictOpConjointInReverse = 0x26;
231
232const auto PictOpConjointOut = 0x27;
233
234const auto PictOpConjointOutReverse = 0x28;
235
236const auto PictOpConjointAtop = 0x29;
237
238const auto PictOpConjointAtopReverse = 0x2a;
239
240const auto PictOpConjointXor = 0x2b;
241
242const auto PictOpConjointMaximum = 0x2b;
243
244
245const auto PolyEdgeSharp = 0;
246
247const auto PolyEdgeSmooth = 1;
248
249
250const auto PolyModePrecise = 0;
251
252const auto PolyModeImprecise = 1;
253
254const auto CPRepeat = (1 << 0);
255const auto CPAlphaMap = (1 << 1);
256const auto CPAlphaXOrigin = (1 << 2);
257const auto CPAlphaYOrigin = (1 << 3);
258const auto CPClipXOrigin = (1 << 4);
259const auto CPClipYOrigin = (1 << 5);
260const auto CPClipMask = (1 << 6);
261const auto CPGraphicsExposure = (1 << 7);
262const auto CPSubwindowMode = (1 << 8);
263const auto CPPolyEdge = (1 << 9);
264const auto CPPolyMode = (1 << 10);
265const auto CPDither = (1 << 11);
266const auto CPComponentAlpha = (1 << 12);
267
268const auto CPLastBit = 12;
269
270
271
272
273
274/* Filters included in 0.6 */
275
276const auto FilterNearest "nearest";
277const auto FilterBilinear "bilinear";
278
279/* Filters included in 0.10 */
280
281const auto FilterConvolution "convolution";
282
283const auto FilterFast = "fast";
284const auto FilterGood = "good";
285const auto FilterBest = "best";
286
287const auto FilterAliasNone = -1;
288
289
290/* Subpixel orders included in 0.6 */
291
292const auto SubPixelUnknown = 0;
293
294const auto SubPixelHorizontalRGB = 1;
295
296const auto SubPixelHorizontalBGR = 2;
297
298const auto SubPixelVerticalRGB = 3;
299
300const auto SubPixelVerticalBGR = 4;
301
302const auto SubPixelNone = 5;
303
304/* Extended repeat attributes included in 0.10 */
305
306const auto RepeatNone = 0;
307
308const auto RepeatNormal = 1;
309
310const auto RepeatPad = 2;
311
312const auto RepeatReflect = 3;
313