3 * Copyright © 2000 SuSE, Inc.
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name of SuSE not be used in advertising or
10 * publicity pertaining to distribution of the software without specific,
11 * written prior permission. SuSE makes no representations about the
12 * suitability of this software for any purpose. It is provided "as is"
13 * without express or implied warranty.
15 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
17 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 * Author: Keith Packard, SuSE, Inc.
29 #include <X11/Xfuncproto.h>
30 #include <X11/Xosdefs.h>
31 #include <X11/Xutil.h>
33 #include <X11/extensions/render.h>
44 } XRenderDirectFormat
;
50 XRenderDirectFormat direct
;
54 #define PictFormatID (1 << 0)
55 #define PictFormatType (1 << 1)
56 #define PictFormatDepth (1 << 2)
57 #define PictFormatRed (1 << 3)
58 #define PictFormatRedMask (1 << 4)
59 #define PictFormatGreen (1 << 5)
60 #define PictFormatGreenMask (1 << 6)
61 #define PictFormatBlue (1 << 7)
62 #define PictFormatBlueMask (1 << 8)
63 #define PictFormatAlpha (1 << 9)
64 #define PictFormatAlphaMask (1 << 10)
65 #define PictFormatColormap (1 << 11)
67 typedef struct _XRenderPictureAttributes
{
75 Bool graphics_exposures
;
81 } XRenderPictureAttributes
;
90 typedef struct _XGlyphInfo
{
92 unsigned short height
;
99 typedef struct _XGlyphElt8
{
107 typedef struct _XGlyphElt16
{
109 _Xconst
unsigned short *chars
;
115 typedef struct _XGlyphElt32
{
117 _Xconst
unsigned int *chars
;
123 typedef double XDouble
;
125 typedef struct _XPointDouble
{
129 #define XDoubleToFixed(f) ((XFixed) ((f) * 65536))
130 #define XFixedToDouble(f) (((XDouble) (f)) / 65536)
134 typedef struct _XPointFixed
{
138 typedef struct _XLineFixed
{
142 typedef struct _XTriangle
{
143 XPointFixed p1
, p2
, p3
;
146 typedef struct _XCircle
{
152 typedef struct _XTrapezoid
{
154 XLineFixed left
, right
;
157 typedef struct _XTransform
{
161 typedef struct _XFilters
{
168 typedef struct _XIndexValue
{
170 unsigned short red
, green
, blue
, alpha
;
173 typedef struct _XAnimCursor
{
178 typedef struct _XSpanFix
{
179 XFixed left
, right
, y
;
182 typedef struct _XTrap
{
183 XSpanFix top
, bottom
;
186 typedef struct _XLinearGradient
{
191 typedef struct _XRadialGradient
{
196 typedef struct _XConicalGradient
{
198 XFixed angle
; /* in degrees */
203 Bool
XRenderQueryExtension (Display
*dpy
, int *event_basep
, int *error_basep
);
205 Status
XRenderQueryVersion (Display
*dpy
,
207 int *minor_versionp
);
209 Status
XRenderQueryFormats (Display
*dpy
);
211 int XRenderQuerySubpixelOrder (Display
*dpy
, int screen
);
213 Bool
XRenderSetSubpixelOrder (Display
*dpy
, int screen
, int subpixel
);
216 XRenderFindVisualFormat (Display
*dpy
, _Xconst Visual
*visual
);
219 XRenderFindFormat (Display
*dpy
,
221 _Xconst XRenderPictFormat
*templ
,
224 #define PictStandardARGB32 0
225 #define PictStandardRGB24 1
226 #define PictStandardA8 2
227 #define PictStandardA4 3
228 #define PictStandardA1 4
229 #define PictStandardNUM 5
232 XRenderFindStandardFormat (Display
*dpy
,
236 XRenderQueryPictIndexValues(Display
*dpy
,
237 _Xconst XRenderPictFormat
*format
,
241 XRenderCreatePicture (Display
*dpy
,
243 _Xconst XRenderPictFormat
*format
,
244 unsigned long valuemask
,
245 _Xconst XRenderPictureAttributes
*attributes
);
248 XRenderChangePicture (Display
*dpy
,
250 unsigned long valuemask
,
251 _Xconst XRenderPictureAttributes
*attributes
);
254 XRenderSetPictureClipRectangles (Display
*dpy
,
258 _Xconst XRectangle
*rects
,
262 XRenderSetPictureClipRegion (Display
*dpy
,
267 XRenderSetPictureTransform (Display
*dpy
,
269 XTransform
*transform
);
272 XRenderFreePicture (Display
*dpy
,
276 XRenderComposite (Display
*dpy
,
288 unsigned int height
);
291 XRenderCreateGlyphSet (Display
*dpy
, _Xconst XRenderPictFormat
*format
);
294 XRenderReferenceGlyphSet (Display
*dpy
, GlyphSet existing
);
297 XRenderFreeGlyphSet (Display
*dpy
, GlyphSet glyphset
);
300 XRenderAddGlyphs (Display
*dpy
,
303 _Xconst XGlyphInfo
*glyphs
,
305 _Xconst
char *images
,
309 XRenderFreeGlyphs (Display
*dpy
,
315 XRenderCompositeString8 (Display
*dpy
,
319 _Xconst XRenderPictFormat
*maskFormat
,
325 _Xconst
char *string
,
329 XRenderCompositeString16 (Display
*dpy
,
333 _Xconst XRenderPictFormat
*maskFormat
,
339 _Xconst
unsigned short *string
,
343 XRenderCompositeString32 (Display
*dpy
,
347 _Xconst XRenderPictFormat
*maskFormat
,
353 _Xconst
unsigned int *string
,
357 XRenderCompositeText8 (Display
*dpy
,
361 _Xconst XRenderPictFormat
*maskFormat
,
366 _Xconst XGlyphElt8
*elts
,
370 XRenderCompositeText16 (Display
*dpy
,
374 _Xconst XRenderPictFormat
*maskFormat
,
379 _Xconst XGlyphElt16
*elts
,
383 XRenderCompositeText32 (Display
*dpy
,
387 _Xconst XRenderPictFormat
*maskFormat
,
392 _Xconst XGlyphElt32
*elts
,
396 XRenderFillRectangle (Display
*dpy
,
399 _Xconst XRenderColor
*color
,
403 unsigned int height
);
406 XRenderFillRectangles (Display
*dpy
,
409 _Xconst XRenderColor
*color
,
410 _Xconst XRectangle
*rectangles
,
414 XRenderCompositeTrapezoids (Display
*dpy
,
418 _Xconst XRenderPictFormat
*maskFormat
,
421 _Xconst XTrapezoid
*traps
,
425 XRenderCompositeTriangles (Display
*dpy
,
429 _Xconst XRenderPictFormat
*maskFormat
,
432 _Xconst XTriangle
*triangles
,
436 XRenderCompositeTriStrip (Display
*dpy
,
440 _Xconst XRenderPictFormat
*maskFormat
,
443 _Xconst XPointFixed
*points
,
447 XRenderCompositeTriFan (Display
*dpy
,
451 _Xconst XRenderPictFormat
*maskFormat
,
454 _Xconst XPointFixed
*points
,
458 XRenderCompositeDoublePoly (Display
*dpy
,
462 _Xconst XRenderPictFormat
*maskFormat
,
467 _Xconst XPointDouble
*fpoints
,
471 XRenderParseColor(Display
*dpy
,
476 XRenderCreateCursor (Display
*dpy
,
482 XRenderQueryFilters (Display
*dpy
, Drawable drawable
);
485 XRenderSetPictureFilter (Display
*dpy
,
492 XRenderCreateAnimCursor (Display
*dpy
,
494 XAnimCursor
*cursors
);
498 XRenderAddTraps (Display
*dpy
,
502 _Xconst XTrap
*traps
,
505 Picture
XRenderCreateSolidFill (Display
*dpy
,
506 const XRenderColor
*color
);
508 Picture
XRenderCreateLinearGradient (Display
*dpy
,
509 const XLinearGradient
*gradient
,
511 const XRenderColor
*colors
,
514 Picture
XRenderCreateRadialGradient (Display
*dpy
,
515 const XRadialGradient
*gradient
,
517 const XRenderColor
*colors
,
520 Picture
XRenderCreateConicalGradient (Display
*dpy
,
521 const XConicalGradient
*gradient
,
523 const XRenderColor
*colors
,
528 #endif /* _XRENDER_H_ */