VirtualBox

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

最後變更 在這個檔案從68753是 40349,由 vboxsync 提交於 13 年 前

Additions/xorg: support X.Org Server 1.12.

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.0 KB
 
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 "privates.h"
60#include <X11/Xprotostr.h>
61
62#define GCAllBits ((1 << (GCLastBit + 1)) - 1)
63
64/*
65 * functions which modify the state of the GC
66 */
67
68typedef struct _GCFuncs {
69 void (* ValidateGC)(
70 GCPtr /*pGC*/,
71 unsigned long /*stateChanges*/,
72 DrawablePtr /*pDrawable*/);
73
74 void (* ChangeGC)(
75 GCPtr /*pGC*/,
76 unsigned long /*mask*/);
77
78 void (* CopyGC)(
79 GCPtr /*pGCSrc*/,
80 unsigned long /*mask*/,
81 GCPtr /*pGCDst*/);
82
83 void (* DestroyGC)(
84 GCPtr /*pGC*/);
85
86 void (* ChangeClip)(
87 GCPtr /*pGC*/,
88 int /*type*/,
89 pointer /*pvalue*/,
90 int /*nrects*/);
91
92 void (* DestroyClip)(
93 GCPtr /*pGC*/);
94
95 void (* CopyClip)(
96 GCPtr /*pgcDst*/,
97 GCPtr /*pgcSrc*/);
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} 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 scratch_inuse:1; /* is this GC in a pool for reuse? */
293 unsigned int unused:13; /* see comment above */
294 unsigned long planemask;
295 unsigned long fgPixel;
296 unsigned long bgPixel;
297 /*
298 * alas -- both tile and stipple must be here as they
299 * are independently specifiable
300 */
301 PixUnion tile;
302 PixmapPtr stipple;
303 DDXPointRec patOrg; /* origin for (tile, stipple) */
304 struct _Font *font;
305 DDXPointRec clipOrg;
306 pointer clientClip;
307 unsigned long stateChanges; /* masked with GC_<kind> */
308 unsigned long serialNumber;
309 GCFuncs *funcs;
310 GCOps *ops;
311 PrivateRec *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 */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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