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