VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/gcstruct.h@ 33428

Last change on this file since 33428 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

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