1 /* $XConsortium: gcstruct.h,v 5.10 94/04/17 20:25:45 dpw Exp $ */
2 /***********************************************************
4 Copyright (c) 1987 X Consortium
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of the X Consortium shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from the X Consortium.
28 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
32 Permission to use, copy, modify, and distribute this software and its
33 documentation for any purpose and without fee is hereby granted,
34 provided that the above copyright notice appear in all copies and that
35 both that copyright notice and this permission notice appear in
36 supporting documentation, and that the name of Digital not be
37 used in advertising or publicity pertaining to distribution of the
38 software without specific, written prior permission.
40 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48 ******************************************************************/
55 #include "miscstruct.h"
58 #include "screenint.h"
59 #include "Xprotostr.h"
62 * functions which modify the state of the GC
65 typedef struct _GCFuncs {
67 #if NeedNestedPrototypes
69 unsigned long /*stateChanges*/,
70 DrawablePtr /*pDrawable*/
75 #if NeedNestedPrototypes
77 unsigned long /*mask*/
82 #if NeedNestedPrototypes
84 unsigned long /*mask*/,
90 #if NeedNestedPrototypes
96 #if NeedNestedPrototypes
104 void (* DestroyClip)(
105 #if NeedNestedPrototypes
111 #if NeedNestedPrototypes
120 * graphics operations invoked through a GC
123 typedef struct _GCOps {
125 #if NeedNestedPrototypes
126 DrawablePtr /*pDrawable*/,
129 DDXPointPtr /*pptInit*/,
130 int * /*pwidthInit*/,
136 #if NeedNestedPrototypes
137 DrawablePtr /*pDrawable*/,
148 #if NeedNestedPrototypes
149 DrawablePtr /*pDrawable*/,
162 RegionPtr (* CopyArea)(
163 #if NeedNestedPrototypes
164 DrawablePtr /*pSrc*/,
165 DrawablePtr /*pDst*/,
176 RegionPtr (* CopyPlane)(
177 #if NeedNestedPrototypes
178 DrawablePtr /*pSrcDrawable*/,
179 DrawablePtr /*pDstDrawable*/,
187 unsigned long /*bitPlane*/
191 #if NeedNestedPrototypes
192 DrawablePtr /*pDrawable*/,
196 DDXPointPtr /*pptInit*/
201 #if NeedNestedPrototypes
202 DrawablePtr /*pDrawable*/,
206 DDXPointPtr /*pptInit*/
210 void (* PolySegment)(
211 #if NeedNestedPrototypes
212 DrawablePtr /*pDrawable*/,
219 void (* PolyRectangle)(
220 #if NeedNestedPrototypes
221 DrawablePtr /*pDrawable*/,
224 xRectangle * /*pRects*/
229 #if NeedNestedPrototypes
230 DrawablePtr /*pDrawable*/,
237 void (* FillPolygon)(
238 #if NeedNestedPrototypes
239 DrawablePtr /*pDrawable*/,
248 void (* PolyFillRect)(
249 #if NeedNestedPrototypes
250 DrawablePtr /*pDrawable*/,
253 xRectangle * /*prectInit*/
257 void (* PolyFillArc)(
258 #if NeedNestedPrototypes
259 DrawablePtr /*pDrawable*/,
267 #if NeedNestedPrototypes
268 DrawablePtr /*pDrawable*/,
278 #if NeedNestedPrototypes
279 DrawablePtr /*pDrawable*/,
284 unsigned short * /*chars*/
289 #if NeedNestedPrototypes
290 DrawablePtr /*pDrawable*/,
299 void (* ImageText16)(
300 #if NeedNestedPrototypes
301 DrawablePtr /*pDrawable*/,
306 unsigned short * /*chars*/
310 void (* ImageGlyphBlt)(
311 #if NeedNestedPrototypes
312 DrawablePtr /*pDrawable*/,
316 unsigned int /*nglyph*/,
317 CharInfoPtr * /*ppci*/,
318 pointer /*pglyphBase*/
322 void (* PolyGlyphBlt)(
323 #if NeedNestedPrototypes
324 DrawablePtr /*pDrawable*/,
328 unsigned int /*nglyph*/,
329 CharInfoPtr * /*ppci*/,
330 pointer /*pglyphBase*/
335 #if NeedNestedPrototypes
337 PixmapPtr /*pBitMap*/,
338 DrawablePtr /*pDst*/,
346 #ifdef NEED_LINEHELPER
347 void (* LineHelper)();
353 /* there is padding in the bit fields because the Sun compiler doesn't
354 * force alignment to 32-bit boundaries. losers.
360 unsigned short lineWidth;
361 unsigned short dashOffset;
362 unsigned short numInDashList;
364 unsigned int lineStyle : 2;
365 unsigned int capStyle : 2;
366 unsigned int joinStyle : 2;
367 unsigned int fillStyle : 2;
368 unsigned int fillRule : 1;
369 unsigned int arcMode : 1;
370 unsigned int subWindowMode : 1;
371 unsigned int graphicsExposures : 1;
372 unsigned int clientClipType : 2; /* CT_<kind> */
373 unsigned int miTranslate:1; /* should mi things translate? */
374 unsigned int tileIsPixel:1; /* tile is solid pixel */
375 unsigned int unused:16; /* see comment above */
376 unsigned long planemask;
377 unsigned long fgPixel;
378 unsigned long bgPixel;
380 * alas -- both tile and stipple must be here as they
381 * are independently specifiable
385 DDXPointRec patOrg; /* origin for (tile, stipple) */
388 DDXPointRec lastWinOrg; /* position of window last validated */
390 unsigned long stateChanges; /* masked with GC_<kind> */
391 unsigned long serialNumber;
394 DevUnion *devPrivates;
397 #endif /* GCSTRUCT_H */