1 | /* $XFree86$ */
|
---|
2 | /*
|
---|
3 | * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
|
---|
4 | *
|
---|
5 | * All Rights Reserved.
|
---|
6 | *
|
---|
7 | * Permission is hereby granted, free of charge, to any person obtaining
|
---|
8 | * a copy of this software and associated documentation files (the
|
---|
9 | * "Software"), to deal in the Software without restriction, including
|
---|
10 | * without limitation on the rights to use, copy, modify, merge,
|
---|
11 | * publish, distribute, sublicense, and/or sell copies of the Software,
|
---|
12 | * and to permit persons to whom the Software is furnished to do so,
|
---|
13 | * subject to the following conditions:
|
---|
14 | *
|
---|
15 | * The above copyright notice and this permission notice (including the
|
---|
16 | * next paragraph) shall be included in all copies or substantial
|
---|
17 | * portions of the Software.
|
---|
18 | *
|
---|
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
---|
21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
22 | * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
|
---|
23 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
---|
24 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
25 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
---|
26 | * SOFTWARE.
|
---|
27 | */
|
---|
28 |
|
---|
29 | /*
|
---|
30 | * Authors:
|
---|
31 | * Kevin E. Martin <[email protected]>
|
---|
32 | *
|
---|
33 | */
|
---|
34 |
|
---|
35 | /** \file
|
---|
36 | * This file provides access to the externally visible RENDER support
|
---|
37 | * functions, global variables and macros for DMX.
|
---|
38 | *
|
---|
39 | * FIXME: Move function definitions for non-externally visible function
|
---|
40 | * to .c file. */
|
---|
41 |
|
---|
42 | #ifndef DMXPICT_H
|
---|
43 | #define DMXPICT_H
|
---|
44 |
|
---|
45 | /** Picture private structure */
|
---|
46 | typedef struct _dmxPictPriv {
|
---|
47 | Picture pict; /**< Picture ID from back-end server */
|
---|
48 | Mask savedMask; /**< Mask of picture attributes saved for
|
---|
49 | * lazy window creation. */
|
---|
50 | } dmxPictPrivRec, *dmxPictPrivPtr;
|
---|
51 |
|
---|
52 |
|
---|
53 | /** Glyph Set private structure */
|
---|
54 | typedef struct _dmxGlyphPriv {
|
---|
55 | GlyphSet *glyphSets; /**< Glyph Set IDs from back-end server */
|
---|
56 | } dmxGlyphPrivRec, *dmxGlyphPrivPtr;
|
---|
57 |
|
---|
58 |
|
---|
59 | extern void dmxInitRender(void);
|
---|
60 | extern void dmxResetRender(void);
|
---|
61 |
|
---|
62 | extern Bool dmxPictureInit(ScreenPtr pScreen,
|
---|
63 | PictFormatPtr formats, int nformats);
|
---|
64 |
|
---|
65 | extern void dmxCreatePictureList(WindowPtr pWindow);
|
---|
66 | extern Bool dmxDestroyPictureList(WindowPtr pWindow);
|
---|
67 |
|
---|
68 | extern int dmxCreatePicture(PicturePtr pPicture);
|
---|
69 | extern void dmxDestroyPicture(PicturePtr pPicture);
|
---|
70 | extern int dmxChangePictureClip(PicturePtr pPicture, int clipType,
|
---|
71 | pointer value, int n);
|
---|
72 | extern void dmxDestroyPictureClip(PicturePtr pPicture);
|
---|
73 | extern void dmxChangePicture(PicturePtr pPicture, Mask mask);
|
---|
74 | extern void dmxValidatePicture(PicturePtr pPicture, Mask mask);
|
---|
75 | extern void dmxComposite(CARD8 op,
|
---|
76 | PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
---|
77 | INT16 xSrc, INT16 ySrc,
|
---|
78 | INT16 xMask, INT16 yMask,
|
---|
79 | INT16 xDst, INT16 yDst,
|
---|
80 | CARD16 width, CARD16 height);
|
---|
81 | extern void dmxGlyphs(CARD8 op,
|
---|
82 | PicturePtr pSrc, PicturePtr pDst,
|
---|
83 | PictFormatPtr maskFormat,
|
---|
84 | INT16 xSrc, INT16 ySrc,
|
---|
85 | int nlists, GlyphListPtr lists, GlyphPtr *glyphs);
|
---|
86 | extern void dmxCompositeRects(CARD8 op,
|
---|
87 | PicturePtr pDst,
|
---|
88 | xRenderColor *color,
|
---|
89 | int nRect, xRectangle *rects);
|
---|
90 | extern Bool dmxInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
|
---|
91 | extern void dmxCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
|
---|
92 | extern void dmxUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat,
|
---|
93 | int ndef, xColorItem *pdef);
|
---|
94 | extern void dmxTrapezoids(CARD8 op,
|
---|
95 | PicturePtr pSrc, PicturePtr pDst,
|
---|
96 | PictFormatPtr maskFormat,
|
---|
97 | INT16 xSrc, INT16 ySrc,
|
---|
98 | int ntrap, xTrapezoid *traps);
|
---|
99 | extern void dmxTriangles(CARD8 op,
|
---|
100 | PicturePtr pSrc, PicturePtr pDst,
|
---|
101 | PictFormatPtr maskFormat,
|
---|
102 | INT16 xSrc, INT16 ySrc,
|
---|
103 | int ntri, xTriangle *tris);
|
---|
104 | extern void dmxTriStrip(CARD8 op,
|
---|
105 | PicturePtr pSrc, PicturePtr pDst,
|
---|
106 | PictFormatPtr maskFormat,
|
---|
107 | INT16 xSrc, INT16 ySrc,
|
---|
108 | int npoint, xPointFixed *points);
|
---|
109 | extern void dmxTriFan(CARD8 op,
|
---|
110 | PicturePtr pSrc, PicturePtr pDst,
|
---|
111 | PictFormatPtr maskFormat,
|
---|
112 | INT16 xSrc, INT16 ySrc,
|
---|
113 | int npoint, xPointFixed *points);
|
---|
114 |
|
---|
115 | extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
|
---|
116 | extern Bool dmxBEFreePicture(PicturePtr pPicture);
|
---|
117 |
|
---|
118 | extern int dmxPictPrivateIndex; /**< Index for picture private data */
|
---|
119 | extern int dmxGlyphSetPrivateIndex; /**< Index for glyphset private data */
|
---|
120 |
|
---|
121 |
|
---|
122 | /** Get the picture private data given a picture pointer */
|
---|
123 | #define DMX_GET_PICT_PRIV(_pPict) \
|
---|
124 | (dmxPictPrivPtr)(_pPict)->devPrivates[dmxPictPrivateIndex].ptr
|
---|
125 |
|
---|
126 | /** Set the glyphset private data given a glyphset pointer */
|
---|
127 | #define DMX_SET_GLYPH_PRIV(_pGlyph, _pPriv) \
|
---|
128 | GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateIndex, (_pPriv))
|
---|
129 | /** Get the glyphset private data given a glyphset pointer */
|
---|
130 | #define DMX_GET_GLYPH_PRIV(_pGlyph) \
|
---|
131 | (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateIndex)
|
---|
132 |
|
---|
133 | #endif /* DMXPICT_H */
|
---|