VirtualBox

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

Last change on this file was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

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