update dev300-m58
[ooovba.git] / x11_extensions / inc / renderproto.h
blobffe06395d081b96f0a18dc49b5760a6ac3f0436d
1 /*
2 * $XFree86: xc/include/extensions/renderproto.h,v 1.12 2002/09/26 02:56:48 keithp Exp $
4 * Copyright © 2000 SuSE, Inc.
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.
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.
23 * Author: Keith Packard, SuSE, Inc.
26 #ifndef _XRENDERP_H_
27 #define _XRENDERP_H_
29 #include <X11/Xmd.h>
30 #include <X11/extensions/render.h>
32 #define Window CARD32
33 #define Drawable CARD32
34 #define Font CARD32
35 #define Pixmap CARD32
36 #define Cursor CARD32
37 #define Colormap CARD32
38 #define GContext CARD32
39 #define Atom CARD32
40 #define VisualID CARD32
41 #define Time CARD32
42 #define KeyCode CARD8
43 #define KeySym CARD32
45 #define Picture CARD32
46 #define PictFormat CARD32
47 #define Fixed INT32
48 #define Glyphset CARD32
51 * data structures
54 typedef struct {
55 CARD16 red B16;
56 CARD16 redMask B16;
57 CARD16 green B16;
58 CARD16 greenMask B16;
59 CARD16 blue B16;
60 CARD16 blueMask B16;
61 CARD16 alpha B16;
62 CARD16 alphaMask B16;
63 } xDirectFormat;
65 #define sz_xDirectFormat 16
67 typedef struct {
68 PictFormat id B32;
69 CARD8 type;
70 CARD8 depth;
71 CARD16 pad1 B16;
72 xDirectFormat direct;
73 Colormap colormap;
74 } xPictFormInfo;
76 #define sz_xPictFormInfo 28
78 typedef struct {
79 VisualID visual;
80 PictFormat format;
81 } xPictVisual;
83 #define sz_xPictVisual 8
85 typedef struct {
86 CARD8 depth;
87 CARD8 pad1;
88 CARD16 nPictVisuals B16;
89 CARD32 pad2 B32;
90 } xPictDepth;
92 #define sz_xPictDepth 8
94 typedef struct {
95 CARD32 nDepth B32;
96 PictFormat fallback B32;
97 } xPictScreen;
99 #define sz_xPictScreen 8
101 typedef struct {
102 CARD32 pixel B32;
103 CARD16 red B16;
104 CARD16 green B16;
105 CARD16 blue B16;
106 CARD16 alpha B16;
107 } xIndexValue;
109 #define sz_xIndexValue 12
111 typedef struct {
112 CARD16 red B16;
113 CARD16 green B16;
114 CARD16 blue B16;
115 CARD16 alpha B16;
116 } xRenderColor;
118 #define sz_xRenderColor 8
120 typedef struct {
121 Fixed x B32;
122 Fixed y B32;
123 } xPointFixed;
125 #define sz_xPointFixed 8
127 typedef struct {
128 xPointFixed p1;
129 xPointFixed p2;
130 } xLineFixed;
132 #define sz_xLineFixed 16
134 typedef struct {
135 xPointFixed p1, p2, p3;
136 } xTriangle;
138 #define sz_xTriangle 24
140 typedef struct {
141 Fixed top B32;
142 Fixed bottom B32;
143 xLineFixed left;
144 xLineFixed right;
145 } xTrapezoid;
147 #define sz_xTrapezoid 40
149 typedef struct {
150 CARD16 width B16;
151 CARD16 height B16;
152 INT16 x B16;
153 INT16 y B16;
154 INT16 xOff B16;
155 INT16 yOff B16;
156 } xGlyphInfo;
158 #define sz_xGlyphInfo 12
160 typedef struct {
161 CARD8 len;
162 CARD8 pad1;
163 CARD16 pad2;
164 INT16 deltax;
165 INT16 deltay;
166 } xGlyphElt;
168 #define sz_xGlyphElt 8
170 typedef struct {
171 Fixed l, r, y;
172 } xSpanFix;
174 #define sz_xSpanFix 12
176 typedef struct {
177 xSpanFix top, bot;
178 } xTrap;
180 #define sz_xTrap 24
183 * requests and replies
185 typedef struct {
186 CARD8 reqType;
187 CARD8 renderReqType;
188 CARD16 length B16;
189 CARD32 majorVersion B32;
190 CARD32 minorVersion B32;
191 } xRenderQueryVersionReq;
193 #define sz_xRenderQueryVersionReq 12
195 typedef struct {
196 BYTE type; /* X_Reply */
197 BYTE pad1;
198 CARD16 sequenceNumber B16;
199 CARD32 length B32;
200 CARD32 majorVersion B32;
201 CARD32 minorVersion B32;
202 CARD32 pad2 B32;
203 CARD32 pad3 B32;
204 CARD32 pad4 B32;
205 CARD32 pad5 B32;
206 } xRenderQueryVersionReply;
208 #define sz_xRenderQueryVersionReply 32
210 typedef struct {
211 CARD8 reqType;
212 CARD8 renderReqType;
213 CARD16 length B16;
214 } xRenderQueryPictFormatsReq;
216 #define sz_xRenderQueryPictFormatsReq 4
218 typedef struct {
219 BYTE type; /* X_Reply */
220 BYTE pad1;
221 CARD16 sequenceNumber B16;
222 CARD32 length B32;
223 CARD32 numFormats B32;
224 CARD32 numScreens B32;
225 CARD32 numDepths B32;
226 CARD32 numVisuals B32;
227 CARD32 numSubpixel B32; /* Version 0.6 */
228 CARD32 pad5 B32;
229 } xRenderQueryPictFormatsReply;
231 #define sz_xRenderQueryPictFormatsReply 32
233 typedef struct {
234 CARD8 reqType;
235 CARD8 renderReqType;
236 CARD16 length B16;
237 PictFormat format B32;
238 } xRenderQueryPictIndexValuesReq;
240 #define sz_xRenderQueryPictIndexValuesReq 8
242 typedef struct {
243 BYTE type; /* X_Reply */
244 BYTE pad1;
245 CARD16 sequenceNumber B16;
246 CARD32 length B32;
247 CARD32 numIndexValues;
248 CARD32 pad2 B32;
249 CARD32 pad3 B32;
250 CARD32 pad4 B32;
251 CARD32 pad5 B32;
252 CARD32 pad6 B32;
253 } xRenderQueryPictIndexValuesReply;
255 #define sz_xRenderQueryPictIndexValuesReply 32
257 typedef struct {
258 CARD8 reqType;
259 CARD8 renderReqType;
260 CARD16 length B16;
261 Picture pid B32;
262 Drawable drawable B32;
263 PictFormat format B32;
264 CARD32 mask B32;
265 } xRenderCreatePictureReq;
267 #define sz_xRenderCreatePictureReq 20
269 typedef struct {
270 CARD8 reqType;
271 CARD8 renderReqType;
272 CARD16 length B16;
273 Picture picture B32;
274 CARD32 mask B32;
275 } xRenderChangePictureReq;
277 #define sz_xRenderChangePictureReq 12
279 typedef struct {
280 CARD8 reqType;
281 CARD8 renderReqType;
282 CARD16 length B16;
283 Picture picture B32;
284 INT16 xOrigin B16;
285 INT16 yOrigin B16;
286 } xRenderSetPictureClipRectanglesReq;
288 #define sz_xRenderSetPictureClipRectanglesReq 12
290 typedef struct {
291 CARD8 reqType;
292 CARD8 renderReqType;
293 CARD16 length B16;
294 Picture picture B32;
295 } xRenderFreePictureReq;
297 #define sz_xRenderFreePictureReq 8
299 typedef struct {
300 CARD8 reqType;
301 CARD8 renderReqType;
302 CARD16 length B16;
303 CARD8 op;
304 CARD8 pad1;
305 CARD16 pad2 B16;
306 Picture src B32;
307 Picture mask B32;
308 Picture dst B32;
309 INT16 xSrc B16;
310 INT16 ySrc B16;
311 INT16 xMask B16;
312 INT16 yMask B16;
313 INT16 xDst B16;
314 INT16 yDst B16;
315 CARD16 width B16;
316 CARD16 height B16;
317 } xRenderCompositeReq;
319 #define sz_xRenderCompositeReq 36
321 typedef struct {
322 CARD8 reqType;
323 CARD8 renderReqType;
324 CARD16 length B16;
325 Picture src B32;
326 Picture dst B32;
327 CARD32 colorScale B32;
328 CARD32 alphaScale B32;
329 INT16 xSrc B16;
330 INT16 ySrc B16;
331 INT16 xDst B16;
332 INT16 yDst B16;
333 CARD16 width B16;
334 CARD16 height B16;
335 } xRenderScaleReq;
337 #define sz_xRenderScaleReq 32
339 typedef struct {
340 CARD8 reqType;
341 CARD8 renderReqType;
342 CARD16 length B16;
343 CARD8 op;
344 CARD8 pad1;
345 CARD16 pad2 B16;
346 Picture src B32;
347 Picture dst B32;
348 PictFormat maskFormat B32;
349 INT16 xSrc B16;
350 INT16 ySrc B16;
351 } xRenderTrapezoidsReq;
353 #define sz_xRenderTrapezoidsReq 24
355 typedef struct {
356 CARD8 reqType;
357 CARD8 renderReqType;
358 CARD16 length B16;
359 CARD8 op;
360 CARD8 pad1;
361 CARD16 pad2 B16;
362 Picture src B32;
363 Picture dst B32;
364 PictFormat maskFormat B32;
365 INT16 xSrc B16;
366 INT16 ySrc B16;
367 } xRenderTrianglesReq;
369 #define sz_xRenderTrianglesReq 24
371 typedef struct {
372 CARD8 reqType;
373 CARD8 renderReqType;
374 CARD16 length B16;
375 CARD8 op;
376 CARD8 pad1;
377 CARD16 pad2 B16;
378 Picture src B32;
379 Picture dst B32;
380 PictFormat maskFormat B32;
381 INT16 xSrc B16;
382 INT16 ySrc B16;
383 } xRenderTriStripReq;
385 #define sz_xRenderTriStripReq 24
387 typedef struct {
388 CARD8 reqType;
389 CARD8 renderReqType;
390 CARD16 length B16;
391 CARD8 op;
392 CARD8 pad1;
393 CARD16 pad2 B16;
394 Picture src B32;
395 Picture dst B32;
396 PictFormat maskFormat B32;
397 INT16 xSrc B16;
398 INT16 ySrc B16;
399 } xRenderTriFanReq;
401 #define sz_xRenderTriFanReq 24
403 typedef struct {
404 CARD8 reqType;
405 CARD8 renderReqType;
406 CARD16 length B16;
407 Glyphset gsid B32;
408 PictFormat format B32;
409 } xRenderCreateGlyphSetReq;
411 #define sz_xRenderCreateGlyphSetReq 12
413 typedef struct {
414 CARD8 reqType;
415 CARD8 renderReqType;
416 CARD16 length B16;
417 Glyphset gsid B32;
418 Glyphset existing B32;
419 } xRenderReferenceGlyphSetReq;
421 #define sz_xRenderReferenceGlyphSetReq 24
423 typedef struct {
424 CARD8 reqType;
425 CARD8 renderReqType;
426 CARD16 length B16;
427 Glyphset glyphset B32;
428 } xRenderFreeGlyphSetReq;
430 #define sz_xRenderFreeGlyphSetReq 8
432 typedef struct {
433 CARD8 reqType;
434 CARD8 renderReqType;
435 CARD16 length B16;
436 Glyphset glyphset B32;
437 CARD32 nglyphs;
438 } xRenderAddGlyphsReq;
440 #define sz_xRenderAddGlyphsReq 12
442 typedef struct {
443 CARD8 reqType;
444 CARD8 renderReqType;
445 CARD16 length B16;
446 Glyphset glyphset B32;
447 } xRenderFreeGlyphsReq;
449 #define sz_xRenderFreeGlyphsReq 8
451 typedef struct {
452 CARD8 reqType;
453 CARD8 renderReqType;
454 CARD16 length B16;
455 CARD8 op;
456 CARD8 pad1;
457 CARD16 pad2 B16;
458 Picture src B32;
459 Picture dst B32;
460 PictFormat maskFormat B32;
461 Glyphset glyphset B32;
462 INT16 xSrc B16;
463 INT16 ySrc B16;
464 } xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req,
465 xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req;
467 #define sz_xRenderCompositeGlyphs8Req 28
468 #define sz_xRenderCompositeGlyphs16Req 28
469 #define sz_xRenderCompositeGlyphs32Req 28
471 /* 0.1 and higher */
473 typedef struct {
474 CARD8 reqType;
475 CARD8 renderReqType;
476 CARD16 length B16;
477 CARD8 op;
478 CARD8 pad1;
479 CARD16 pad2 B16;
480 Picture dst B32;
481 xRenderColor color;
482 } xRenderFillRectanglesReq;
484 #define sz_xRenderFillRectanglesReq 20
486 /* 0.5 and higher */
488 typedef struct {
489 CARD8 reqType;
490 CARD8 renderReqType;
491 CARD16 length B16;
492 Cursor cid B32;
493 Picture src B32;
494 CARD16 x B16;
495 CARD16 y B16;
496 } xRenderCreateCursorReq;
498 #define sz_xRenderCreateCursorReq 16
500 /* 0.6 and higher */
503 * This can't use an array because 32-bit values may be in bitfields
505 typedef struct {
506 Fixed matrix11 B32;
507 Fixed matrix12 B32;
508 Fixed matrix13 B32;
509 Fixed matrix21 B32;
510 Fixed matrix22 B32;
511 Fixed matrix23 B32;
512 Fixed matrix31 B32;
513 Fixed matrix32 B32;
514 Fixed matrix33 B32;
515 } xRenderTransform;
517 #define sz_xRenderTransform 36
519 typedef struct {
520 CARD8 reqType;
521 CARD8 renderReqType;
522 CARD16 length B16;
523 Picture picture B32;
524 xRenderTransform transform;
525 } xRenderSetPictureTransformReq;
527 #define sz_xRenderSetPictureTransformReq 44
529 typedef struct {
530 CARD8 reqType;
531 CARD8 renderReqType;
532 CARD16 length B16;
533 Drawable drawable B32;
534 } xRenderQueryFiltersReq;
536 #define sz_xRenderQueryFiltersReq 8
538 typedef struct {
539 BYTE type; /* X_Reply */
540 BYTE pad1;
541 CARD16 sequenceNumber B16;
542 CARD32 length B32;
543 CARD32 numAliases B32; /* LISTofCARD16 */
544 CARD32 numFilters B32; /* LISTofSTRING8 */
545 CARD32 pad2 B32;
546 CARD32 pad3 B32;
547 CARD32 pad4 B32;
548 CARD32 pad5 B32;
549 } xRenderQueryFiltersReply;
551 #define sz_xRenderQueryFiltersReply 32
553 typedef struct {
554 CARD8 reqType;
555 CARD8 renderReqType;
556 CARD16 length B16;
557 Picture picture B32;
558 CARD16 nbytes B16; /* number of bytes in name */
559 CARD16 pad B16;
560 } xRenderSetPictureFilterReq;
562 #define sz_xRenderSetPictureFilterReq 12
564 /* 0.8 and higher */
566 typedef struct {
567 Cursor cursor B32;
568 CARD32 delay B32;
569 } xAnimCursorElt;
571 #define sz_xAnimCursorElt 8
573 typedef struct {
574 CARD8 reqType;
575 CARD8 renderReqType;
576 CARD16 length B16;
577 Cursor cid B32;
578 } xRenderCreateAnimCursorReq;
580 #define sz_xRenderCreateAnimCursorReq 8
582 /* 0.9 and higher */
584 typedef struct {
585 CARD8 reqType;
586 CARD8 renderReqType;
587 CARD16 length B16;
588 Picture picture;
589 INT16 xOff B16;
590 INT16 yOff B16;
591 } xRenderAddTrapsReq;
593 #define sz_xRenderAddTrapsReq 12
595 /* 0.10 and higher */
597 typedef struct {
598 CARD8 reqType;
599 CARD8 renderReqType;
600 CARD16 length B16;
601 Picture pid B32;
602 xRenderColor color;
603 } xRenderCreateSolidFillReq;
605 #define sz_xRenderCreateSolidFillReq 16
607 typedef struct {
608 CARD8 reqType;
609 CARD8 renderReqType;
610 CARD16 length B16;
611 Picture pid B32;
612 xPointFixed p1;
613 xPointFixed p2;
614 CARD32 nStops;
615 } xRenderCreateLinearGradientReq;
617 #define sz_xRenderCreateLinearGradientReq 28
619 typedef struct {
620 CARD8 reqType;
621 CARD8 renderReqType;
622 CARD16 length B16;
623 Picture pid B32;
624 xPointFixed inner;
625 xPointFixed outer;
626 Fixed inner_radius;
627 Fixed outer_radius;
628 CARD32 nStops;
629 } xRenderCreateRadialGradientReq;
631 #define sz_xRenderCreateRadialGradientReq 36
633 typedef struct {
634 CARD8 reqType;
635 CARD8 renderReqType;
636 CARD16 length B16;
637 Picture pid B32;
638 xPointFixed center;
639 Fixed angle; /* in degrees */
640 CARD32 nStops;
641 } xRenderCreateConicalGradientReq;
643 #define sz_xRenderCreateConicalGradientReq 24
645 #undef Window
646 #undef Drawable
647 #undef Font
648 #undef Pixmap
649 #undef Cursor
650 #undef Colormap
651 #undef GContext
652 #undef Atom
653 #undef VisualID
654 #undef Time
655 #undef KeyCode
656 #undef KeySym
658 #undef Picture
659 #undef PictFormat
660 #undef Fixed
661 #undef Glyphset
663 #endif /* _XRENDERP_H_ */