VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/scrnintstr.h@ 78293

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

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

  • Property svn:eol-style set to native
File size: 16.0 KB
Line 
1/* $Xorg: scrnintstr.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/* $XFree86: xc/programs/Xserver/include/scrnintstr.h,v 1.12 2003/04/27 21:31:05 herrb Exp $ */
49
50#ifndef SCREENINTSTRUCT_H
51#define SCREENINTSTRUCT_H
52
53#include "screenint.h"
54#include "regionstr.h"
55#include "bstore.h"
56#include "colormap.h"
57#include "cursor.h"
58#include "validate.h"
59#include <X11/Xproto.h>
60#include "dix.h"
61
62typedef struct _PixmapFormat {
63 unsigned char depth;
64 unsigned char bitsPerPixel;
65 unsigned char scanlinePad;
66 } PixmapFormatRec;
67
68typedef struct _Visual {
69 VisualID vid;
70 short class;
71 short bitsPerRGBValue;
72 short ColormapEntries;
73 short nplanes;/* = log2 (ColormapEntries). This does not
74 * imply that the screen has this many planes.
75 * it may have more or fewer */
76 unsigned long redMask, greenMask, blueMask;
77 int offsetRed, offsetGreen, offsetBlue;
78 } VisualRec;
79
80typedef struct _Depth {
81 unsigned char depth;
82 short numVids;
83 VisualID *vids; /* block of visual ids for this depth */
84 } DepthRec;
85
86
87/*
88 * There is a typedef for each screen function pointer so that code that
89 * needs to declare a screen function pointer (e.g. in a screen private
90 * or as a local variable) can easily do so and retain full type checking.
91 */
92
93typedef Bool (* CloseScreenProcPtr)(
94 int /*index*/,
95 ScreenPtr /*pScreen*/);
96
97typedef void (* QueryBestSizeProcPtr)(
98 int /*class*/,
99 unsigned short * /*pwidth*/,
100 unsigned short * /*pheight*/,
101 ScreenPtr /*pScreen*/);
102
103typedef Bool (* SaveScreenProcPtr)(
104 ScreenPtr /*pScreen*/,
105 int /*on*/);
106
107typedef void (* GetImageProcPtr)(
108 DrawablePtr /*pDrawable*/,
109 int /*sx*/,
110 int /*sy*/,
111 int /*w*/,
112 int /*h*/,
113 unsigned int /*format*/,
114 unsigned long /*planeMask*/,
115 char * /*pdstLine*/);
116
117typedef void (* GetSpansProcPtr)(
118 DrawablePtr /*pDrawable*/,
119 int /*wMax*/,
120 DDXPointPtr /*ppt*/,
121 int* /*pwidth*/,
122 int /*nspans*/,
123 char * /*pdstStart*/);
124
125typedef void (* PointerNonInterestBoxProcPtr)(
126 ScreenPtr /*pScreen*/,
127 BoxPtr /*pBox*/);
128
129typedef void (* SourceValidateProcPtr)(
130 DrawablePtr /*pDrawable*/,
131 int /*x*/,
132 int /*y*/,
133 int /*width*/,
134 int /*height*/);
135
136typedef Bool (* CreateWindowProcPtr)(
137 WindowPtr /*pWindow*/);
138
139typedef Bool (* DestroyWindowProcPtr)(
140 WindowPtr /*pWindow*/);
141
142typedef Bool (* PositionWindowProcPtr)(
143 WindowPtr /*pWindow*/,
144 int /*x*/,
145 int /*y*/);
146
147typedef Bool (* ChangeWindowAttributesProcPtr)(
148 WindowPtr /*pWindow*/,
149 unsigned long /*mask*/);
150
151typedef Bool (* RealizeWindowProcPtr)(
152 WindowPtr /*pWindow*/);
153
154typedef Bool (* UnrealizeWindowProcPtr)(
155 WindowPtr /*pWindow*/);
156
157typedef void (* RestackWindowProcPtr)(
158 WindowPtr /*pWindow*/,
159 WindowPtr /*pOldNextSib*/);
160
161typedef int (* ValidateTreeProcPtr)(
162 WindowPtr /*pParent*/,
163 WindowPtr /*pChild*/,
164 VTKind /*kind*/);
165
166typedef void (* PostValidateTreeProcPtr)(
167 WindowPtr /*pParent*/,
168 WindowPtr /*pChild*/,
169 VTKind /*kind*/);
170
171typedef void (* WindowExposuresProcPtr)(
172 WindowPtr /*pWindow*/,
173 RegionPtr /*prgn*/,
174 RegionPtr /*other_exposed*/);
175
176typedef void (* PaintWindowProcPtr)(
177 WindowPtr /*pWindow*/,
178 RegionPtr /*pRegion*/,
179 int /*what*/);
180
181typedef PaintWindowProcPtr PaintWindowBackgroundProcPtr;
182typedef PaintWindowProcPtr PaintWindowBorderProcPtr;
183
184typedef void (* CopyWindowProcPtr)(
185 WindowPtr /*pWindow*/,
186 DDXPointRec /*ptOldOrg*/,
187 RegionPtr /*prgnSrc*/);
188
189typedef void (* ClearToBackgroundProcPtr)(
190 WindowPtr /*pWindow*/,
191 int /*x*/,
192 int /*y*/,
193 int /*w*/,
194 int /*h*/,
195 Bool /*generateExposures*/);
196
197typedef void (* ClipNotifyProcPtr)(
198 WindowPtr /*pWindow*/,
199 int /*dx*/,
200 int /*dy*/);
201
202typedef PixmapPtr (* CreatePixmapProcPtr)(
203 ScreenPtr /*pScreen*/,
204 int /*width*/,
205 int /*height*/,
206 int /*depth*/);
207
208typedef Bool (* DestroyPixmapProcPtr)(
209 PixmapPtr /*pPixmap*/);
210
211typedef void (* SaveDoomedAreasProcPtr)(
212 WindowPtr /*pWindow*/,
213 RegionPtr /*prgnSave*/,
214 int /*xorg*/,
215 int /*yorg*/);
216
217typedef RegionPtr (* RestoreAreasProcPtr)(
218 WindowPtr /*pWindow*/,
219 RegionPtr /*prgnRestore*/);
220
221typedef void (* ExposeCopyProcPtr)(
222 WindowPtr /*pSrc*/,
223 DrawablePtr /*pDst*/,
224 GCPtr /*pGC*/,
225 RegionPtr /*prgnExposed*/,
226 int /*srcx*/,
227 int /*srcy*/,
228 int /*dstx*/,
229 int /*dsty*/,
230 unsigned long /*plane*/);
231
232typedef RegionPtr (* TranslateBackingStoreProcPtr)(
233 WindowPtr /*pWindow*/,
234 int /*windx*/,
235 int /*windy*/,
236 RegionPtr /*oldClip*/,
237 int /*oldx*/,
238 int /*oldy*/);
239
240typedef RegionPtr (* ClearBackingStoreProcPtr)(
241 WindowPtr /*pWindow*/,
242 int /*x*/,
243 int /*y*/,
244 int /*w*/,
245 int /*h*/,
246 Bool /*generateExposures*/);
247
248typedef void (* DrawGuaranteeProcPtr)(
249 WindowPtr /*pWindow*/,
250 GCPtr /*pGC*/,
251 int /*guarantee*/);
252
253typedef Bool (* RealizeFontProcPtr)(
254 ScreenPtr /*pScreen*/,
255 FontPtr /*pFont*/);
256
257typedef Bool (* UnrealizeFontProcPtr)(
258 ScreenPtr /*pScreen*/,
259 FontPtr /*pFont*/);
260
261typedef void (* ConstrainCursorProcPtr)(
262 ScreenPtr /*pScreen*/,
263 BoxPtr /*pBox*/);
264
265typedef void (* CursorLimitsProcPtr)(
266 ScreenPtr /*pScreen*/,
267 CursorPtr /*pCursor*/,
268 BoxPtr /*pHotBox*/,
269 BoxPtr /*pTopLeftBox*/);
270
271typedef Bool (* DisplayCursorProcPtr)(
272 ScreenPtr /*pScreen*/,
273 CursorPtr /*pCursor*/);
274
275typedef Bool (* RealizeCursorProcPtr)(
276 ScreenPtr /*pScreen*/,
277 CursorPtr /*pCursor*/);
278
279typedef Bool (* UnrealizeCursorProcPtr)(
280 ScreenPtr /*pScreen*/,
281 CursorPtr /*pCursor*/);
282
283typedef void (* RecolorCursorProcPtr)(
284 ScreenPtr /*pScreen*/,
285 CursorPtr /*pCursor*/,
286 Bool /*displayed*/);
287
288typedef Bool (* SetCursorPositionProcPtr)(
289 ScreenPtr /*pScreen*/,
290 int /*x*/,
291 int /*y*/,
292 Bool /*generateEvent*/);
293
294typedef Bool (* CreateGCProcPtr)(
295 GCPtr /*pGC*/);
296
297typedef Bool (* CreateColormapProcPtr)(
298 ColormapPtr /*pColormap*/);
299
300typedef void (* DestroyColormapProcPtr)(
301 ColormapPtr /*pColormap*/);
302
303typedef void (* InstallColormapProcPtr)(
304 ColormapPtr /*pColormap*/);
305
306typedef void (* UninstallColormapProcPtr)(
307 ColormapPtr /*pColormap*/);
308
309typedef int (* ListInstalledColormapsProcPtr) (
310 ScreenPtr /*pScreen*/,
311 XID* /*pmaps */);
312
313typedef void (* StoreColorsProcPtr)(
314 ColormapPtr /*pColormap*/,
315 int /*ndef*/,
316 xColorItem * /*pdef*/);
317
318typedef void (* ResolveColorProcPtr)(
319 unsigned short* /*pred*/,
320 unsigned short* /*pgreen*/,
321 unsigned short* /*pblue*/,
322 VisualPtr /*pVisual*/);
323
324typedef RegionPtr (* BitmapToRegionProcPtr)(
325 PixmapPtr /*pPix*/);
326
327typedef void (* SendGraphicsExposeProcPtr)(
328 ClientPtr /*client*/,
329 RegionPtr /*pRgn*/,
330 XID /*drawable*/,
331 int /*major*/,
332 int /*minor*/);
333
334typedef void (* ScreenBlockHandlerProcPtr)(
335 int /*screenNum*/,
336 pointer /*blockData*/,
337 pointer /*pTimeout*/,
338 pointer /*pReadmask*/);
339
340typedef void (* ScreenWakeupHandlerProcPtr)(
341 int /*screenNum*/,
342 pointer /*wakeupData*/,
343 unsigned long /*result*/,
344 pointer /*pReadMask*/);
345
346typedef Bool (* CreateScreenResourcesProcPtr)(
347 ScreenPtr /*pScreen*/);
348
349typedef Bool (* ModifyPixmapHeaderProcPtr)(
350 PixmapPtr /*pPixmap*/,
351 int /*width*/,
352 int /*height*/,
353 int /*depth*/,
354 int /*bitsPerPixel*/,
355 int /*devKind*/,
356 pointer /*pPixData*/);
357
358typedef PixmapPtr (* GetWindowPixmapProcPtr)(
359 WindowPtr /*pWin*/);
360
361typedef void (* SetWindowPixmapProcPtr)(
362 WindowPtr /*pWin*/,
363 PixmapPtr /*pPix*/);
364
365typedef PixmapPtr (* GetScreenPixmapProcPtr)(
366 ScreenPtr /*pScreen*/);
367
368typedef void (* SetScreenPixmapProcPtr)(
369 PixmapPtr /*pPix*/);
370
371typedef void (* MarkWindowProcPtr)(
372 WindowPtr /*pWin*/);
373
374typedef Bool (* MarkOverlappedWindowsProcPtr)(
375 WindowPtr /*parent*/,
376 WindowPtr /*firstChild*/,
377 WindowPtr * /*pLayerWin*/);
378
379typedef Bool (* ChangeSaveUnderProcPtr)(
380 WindowPtr /*pLayerWin*/,
381 WindowPtr /*firstChild*/);
382
383typedef void (* PostChangeSaveUnderProcPtr)(
384 WindowPtr /*pLayerWin*/,
385 WindowPtr /*firstChild*/);
386
387typedef void (* MoveWindowProcPtr)(
388 WindowPtr /*pWin*/,
389 int /*x*/,
390 int /*y*/,
391 WindowPtr /*pSib*/,
392 VTKind /*kind*/);
393
394typedef void (* ResizeWindowProcPtr)(
395 WindowPtr /*pWin*/,
396 int /*x*/,
397 int /*y*/,
398 unsigned int /*w*/,
399 unsigned int /*h*/,
400 WindowPtr /*pSib*/
401);
402
403typedef WindowPtr (* GetLayerWindowProcPtr)(
404 WindowPtr /*pWin*/
405);
406
407typedef void (* HandleExposuresProcPtr)(
408 WindowPtr /*pWin*/);
409
410typedef void (* ReparentWindowProcPtr)(
411 WindowPtr /*pWin*/,
412 WindowPtr /*pPriorParent*/);
413
414#ifdef SHAPE
415typedef void (* SetShapeProcPtr)(
416 WindowPtr /*pWin*/);
417#endif /* SHAPE */
418
419typedef void (* ChangeBorderWidthProcPtr)(
420 WindowPtr /*pWin*/,
421 unsigned int /*width*/);
422
423typedef void (* MarkUnrealizedWindowProcPtr)(
424 WindowPtr /*pChild*/,
425 WindowPtr /*pWin*/,
426 Bool /*fromConfigure*/);
427
428typedef struct _Screen {
429 int myNum; /* index of this instance in Screens[] */
430 ATOM id;
431 short width, height;
432 short mmWidth, mmHeight;
433 short numDepths;
434 unsigned char rootDepth;
435 DepthPtr allowedDepths;
436 unsigned long rootVisual;
437 unsigned long defColormap;
438 short minInstalledCmaps, maxInstalledCmaps;
439 char backingStoreSupport, saveUnderSupport;
440 unsigned long whitePixel, blackPixel;
441 unsigned long rgf; /* array of flags; she's -- HUNGARIAN */
442 GCPtr GCperDepth[MAXFORMATS+1];
443 /* next field is a stipple to use as default in
444 a GC. we don't build default tiles of all depths
445 because they are likely to be of a color
446 different from the default fg pixel, so
447 we don't win anything by building
448 a standard one.
449 */
450 PixmapPtr PixmapPerDepth[1];
451 pointer devPrivate;
452 short numVisuals;
453 VisualPtr visuals;
454 int WindowPrivateLen;
455 unsigned *WindowPrivateSizes;
456 unsigned totalWindowSize;
457 int GCPrivateLen;
458 unsigned *GCPrivateSizes;
459 unsigned totalGCSize;
460
461 /* Random screen procedures */
462
463 CloseScreenProcPtr CloseScreen;
464 QueryBestSizeProcPtr QueryBestSize;
465 SaveScreenProcPtr SaveScreen;
466 GetImageProcPtr GetImage;
467 GetSpansProcPtr GetSpans;
468 PointerNonInterestBoxProcPtr PointerNonInterestBox;
469 SourceValidateProcPtr SourceValidate;
470
471 /* Window Procedures */
472
473 CreateWindowProcPtr CreateWindow;
474 DestroyWindowProcPtr DestroyWindow;
475 PositionWindowProcPtr PositionWindow;
476 ChangeWindowAttributesProcPtr ChangeWindowAttributes;
477 RealizeWindowProcPtr RealizeWindow;
478 UnrealizeWindowProcPtr UnrealizeWindow;
479 ValidateTreeProcPtr ValidateTree;
480 PostValidateTreeProcPtr PostValidateTree;
481 WindowExposuresProcPtr WindowExposures;
482 PaintWindowBackgroundProcPtr PaintWindowBackground;
483 PaintWindowBorderProcPtr PaintWindowBorder;
484 CopyWindowProcPtr CopyWindow;
485 ClearToBackgroundProcPtr ClearToBackground;
486 ClipNotifyProcPtr ClipNotify;
487 RestackWindowProcPtr RestackWindow;
488
489 /* Pixmap procedures */
490
491 CreatePixmapProcPtr CreatePixmap;
492 DestroyPixmapProcPtr DestroyPixmap;
493
494 /* Backing store procedures */
495
496 SaveDoomedAreasProcPtr SaveDoomedAreas;
497 RestoreAreasProcPtr RestoreAreas;
498 ExposeCopyProcPtr ExposeCopy;
499 TranslateBackingStoreProcPtr TranslateBackingStore;
500 ClearBackingStoreProcPtr ClearBackingStore;
501 DrawGuaranteeProcPtr DrawGuarantee;
502 /*
503 * A read/write copy of the lower level backing store vector is needed now
504 * that the functions can be wrapped.
505 */
506 BSFuncRec BackingStoreFuncs;
507
508 /* Font procedures */
509
510 RealizeFontProcPtr RealizeFont;
511 UnrealizeFontProcPtr UnrealizeFont;
512
513 /* Cursor Procedures */
514
515 ConstrainCursorProcPtr ConstrainCursor;
516 CursorLimitsProcPtr CursorLimits;
517 DisplayCursorProcPtr DisplayCursor;
518 RealizeCursorProcPtr RealizeCursor;
519 UnrealizeCursorProcPtr UnrealizeCursor;
520 RecolorCursorProcPtr RecolorCursor;
521 SetCursorPositionProcPtr SetCursorPosition;
522
523 /* GC procedures */
524
525 CreateGCProcPtr CreateGC;
526
527 /* Colormap procedures */
528
529 CreateColormapProcPtr CreateColormap;
530 DestroyColormapProcPtr DestroyColormap;
531 InstallColormapProcPtr InstallColormap;
532 UninstallColormapProcPtr UninstallColormap;
533 ListInstalledColormapsProcPtr ListInstalledColormaps;
534 StoreColorsProcPtr StoreColors;
535 ResolveColorProcPtr ResolveColor;
536
537 /* Region procedures */
538
539 BitmapToRegionProcPtr BitmapToRegion;
540 SendGraphicsExposeProcPtr SendGraphicsExpose;
541
542 /* os layer procedures */
543
544 ScreenBlockHandlerProcPtr BlockHandler;
545 ScreenWakeupHandlerProcPtr WakeupHandler;
546
547 pointer blockData;
548 pointer wakeupData;
549
550 /* anybody can get a piece of this array */
551 DevUnion *devPrivates;
552
553 CreateScreenResourcesProcPtr CreateScreenResources;
554 ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
555
556 GetWindowPixmapProcPtr GetWindowPixmap;
557 SetWindowPixmapProcPtr SetWindowPixmap;
558 GetScreenPixmapProcPtr GetScreenPixmap;
559 SetScreenPixmapProcPtr SetScreenPixmap;
560
561 PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
562
563#ifdef PIXPRIV
564 int PixmapPrivateLen;
565 unsigned int *PixmapPrivateSizes;
566 unsigned int totalPixmapSize;
567#endif
568
569 MarkWindowProcPtr MarkWindow;
570 MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
571 ChangeSaveUnderProcPtr ChangeSaveUnder;
572 PostChangeSaveUnderProcPtr PostChangeSaveUnder;
573 MoveWindowProcPtr MoveWindow;
574 ResizeWindowProcPtr ResizeWindow;
575 GetLayerWindowProcPtr GetLayerWindow;
576 HandleExposuresProcPtr HandleExposures;
577 ReparentWindowProcPtr ReparentWindow;
578
579#ifdef SHAPE
580 SetShapeProcPtr SetShape;
581#endif /* SHAPE */
582
583 ChangeBorderWidthProcPtr ChangeBorderWidth;
584 MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
585
586} ScreenRec;
587
588typedef struct _ScreenInfo {
589 int imageByteOrder;
590 int bitmapScanlineUnit;
591 int bitmapScanlinePad;
592 int bitmapBitOrder;
593 int numPixmapFormats;
594 PixmapFormatRec
595 formats[MAXFORMATS];
596 int arraySize;
597 int numScreens;
598 ScreenPtr screens[MAXSCREENS];
599 int numVideoScreens;
600} ScreenInfo;
601
602extern ScreenInfo screenInfo;
603
604extern void InitOutput(
605 ScreenInfo * /*pScreenInfo*/,
606 int /*argc*/,
607 char ** /*argv*/);
608
609#endif /* SCREENINTSTRUCT_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