VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/picturestr.h@ 97956

最後變更 在這個檔案從97956是 69098,由 vboxsync 提交於 7 年 前

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • 屬性 svn:eol-style 設為 native
檔案大小: 12.7 KB
 
1/*
2 * $XFree86: xc/programs/Xserver/render/picturestr.h,v 1.22 2002/11/23 02:38:15 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 _PICTURESTR_H_
27#define _PICTURESTR_H_
28
29#include "glyphstr.h"
30#include "scrnintstr.h"
31#include "resource.h"
32
33typedef struct _DirectFormat {
34 CARD16 red, redMask;
35 CARD16 green, greenMask;
36 CARD16 blue, blueMask;
37 CARD16 alpha, alphaMask;
38} DirectFormatRec;
39
40typedef struct _IndexFormat {
41 VisualPtr pVisual;
42 ColormapPtr pColormap;
43 int nvalues;
44 xIndexValue *pValues;
45 void *devPrivate;
46} IndexFormatRec;
47
48typedef struct _PictFormat {
49 CARD32 id;
50 CARD32 format; /* except bpp */
51 unsigned char type;
52 unsigned char depth;
53 DirectFormatRec direct;
54 IndexFormatRec index;
55} PictFormatRec;
56
57typedef struct _PictVector {
58 xFixed vector[3];
59} PictVector, *PictVectorPtr;
60
61typedef struct _PictTransform {
62 xFixed matrix[3][3];
63} PictTransform, *PictTransformPtr;
64
65typedef struct _Picture {
66 DrawablePtr pDrawable;
67 PictFormatPtr pFormat;
68 CARD32 format; /* PICT_FORMAT */
69 int refcnt;
70 CARD32 id;
71 PicturePtr pNext; /* chain on same drawable */
72
73 unsigned int repeat : 1;
74 unsigned int graphicsExposures : 1;
75 unsigned int subWindowMode : 1;
76 unsigned int polyEdge : 1;
77 unsigned int polyMode : 1;
78 unsigned int freeCompClip : 1;
79 unsigned int clientClipType : 2;
80 unsigned int componentAlpha : 1;
81 unsigned int unused : 23;
82
83 PicturePtr alphaMap;
84 DDXPointRec alphaOrigin;
85
86 DDXPointRec clipOrigin;
87 pointer clientClip;
88
89 Atom dither;
90
91 unsigned long stateChanges;
92 unsigned long serialNumber;
93
94 RegionPtr pCompositeClip;
95
96 DevUnion *devPrivates;
97
98 PictTransform *transform;
99
100 int filter;
101 xFixed *filter_params;
102 int filter_nparams;
103} PictureRec;
104
105typedef struct {
106 char *name;
107 xFixed *params;
108 int nparams;
109 int id;
110} PictFilterRec, *PictFilterPtr;
111
112#define PictFilterNearest 0
113#define PictFilterBilinear 1
114
115#define PictFilterFast 2
116#define PictFilterGood 3
117#define PictFilterBest 4
118
119typedef struct {
120 char *alias;
121 int alias_id;
122 int filter_id;
123} PictFilterAliasRec, *PictFilterAliasPtr;
124
125typedef int (*CreatePictureProcPtr) (PicturePtr pPicture);
126typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture);
127typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture,
128 int clipType,
129 pointer value,
130 int n);
131typedef void (*DestroyPictureClipProcPtr)(PicturePtr pPicture);
132
133typedef int (*ChangePictureTransformProcPtr) (PicturePtr pPicture,
134 PictTransform *transform);
135
136typedef int (*ChangePictureFilterProcPtr) (PicturePtr pPicture,
137 int filter,
138 xFixed *params,
139 int nparams);
140
141typedef void (*DestroyPictureFilterProcPtr) (PicturePtr pPicture);
142
143typedef void (*ChangePictureProcPtr) (PicturePtr pPicture,
144 Mask mask);
145typedef void (*ValidatePictureProcPtr) (PicturePtr pPicture,
146 Mask mask);
147typedef void (*CompositeProcPtr) (CARD8 op,
148 PicturePtr pSrc,
149 PicturePtr pMask,
150 PicturePtr pDst,
151 INT16 xSrc,
152 INT16 ySrc,
153 INT16 xMask,
154 INT16 yMask,
155 INT16 xDst,
156 INT16 yDst,
157 CARD16 width,
158 CARD16 height);
159
160typedef void (*GlyphsProcPtr) (CARD8 op,
161 PicturePtr pSrc,
162 PicturePtr pDst,
163 PictFormatPtr maskFormat,
164 INT16 xSrc,
165 INT16 ySrc,
166 int nlists,
167 GlyphListPtr lists,
168 GlyphPtr *glyphs);
169
170typedef void (*CompositeRectsProcPtr) (CARD8 op,
171 PicturePtr pDst,
172 xRenderColor *color,
173 int nRect,
174 xRectangle *rects);
175
176typedef void (*RasterizeTrapezoidProcPtr)(PicturePtr pMask,
177 xTrapezoid *trap,
178 int x_off,
179 int y_off);
180
181typedef void (*TrapezoidsProcPtr) (CARD8 op,
182 PicturePtr pSrc,
183 PicturePtr pDst,
184 PictFormatPtr maskFormat,
185 INT16 xSrc,
186 INT16 ySrc,
187 int ntrap,
188 xTrapezoid *traps);
189
190typedef void (*TrianglesProcPtr) (CARD8 op,
191 PicturePtr pSrc,
192 PicturePtr pDst,
193 PictFormatPtr maskFormat,
194 INT16 xSrc,
195 INT16 ySrc,
196 int ntri,
197 xTriangle *tris);
198
199typedef void (*TriStripProcPtr) (CARD8 op,
200 PicturePtr pSrc,
201 PicturePtr pDst,
202 PictFormatPtr maskFormat,
203 INT16 xSrc,
204 INT16 ySrc,
205 int npoint,
206 xPointFixed *points);
207
208typedef void (*TriFanProcPtr) (CARD8 op,
209 PicturePtr pSrc,
210 PicturePtr pDst,
211 PictFormatPtr maskFormat,
212 INT16 xSrc,
213 INT16 ySrc,
214 int npoint,
215 xPointFixed *points);
216
217typedef Bool (*InitIndexedProcPtr) (ScreenPtr pScreen,
218 PictFormatPtr pFormat);
219
220typedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen,
221 PictFormatPtr pFormat);
222
223typedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen,
224 PictFormatPtr pFormat,
225 int ndef,
226 xColorItem *pdef);
227
228typedef struct _PictureScreen {
229 int totalPictureSize;
230 unsigned int *PicturePrivateSizes;
231 int PicturePrivateLen;
232
233 PictFormatPtr formats;
234 PictFormatPtr fallback;
235 int nformats;
236
237 CreatePictureProcPtr CreatePicture;
238 DestroyPictureProcPtr DestroyPicture;
239 ChangePictureClipProcPtr ChangePictureClip;
240 DestroyPictureClipProcPtr DestroyPictureClip;
241
242 ChangePictureProcPtr ChangePicture;
243 ValidatePictureProcPtr ValidatePicture;
244
245 CompositeProcPtr Composite;
246 GlyphsProcPtr Glyphs;
247 CompositeRectsProcPtr CompositeRects;
248
249 DestroyWindowProcPtr DestroyWindow;
250 CloseScreenProcPtr CloseScreen;
251
252 StoreColorsProcPtr StoreColors;
253
254 InitIndexedProcPtr InitIndexed;
255 CloseIndexedProcPtr CloseIndexed;
256 UpdateIndexedProcPtr UpdateIndexed;
257
258 int subpixel;
259
260 PictFilterPtr filters;
261 int nfilters;
262 PictFilterAliasPtr filterAliases;
263 int nfilterAliases;
264
265 ChangePictureTransformProcPtr ChangePictureTransform;
266 ChangePictureFilterProcPtr ChangePictureFilter;
267 DestroyPictureFilterProcPtr DestroyPictureFilter;
268
269 TrapezoidsProcPtr Trapezoids;
270 TrianglesProcPtr Triangles;
271 TriStripProcPtr TriStrip;
272 TriFanProcPtr TriFan;
273
274 RasterizeTrapezoidProcPtr RasterizeTrapezoid;
275} PictureScreenRec, *PictureScreenPtr;
276
277extern int PictureScreenPrivateIndex;
278extern int PictureWindowPrivateIndex;
279extern RESTYPE PictureType;
280extern RESTYPE PictFormatType;
281extern RESTYPE GlyphSetType;
282
283#define GetPictureScreen(s) ((PictureScreenPtr) ((s)->devPrivates[PictureScreenPrivateIndex].ptr))
284#define GetPictureScreenIfSet(s) ((PictureScreenPrivateIndex != -1) ? GetPictureScreen(s) : NULL)
285#define SetPictureScreen(s,p) ((s)->devPrivates[PictureScreenPrivateIndex].ptr = (pointer) (p))
286#define GetPictureWindow(w) ((PicturePtr) ((w)->devPrivates[PictureWindowPrivateIndex].ptr))
287#define SetPictureWindow(w,p) ((w)->devPrivates[PictureWindowPrivateIndex].ptr = (pointer) (p))
288
289#define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\
290 pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\
291 if (!pPicture) { \
292 client->errorValue = pid; \
293 return err; \
294 } \
295}
296
297#define VERIFY_ALPHA(pPicture, pid, client, mode, err) {\
298 if (pid == None) \
299 pPicture = 0; \
300 else { \
301 VERIFY_PICTURE(pPicture, pid, client, mode, err); \
302 } \
303} \
304
305Bool
306PictureDestroyWindow (WindowPtr pWindow);
307
308Bool
309PictureCloseScreen (int Index, ScreenPtr pScreen);
310
311void
312PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef);
313
314Bool
315PictureInitIndexedFormats (ScreenPtr pScreen);
316
317Bool
318PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel);
319
320int
321PictureGetSubpixelOrder (ScreenPtr pScreen);
322
323PictFormatPtr
324PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp);
325
326PictFormatPtr
327PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual);
328
329PictFormatPtr
330PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 format);
331
332Bool
333PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
334
335int
336PictureGetFilterId (char *filter, int len, Bool makeit);
337
338char *
339PictureGetFilterName (int id);
340
341int
342PictureAddFilter (ScreenPtr pScreen, char *filter, xFixed *params, int nparams);
343
344Bool
345PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias);
346
347Bool
348PictureSetDefaultFilters (ScreenPtr pScreen);
349
350void
351PictureResetFilters (ScreenPtr pScreen);
352
353PictFilterPtr
354PictureFindFilter (ScreenPtr pScreen, char *name, int len);
355
356int
357SetPictureFilter (PicturePtr pPicture, char *name, int len, xFixed *params, int nparams);
358
359Bool
360PictureFinishInit (void);
361
362void
363SetPictureToDefaults (PicturePtr pPicture);
364
365PicturePtr
366AllocatePicture (ScreenPtr pScreen);
367
368#if 0
369Bool
370miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
371#endif
372
373
374PicturePtr
375CreatePicture (Picture pid,
376 DrawablePtr pDrawable,
377 PictFormatPtr pFormat,
378 Mask mask,
379 XID *list,
380 ClientPtr client,
381 int *error);
382
383int
384ChangePicture (PicturePtr pPicture,
385 Mask vmask,
386 XID *vlist,
387 DevUnion *ulist,
388 ClientPtr client);
389
390int
391SetPictureClipRects (PicturePtr pPicture,
392 int xOrigin,
393 int yOrigin,
394 int nRect,
395 xRectangle *rects);
396
397int
398SetPictureTransform (PicturePtr pPicture,
399 PictTransform *transform);
400
401void
402ValidatePicture(PicturePtr pPicture);
403
404int
405FreePicture (pointer pPicture,
406 XID pid);
407
408int
409FreePictFormat (pointer pPictFormat,
410 XID pid);
411
412void
413CompositePicture (CARD8 op,
414 PicturePtr pSrc,
415 PicturePtr pMask,
416 PicturePtr pDst,
417 INT16 xSrc,
418 INT16 ySrc,
419 INT16 xMask,
420 INT16 yMask,
421 INT16 xDst,
422 INT16 yDst,
423 CARD16 width,
424 CARD16 height);
425
426void
427CompositeGlyphs (CARD8 op,
428 PicturePtr pSrc,
429 PicturePtr pDst,
430 PictFormatPtr maskFormat,
431 INT16 xSrc,
432 INT16 ySrc,
433 int nlist,
434 GlyphListPtr lists,
435 GlyphPtr *glyphs);
436
437void
438CompositeRects (CARD8 op,
439 PicturePtr pDst,
440 xRenderColor *color,
441 int nRect,
442 xRectangle *rects);
443
444void
445CompositeTrapezoids (CARD8 op,
446 PicturePtr pSrc,
447 PicturePtr pDst,
448 PictFormatPtr maskFormat,
449 INT16 xSrc,
450 INT16 ySrc,
451 int ntrap,
452 xTrapezoid *traps);
453
454void
455CompositeTriangles (CARD8 op,
456 PicturePtr pSrc,
457 PicturePtr pDst,
458 PictFormatPtr maskFormat,
459 INT16 xSrc,
460 INT16 ySrc,
461 int ntriangles,
462 xTriangle *triangles);
463
464void
465CompositeTriStrip (CARD8 op,
466 PicturePtr pSrc,
467 PicturePtr pDst,
468 PictFormatPtr maskFormat,
469 INT16 xSrc,
470 INT16 ySrc,
471 int npoints,
472 xPointFixed *points);
473
474void
475CompositeTriFan (CARD8 op,
476 PicturePtr pSrc,
477 PicturePtr pDst,
478 PictFormatPtr maskFormat,
479 INT16 xSrc,
480 INT16 ySrc,
481 int npoints,
482 xPointFixed *points);
483
484Bool
485PictureTransformPoint (PictTransformPtr transform,
486 PictVectorPtr vector);
487
488void RenderExtensionInit (void);
489
490Bool
491AnimCurInit (ScreenPtr pScreen);
492
493int
494AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor);
495
496#ifdef PANORAMIX
497void PanoramiXRenderInit (void);
498void PanoramiXRenderReset (void);
499#endif
500
501#endif /* _PICTURESTR_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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