VirtualBox

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

最後變更 在這個檔案是 28062,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: header files for building X.Org server 1.8 drivers

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

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