VirtualBox

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

最後變更 在這個檔案從67129是 51223,由 vboxsync 提交於 11 年 前

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

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.2 KB
 
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.7 2003/04/27 21:31:04 herrb Exp $ */
51
52#ifndef GCSTRUCT_H
53#define GCSTRUCT_H
54
55#include "gc.h"
56
57#include "regionstr.h"
58#include "region.h"
59#include "pixmap.h"
60#include "screenint.h"
61#include <X11/Xprotostr.h>
62
63/*
64 * functions which modify the state of the GC
65 */
66
67typedef struct _GCFuncs {
68 void (* ValidateGC)(
69 GCPtr /*pGC*/,
70 unsigned long /*stateChanges*/,
71 DrawablePtr /*pDrawable*/);
72
73 void (* ChangeGC)(
74 GCPtr /*pGC*/,
75 unsigned long /*mask*/);
76
77 void (* CopyGC)(
78 GCPtr /*pGCSrc*/,
79 unsigned long /*mask*/,
80 GCPtr /*pGCDst*/);
81
82 void (* DestroyGC)(
83 GCPtr /*pGC*/);
84
85 void (* ChangeClip)(
86 GCPtr /*pGC*/,
87 int /*type*/,
88 pointer /*pvalue*/,
89 int /*nrects*/);
90
91 void (* DestroyClip)(
92 GCPtr /*pGC*/);
93
94 void (* CopyClip)(
95 GCPtr /*pgcDst*/,
96 GCPtr /*pgcSrc*/);
97 DevUnion devPrivate;
98} GCFuncs;
99
100/*
101 * graphics operations invoked through a GC
102 */
103
104typedef struct _GCOps {
105 void (* FillSpans)(
106 DrawablePtr /*pDrawable*/,
107 GCPtr /*pGC*/,
108 int /*nInit*/,
109 DDXPointPtr /*pptInit*/,
110 int * /*pwidthInit*/,
111 int /*fSorted*/);
112
113 void (* SetSpans)(
114 DrawablePtr /*pDrawable*/,
115 GCPtr /*pGC*/,
116 char * /*psrc*/,
117 DDXPointPtr /*ppt*/,
118 int * /*pwidth*/,
119 int /*nspans*/,
120 int /*fSorted*/);
121
122 void (* PutImage)(
123 DrawablePtr /*pDrawable*/,
124 GCPtr /*pGC*/,
125 int /*depth*/,
126 int /*x*/,
127 int /*y*/,
128 int /*w*/,
129 int /*h*/,
130 int /*leftPad*/,
131 int /*format*/,
132 char * /*pBits*/);
133
134 RegionPtr (* CopyArea)(
135 DrawablePtr /*pSrc*/,
136 DrawablePtr /*pDst*/,
137 GCPtr /*pGC*/,
138 int /*srcx*/,
139 int /*srcy*/,
140 int /*w*/,
141 int /*h*/,
142 int /*dstx*/,
143 int /*dsty*/);
144
145 RegionPtr (* CopyPlane)(
146 DrawablePtr /*pSrcDrawable*/,
147 DrawablePtr /*pDstDrawable*/,
148 GCPtr /*pGC*/,
149 int /*srcx*/,
150 int /*srcy*/,
151 int /*width*/,
152 int /*height*/,
153 int /*dstx*/,
154 int /*dsty*/,
155 unsigned long /*bitPlane*/);
156 void (* PolyPoint)(
157 DrawablePtr /*pDrawable*/,
158 GCPtr /*pGC*/,
159 int /*mode*/,
160 int /*npt*/,
161 DDXPointPtr /*pptInit*/);
162
163 void (* Polylines)(
164 DrawablePtr /*pDrawable*/,
165 GCPtr /*pGC*/,
166 int /*mode*/,
167 int /*npt*/,
168 DDXPointPtr /*pptInit*/);
169
170 void (* PolySegment)(
171 DrawablePtr /*pDrawable*/,
172 GCPtr /*pGC*/,
173 int /*nseg*/,
174 xSegment * /*pSegs*/);
175
176 void (* PolyRectangle)(
177 DrawablePtr /*pDrawable*/,
178 GCPtr /*pGC*/,
179 int /*nrects*/,
180 xRectangle * /*pRects*/);
181
182 void (* PolyArc)(
183 DrawablePtr /*pDrawable*/,
184 GCPtr /*pGC*/,
185 int /*narcs*/,
186 xArc * /*parcs*/);
187
188 void (* FillPolygon)(
189 DrawablePtr /*pDrawable*/,
190 GCPtr /*pGC*/,
191 int /*shape*/,
192 int /*mode*/,
193 int /*count*/,
194 DDXPointPtr /*pPts*/);
195
196 void (* PolyFillRect)(
197 DrawablePtr /*pDrawable*/,
198 GCPtr /*pGC*/,
199 int /*nrectFill*/,
200 xRectangle * /*prectInit*/);
201
202 void (* PolyFillArc)(
203 DrawablePtr /*pDrawable*/,
204 GCPtr /*pGC*/,
205 int /*narcs*/,
206 xArc * /*parcs*/);
207
208 int (* PolyText8)(
209 DrawablePtr /*pDrawable*/,
210 GCPtr /*pGC*/,
211 int /*x*/,
212 int /*y*/,
213 int /*count*/,
214 char * /*chars*/);
215
216 int (* PolyText16)(
217 DrawablePtr /*pDrawable*/,
218 GCPtr /*pGC*/,
219 int /*x*/,
220 int /*y*/,
221 int /*count*/,
222 unsigned short * /*chars*/);
223
224 void (* ImageText8)(
225 DrawablePtr /*pDrawable*/,
226 GCPtr /*pGC*/,
227 int /*x*/,
228 int /*y*/,
229 int /*count*/,
230 char * /*chars*/);
231
232 void (* ImageText16)(
233 DrawablePtr /*pDrawable*/,
234 GCPtr /*pGC*/,
235 int /*x*/,
236 int /*y*/,
237 int /*count*/,
238 unsigned short * /*chars*/);
239
240 void (* ImageGlyphBlt)(
241 DrawablePtr /*pDrawable*/,
242 GCPtr /*pGC*/,
243 int /*x*/,
244 int /*y*/,
245 unsigned int /*nglyph*/,
246 CharInfoPtr * /*ppci*/,
247 pointer /*pglyphBase*/);
248
249 void (* PolyGlyphBlt)(
250 DrawablePtr /*pDrawable*/,
251 GCPtr /*pGC*/,
252 int /*x*/,
253 int /*y*/,
254 unsigned int /*nglyph*/,
255 CharInfoPtr * /*ppci*/,
256 pointer /*pglyphBase*/);
257
258 void (* PushPixels)(
259 GCPtr /*pGC*/,
260 PixmapPtr /*pBitMap*/,
261 DrawablePtr /*pDst*/,
262 int /*w*/,
263 int /*h*/,
264 int /*x*/,
265 int /*y*/);
266
267#ifdef NEED_LINEHELPER
268 void (* LineHelper)();
269#endif
270
271 DevUnion devPrivate;
272} GCOps;
273
274/* there is padding in the bit fields because the Sun compiler doesn't
275 * force alignment to 32-bit boundaries. losers.
276 */
277typedef struct _GC {
278 ScreenPtr pScreen;
279 unsigned char depth;
280 unsigned char alu;
281 unsigned short lineWidth;
282 unsigned short dashOffset;
283 unsigned short numInDashList;
284 unsigned char *dash;
285 unsigned int lineStyle : 2;
286 unsigned int capStyle : 2;
287 unsigned int joinStyle : 2;
288 unsigned int fillStyle : 2;
289 unsigned int fillRule : 1;
290 unsigned int arcMode : 1;
291 unsigned int subWindowMode : 1;
292 unsigned int graphicsExposures : 1;
293 unsigned int clientClipType : 2; /* CT_<kind> */
294 unsigned int miTranslate:1; /* should mi things translate? */
295 unsigned int tileIsPixel:1; /* tile is solid pixel */
296 unsigned int fExpose:1; /* Call exposure handling */
297 unsigned int freeCompClip:1; /* Free composite clip */
298 unsigned int unused:14; /* see comment above */
299 unsigned long planemask;
300 unsigned long fgPixel;
301 unsigned long bgPixel;
302 /*
303 * alas -- both tile and stipple must be here as they
304 * are independently specifiable
305 */
306 PixUnion tile;
307 PixmapPtr stipple;
308 DDXPointRec patOrg; /* origin for (tile, stipple) */
309 struct _Font *font;
310 DDXPointRec clipOrg;
311 DDXPointRec lastWinOrg; /* position of window last validated */
312 pointer clientClip;
313 unsigned long stateChanges; /* masked with GC_<kind> */
314 unsigned long serialNumber;
315 GCFuncs *funcs;
316 GCOps *ops;
317 DevUnion *devPrivates;
318 /*
319 * The following were moved here from private storage to allow device-
320 * independent access to them from screen wrappers.
321 * --- 1997.11.03 Marc Aurele La France ([email protected])
322 */
323 PixmapPtr pRotatedPixmap; /* tile/stipple rotated for alignment */
324 RegionPtr pCompositeClip;
325 /* fExpose & freeCompClip defined above */
326} GC;
327
328#endif /* GCSTRUCT_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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