VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.9.0/mipict.h@ 38889

Last change on this file since 38889 was 32163, checked in by vboxsync, 14 years ago

Additions/x11/x11include: additional headers for building drivers for X.Org Server 1.9

  • Property svn:eol-style set to native
File size: 5.4 KB
Line 
1/*
2 *
3 * Copyright © 2000 SuSE, Inc.
4 *
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.
14 *
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.
21 *
22 * Author: Keith Packard, SuSE, Inc.
23 */
24
25#ifndef _MIPICT_H_
26#define _MIPICT_H_
27
28#include "picturestr.h"
29
30#define MI_MAX_INDEXED 256 /* XXX depth must be <= 8 */
31
32#if MI_MAX_INDEXED <= 256
33typedef CARD8 miIndexType;
34#endif
35
36typedef struct _miIndexed {
37 Bool color;
38 CARD32 rgba[MI_MAX_INDEXED];
39 miIndexType ent[32768];
40} miIndexedRec, *miIndexedPtr;
41
42#define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
43 (((s) >> 6) & 0x03e0) | \
44 (((s) >> 9) & 0x7c00))
45#define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15])
46#define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24))
47
48#define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)])
49
50extern _X_EXPORT int
51miCreatePicture (PicturePtr pPicture);
52
53extern _X_EXPORT void
54miDestroyPicture (PicturePtr pPicture);
55
56extern _X_EXPORT void
57miDestroyPictureClip (PicturePtr pPicture);
58
59extern _X_EXPORT int
60miChangePictureClip (PicturePtr pPicture,
61 int type,
62 pointer value,
63 int n);
64
65extern _X_EXPORT void
66miChangePicture (PicturePtr pPicture,
67 Mask mask);
68
69extern _X_EXPORT void
70miValidatePicture (PicturePtr pPicture,
71 Mask mask);
72
73extern _X_EXPORT int
74miChangePictureTransform (PicturePtr pPicture,
75 PictTransform *transform);
76
77extern _X_EXPORT int
78miChangePictureFilter (PicturePtr pPicture,
79 int filter,
80 xFixed *params,
81 int nparams);
82
83extern _X_EXPORT void
84miCompositeSourceValidate (PicturePtr pPicture,
85 INT16 x,
86 INT16 y,
87 CARD16 width,
88 CARD16 height);
89extern _X_EXPORT Bool
90miComputeCompositeRegion (RegionPtr pRegion,
91 PicturePtr pSrc,
92 PicturePtr pMask,
93 PicturePtr pDst,
94 INT16 xSrc,
95 INT16 ySrc,
96 INT16 xMask,
97 INT16 yMask,
98 INT16 xDst,
99 INT16 yDst,
100 CARD16 width,
101 CARD16 height);
102
103extern _X_EXPORT Bool
104miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
105
106extern _X_EXPORT Bool
107miRealizeGlyph (ScreenPtr pScreen,
108 GlyphPtr glyph);
109
110extern _X_EXPORT void
111miUnrealizeGlyph (ScreenPtr pScreen,
112 GlyphPtr glyph);
113
114extern _X_EXPORT void
115miGlyphs (CARD8 op,
116 PicturePtr pSrc,
117 PicturePtr pDst,
118 PictFormatPtr maskFormat,
119 INT16 xSrc,
120 INT16 ySrc,
121 int nlist,
122 GlyphListPtr list,
123 GlyphPtr *glyphs);
124
125extern _X_EXPORT void
126miRenderColorToPixel (PictFormatPtr pPict,
127 xRenderColor *color,
128 CARD32 *pixel);
129
130extern _X_EXPORT void
131miRenderPixelToColor (PictFormatPtr pPict,
132 CARD32 pixel,
133 xRenderColor *color);
134
135extern _X_EXPORT Bool
136miIsSolidAlpha (PicturePtr pSrc);
137
138extern _X_EXPORT void
139miCompositeRects (CARD8 op,
140 PicturePtr pDst,
141 xRenderColor *color,
142 int nRect,
143 xRectangle *rects);
144
145extern _X_EXPORT void
146miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
147
148extern _X_EXPORT void
149miTrapezoids (CARD8 op,
150 PicturePtr pSrc,
151 PicturePtr pDst,
152 PictFormatPtr maskFormat,
153 INT16 xSrc,
154 INT16 ySrc,
155 int ntrap,
156 xTrapezoid *traps);
157
158extern _X_EXPORT void
159miPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds);
160
161extern _X_EXPORT void
162miTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds);
163
164extern _X_EXPORT void
165miTriangles (CARD8 op,
166 PicturePtr pSrc,
167 PicturePtr pDst,
168 PictFormatPtr maskFormat,
169 INT16 xSrc,
170 INT16 ySrc,
171 int ntri,
172 xTriangle *tris);
173
174extern _X_EXPORT void
175miTriStrip (CARD8 op,
176 PicturePtr pSrc,
177 PicturePtr pDst,
178 PictFormatPtr maskFormat,
179 INT16 xSrc,
180 INT16 ySrc,
181 int npoint,
182 xPointFixed *points);
183
184extern _X_EXPORT void
185miTriFan (CARD8 op,
186 PicturePtr pSrc,
187 PicturePtr pDst,
188 PictFormatPtr maskFormat,
189 INT16 xSrc,
190 INT16 ySrc,
191 int npoint,
192 xPointFixed *points);
193
194extern _X_EXPORT PicturePtr
195miCreateAlphaPicture (ScreenPtr pScreen,
196 PicturePtr pDst,
197 PictFormatPtr pPictFormat,
198 CARD16 width,
199 CARD16 height);
200
201extern _X_EXPORT Bool
202miInitIndexed (ScreenPtr pScreen,
203 PictFormatPtr pFormat);
204
205extern _X_EXPORT void
206miCloseIndexed (ScreenPtr pScreen,
207 PictFormatPtr pFormat);
208
209extern _X_EXPORT void
210miUpdateIndexed (ScreenPtr pScreen,
211 PictFormatPtr pFormat,
212 int ndef,
213 xColorItem *pdef);
214
215#endif /* _MIPICT_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette