VirtualBox

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

Last change on this file since 78293 was 69098, checked in by vboxsync, 7 years ago

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.

  • Property svn:eol-style set to native
File size: 9.1 KB
Line 
1/* $Xorg: gcstruct.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
2/***********************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
48
49
50/* $XFree86: xc/programs/Xserver/include/gcstruct.h,v 1.6 2001/12/14 19:59:54 dawes Exp $ */
51
52#ifndef GCSTRUCT_H
53#define GCSTRUCT_H
54
55#include "gc.h"
56
57#include "miscstruct.h"
58#include "region.h"
59#include "pixmap.h"
60#include "screenint.h"
61#include "Xprotostr.h"
62
63/*
64 * functions which modify the state of the GC
65 */
66
67typedef struct _GCFuncs {
68 void (* ValidateGC)(
69#if NeedNestedPrototypes
70 GCPtr /*pGC*/,
71 unsigned long /*stateChanges*/,
72 DrawablePtr /*pDrawable*/
73#endif
74);
75
76 void (* ChangeGC)(
77#if NeedNestedPrototypes
78 GCPtr /*pGC*/,
79 unsigned long /*mask*/
80#endif
81);
82
83 void (* CopyGC)(
84#if NeedNestedPrototypes
85 GCPtr /*pGCSrc*/,
86 unsigned long /*mask*/,
87 GCPtr /*pGCDst*/
88#endif
89);
90
91 void (* DestroyGC)(
92#if NeedNestedPrototypes
93 GCPtr /*pGC*/
94#endif
95);
96
97 void (* ChangeClip)(
98#if NeedNestedPrototypes
99 GCPtr /*pGC*/,
100 int /*type*/,
101 pointer /*pvalue*/,
102 int /*nrects*/
103#endif
104);
105
106 void (* DestroyClip)(
107#if NeedNestedPrototypes
108 GCPtr /*pGC*/
109#endif
110);
111
112 void (* CopyClip)(
113#if NeedNestedPrototypes
114 GCPtr /*pgcDst*/,
115 GCPtr /*pgcSrc*/
116#endif
117);
118 DevUnion devPrivate;
119} GCFuncs;
120
121/*
122 * graphics operations invoked through a GC
123 */
124
125typedef struct _GCOps {
126 void (* FillSpans)(
127#if NeedNestedPrototypes
128 DrawablePtr /*pDrawable*/,
129 GCPtr /*pGC*/,
130 int /*nInit*/,
131 DDXPointPtr /*pptInit*/,
132 int * /*pwidthInit*/,
133 int /*fSorted*/
134#endif
135);
136
137 void (* SetSpans)(
138#if NeedNestedPrototypes
139 DrawablePtr /*pDrawable*/,
140 GCPtr /*pGC*/,
141 char * /*psrc*/,
142 DDXPointPtr /*ppt*/,
143 int * /*pwidth*/,
144 int /*nspans*/,
145 int /*fSorted*/
146#endif
147);
148
149 void (* PutImage)(
150#if NeedNestedPrototypes
151 DrawablePtr /*pDrawable*/,
152 GCPtr /*pGC*/,
153 int /*depth*/,
154 int /*x*/,
155 int /*y*/,
156 int /*w*/,
157 int /*h*/,
158 int /*leftPad*/,
159 int /*format*/,
160 char * /*pBits*/
161#endif
162);
163
164 RegionPtr (* CopyArea)(
165#if NeedNestedPrototypes
166 DrawablePtr /*pSrc*/,
167 DrawablePtr /*pDst*/,
168 GCPtr /*pGC*/,
169 int /*srcx*/,
170 int /*srcy*/,
171 int /*w*/,
172 int /*h*/,
173 int /*dstx*/,
174 int /*dsty*/
175#endif
176);
177
178 RegionPtr (* CopyPlane)(
179#if NeedNestedPrototypes
180 DrawablePtr /*pSrcDrawable*/,
181 DrawablePtr /*pDstDrawable*/,
182 GCPtr /*pGC*/,
183 int /*srcx*/,
184 int /*srcy*/,
185 int /*width*/,
186 int /*height*/,
187 int /*dstx*/,
188 int /*dsty*/,
189 unsigned long /*bitPlane*/
190#endif
191);
192 void (* PolyPoint)(
193#if NeedNestedPrototypes
194 DrawablePtr /*pDrawable*/,
195 GCPtr /*pGC*/,
196 int /*mode*/,
197 int /*npt*/,
198 DDXPointPtr /*pptInit*/
199#endif
200);
201
202 void (* Polylines)(
203#if NeedNestedPrototypes
204 DrawablePtr /*pDrawable*/,
205 GCPtr /*pGC*/,
206 int /*mode*/,
207 int /*npt*/,
208 DDXPointPtr /*pptInit*/
209#endif
210);
211
212 void (* PolySegment)(
213#if NeedNestedPrototypes
214 DrawablePtr /*pDrawable*/,
215 GCPtr /*pGC*/,
216 int /*nseg*/,
217 xSegment * /*pSegs*/
218#endif
219);
220
221 void (* PolyRectangle)(
222#if NeedNestedPrototypes
223 DrawablePtr /*pDrawable*/,
224 GCPtr /*pGC*/,
225 int /*nrects*/,
226 xRectangle * /*pRects*/
227#endif
228);
229
230 void (* PolyArc)(
231#if NeedNestedPrototypes
232 DrawablePtr /*pDrawable*/,
233 GCPtr /*pGC*/,
234 int /*narcs*/,
235 xArc * /*parcs*/
236#endif
237);
238
239 void (* FillPolygon)(
240#if NeedNestedPrototypes
241 DrawablePtr /*pDrawable*/,
242 GCPtr /*pGC*/,
243 int /*shape*/,
244 int /*mode*/,
245 int /*count*/,
246 DDXPointPtr /*pPts*/
247#endif
248);
249
250 void (* PolyFillRect)(
251#if NeedNestedPrototypes
252 DrawablePtr /*pDrawable*/,
253 GCPtr /*pGC*/,
254 int /*nrectFill*/,
255 xRectangle * /*prectInit*/
256#endif
257);
258
259 void (* PolyFillArc)(
260#if NeedNestedPrototypes
261 DrawablePtr /*pDrawable*/,
262 GCPtr /*pGC*/,
263 int /*narcs*/,
264 xArc * /*parcs*/
265#endif
266);
267
268 int (* PolyText8)(
269#if NeedNestedPrototypes
270 DrawablePtr /*pDrawable*/,
271 GCPtr /*pGC*/,
272 int /*x*/,
273 int /*y*/,
274 int /*count*/,
275 char * /*chars*/
276#endif
277);
278
279 int (* PolyText16)(
280#if NeedNestedPrototypes
281 DrawablePtr /*pDrawable*/,
282 GCPtr /*pGC*/,
283 int /*x*/,
284 int /*y*/,
285 int /*count*/,
286 unsigned short * /*chars*/
287#endif
288);
289
290 void (* ImageText8)(
291#if NeedNestedPrototypes
292 DrawablePtr /*pDrawable*/,
293 GCPtr /*pGC*/,
294 int /*x*/,
295 int /*y*/,
296 int /*count*/,
297 char * /*chars*/
298#endif
299);
300
301 void (* ImageText16)(
302#if NeedNestedPrototypes
303 DrawablePtr /*pDrawable*/,
304 GCPtr /*pGC*/,
305 int /*x*/,
306 int /*y*/,
307 int /*count*/,
308 unsigned short * /*chars*/
309#endif
310);
311
312 void (* ImageGlyphBlt)(
313#if NeedNestedPrototypes
314 DrawablePtr /*pDrawable*/,
315 GCPtr /*pGC*/,
316 int /*x*/,
317 int /*y*/,
318 unsigned int /*nglyph*/,
319 CharInfoPtr * /*ppci*/,
320 pointer /*pglyphBase*/
321#endif
322);
323
324 void (* PolyGlyphBlt)(
325#if NeedNestedPrototypes
326 DrawablePtr /*pDrawable*/,
327 GCPtr /*pGC*/,
328 int /*x*/,
329 int /*y*/,
330 unsigned int /*nglyph*/,
331 CharInfoPtr * /*ppci*/,
332 pointer /*pglyphBase*/
333#endif
334);
335
336 void (* PushPixels)(
337#if NeedNestedPrototypes
338 GCPtr /*pGC*/,
339 PixmapPtr /*pBitMap*/,
340 DrawablePtr /*pDst*/,
341 int /*w*/,
342 int /*h*/,
343 int /*x*/,
344 int /*y*/
345#endif
346);
347
348#ifdef NEED_LINEHELPER
349 void (* LineHelper)();
350#endif
351
352 DevUnion devPrivate;
353} GCOps;
354
355/* there is padding in the bit fields because the Sun compiler doesn't
356 * force alignment to 32-bit boundaries. losers.
357 */
358typedef struct _GC {
359 ScreenPtr pScreen;
360 unsigned char depth;
361 unsigned char alu;
362 unsigned short lineWidth;
363 unsigned short dashOffset;
364 unsigned short numInDashList;
365 unsigned char *dash;
366 unsigned int lineStyle : 2;
367 unsigned int capStyle : 2;
368 unsigned int joinStyle : 2;
369 unsigned int fillStyle : 2;
370 unsigned int fillRule : 1;
371 unsigned int arcMode : 1;
372 unsigned int subWindowMode : 1;
373 unsigned int graphicsExposures : 1;
374 unsigned int clientClipType : 2; /* CT_<kind> */
375 unsigned int miTranslate:1; /* should mi things translate? */
376 unsigned int tileIsPixel:1; /* tile is solid pixel */
377 unsigned int fExpose:1; /* Call exposure handling */
378 unsigned int freeCompClip:1; /* Free composite clip */
379 unsigned int unused:14; /* see comment above */
380 unsigned long planemask;
381 unsigned long fgPixel;
382 unsigned long bgPixel;
383 /*
384 * alas -- both tile and stipple must be here as they
385 * are independently specifiable
386 */
387 PixUnion tile;
388 PixmapPtr stipple;
389 DDXPointRec patOrg; /* origin for (tile, stipple) */
390 struct _Font *font;
391 DDXPointRec clipOrg;
392 DDXPointRec lastWinOrg; /* position of window last validated */
393 pointer clientClip;
394 unsigned long stateChanges; /* masked with GC_<kind> */
395 unsigned long serialNumber;
396 GCFuncs *funcs;
397 GCOps *ops;
398 DevUnion *devPrivates;
399 /*
400 * The following were moved here from private storage to allow device-
401 * independent access to them from screen wrappers.
402 * --- 1997.11.03 Marc Aurele La France ([email protected])
403 */
404 PixmapPtr pRotatedPixmap; /* tile/stipple rotated for alignment */
405 RegionPtr pCompositeClip;
406 /* fExpose & freeCompClip defined above */
407} GC;
408
409#endif /* GCSTRUCT_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