]> git.sesse.net Git - rdpsrv/blob - Xserver/programs/Xserver/include/scrnintstr.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / programs / Xserver / include / scrnintstr.h
1 /* $XConsortium: scrnintstr.h /main/32 1996/09/28 17:14:32 rws $ */
2 /***********************************************************
3
4 Copyright (c) 1987  X Consortium
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the name of the X Consortium shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from the X Consortium.
26
27
28 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
29
30                         All Rights Reserved
31
32 Permission to use, copy, modify, and distribute this software and its 
33 documentation for any purpose and without fee is hereby granted, 
34 provided that the above copyright notice appear in all copies and that
35 both that copyright notice and this permission notice appear in 
36 supporting documentation, and that the name of Digital not be
37 used in advertising or publicity pertaining to distribution of the
38 software without specific, written prior permission.  
39
40 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46 SOFTWARE.
47
48 ******************************************************************/
49 #ifndef SCREENINTSTRUCT_H
50 #define SCREENINTSTRUCT_H
51
52 #include "screenint.h"
53 #include "miscstruct.h"
54 #include "region.h"
55 #include "pixmap.h"
56 #include "gc.h"
57 #include "colormap.h"
58 #include "cursor.h"
59 #include "validate.h"
60 #include "window.h"
61 #include "X11/Xproto.h"
62 #include "dix.h"
63
64 typedef struct _PixmapFormat {
65     unsigned char       depth;
66     unsigned char       bitsPerPixel;
67     unsigned char       scanlinePad;
68     } PixmapFormatRec;
69     
70 typedef struct _Visual {
71     VisualID            vid;
72 #if defined(__cplusplus) || defined(c_plusplus)
73     short               c_class;
74 #else
75     short               class;
76 #endif
77     short               bitsPerRGBValue;
78     short               ColormapEntries;
79     short               nplanes;/* = log2 (ColormapEntries). This does not
80                                  * imply that the screen has this many planes.
81                                  * it may have more or fewer */
82     unsigned long       redMask, greenMask, blueMask;
83     int                 offsetRed, offsetGreen, offsetBlue;
84   } VisualRec;
85
86 typedef struct _Depth {
87     unsigned char       depth;
88     short               numVids;
89     VisualID            *vids;    /* block of visual ids for this depth */
90   } DepthRec;
91
92
93 /*
94  *  There is a typedef for each screen function pointer so that code that
95  *  needs to declare a screen function pointer (e.g. in a screen private
96  *  or as a local variable) can easily do so and retain full type checking.
97  */
98
99 typedef    Bool (* CloseScreenProcPtr)(
100 #if NeedNestedPrototypes
101         int /*index*/,
102         ScreenPtr /*pScreen*/
103 #endif
104 );
105
106 typedef    void (* QueryBestSizeProcPtr)(
107 #if NeedNestedPrototypes
108         int /*class*/,
109         unsigned short * /*pwidth*/,
110         unsigned short * /*pheight*/,
111         ScreenPtr /*pScreen*/
112 #endif
113 );
114
115 typedef    Bool (* SaveScreenProcPtr)(
116 #if NeedNestedPrototypes
117          ScreenPtr /*pScreen*/,
118          int /*on*/
119 #endif
120 );
121
122 typedef    void (* GetImageProcPtr)(
123 #if NeedNestedPrototypes
124         DrawablePtr /*pDrawable*/,
125         int /*sx*/,
126         int /*sy*/,
127         int /*w*/,
128         int /*h*/,
129         unsigned int /*format*/,
130         unsigned long /*planeMask*/,
131         char * /*pdstLine*/
132 #endif
133 );
134
135 typedef    void (* GetSpansProcPtr)(
136 #if NeedNestedPrototypes
137         DrawablePtr /*pDrawable*/,
138         int /*wMax*/,
139         DDXPointPtr /*ppt*/,
140         int* /*pwidth*/,
141         int /*nspans*/,
142         char * /*pdstStart*/
143 #endif
144 );
145
146 typedef    void (* PointerNonInterestBoxProcPtr)(
147 #if NeedNestedPrototypes
148         ScreenPtr /*pScreen*/,
149         BoxPtr /*pBox*/
150 #endif
151 );
152
153 typedef    void (* SourceValidateProcPtr)(
154 #if NeedNestedPrototypes
155         DrawablePtr /*pDrawable*/,
156         int /*x*/,
157         int /*y*/,
158         int /*width*/,
159         int /*height*/
160 #endif
161 );
162
163 typedef    Bool (* CreateWindowProcPtr)(
164 #if NeedNestedPrototypes
165         WindowPtr /*pWindow*/
166 #endif
167 );
168
169 typedef    Bool (* DestroyWindowProcPtr)(
170 #if NeedNestedPrototypes
171         WindowPtr /*pWindow*/
172 #endif
173 );
174
175 typedef    Bool (* PositionWindowProcPtr)(
176 #if NeedNestedPrototypes
177         WindowPtr /*pWindow*/,
178         int /*x*/,
179         int /*y*/
180 #endif
181 );
182
183 typedef    Bool (* ChangeWindowAttributesProcPtr)(
184 #if NeedNestedPrototypes
185         WindowPtr /*pWindow*/,
186         unsigned long /*mask*/
187 #endif
188 );
189
190 typedef    Bool (* RealizeWindowProcPtr)(
191 #if NeedNestedPrototypes
192         WindowPtr /*pWindow*/
193 #endif
194 );
195
196 typedef    Bool (* UnrealizeWindowProcPtr)(
197 #if NeedNestedPrototypes
198         WindowPtr /*pWindow*/
199 #endif
200 );
201
202 typedef    int  (* ValidateTreeProcPtr)(
203 #if NeedNestedPrototypes
204         WindowPtr /*pParent*/,
205         WindowPtr /*pChild*/,
206         VTKind /*kind*/
207 #endif
208 );
209
210 typedef    void (* PostValidateTreeProcPtr)(
211 #if NeedNestedPrototypes
212         WindowPtr /*pParent*/,
213         WindowPtr /*pChild*/,
214         VTKind /*kind*/
215 #endif
216 );
217
218 typedef    void (* WindowExposuresProcPtr)(
219 #if NeedNestedPrototypes
220         WindowPtr /*pWindow*/,
221         RegionPtr /*prgn*/,
222         RegionPtr /*other_exposed*/
223 #endif
224 );
225
226 typedef    void (* PaintWindowBackgroundProcPtr)(
227 #if NeedNestedPrototypes
228         WindowPtr /*pWindow*/,
229         RegionPtr /*pRegion*/,
230         int /*what*/
231 #endif
232 );
233
234 typedef    void (* PaintWindowBorderProcPtr)(
235 #if NeedNestedPrototypes
236         WindowPtr /*pWindow*/,
237         RegionPtr /*pRegion*/,
238         int /*what*/
239 #endif
240 );
241
242 typedef    void (* CopyWindowProcPtr)(
243 #if NeedNestedPrototypes
244         WindowPtr /*pWindow*/,
245         DDXPointRec /*ptOldOrg*/,
246         RegionPtr /*prgnSrc*/
247 #endif
248 );
249
250 typedef    void (* ClearToBackgroundProcPtr)(
251 #if NeedNestedPrototypes
252         WindowPtr /*pWindow*/,
253         int /*x*/,
254         int /*y*/,
255         int /*w*/,
256         int /*h*/,
257         Bool /*generateExposures*/
258 #endif
259 );
260
261 typedef    void (* ClipNotifyProcPtr)(
262 #if NeedNestedPrototypes
263         WindowPtr /*pWindow*/,
264         int /*dx*/,
265         int /*dy*/
266 #endif
267 );
268
269 typedef    PixmapPtr (* CreatePixmapProcPtr)(
270 #if NeedNestedPrototypes
271         ScreenPtr /*pScreen*/,
272         int /*width*/,
273         int /*height*/,
274         int /*depth*/
275 #endif
276 );
277
278 typedef    Bool (* DestroyPixmapProcPtr)(
279 #if NeedNestedPrototypes
280         PixmapPtr /*pPixmap*/
281 #endif
282 );
283
284 typedef    void (* SaveDoomedAreasProcPtr)(
285 #if NeedNestedPrototypes
286         WindowPtr /*pWindow*/,
287         RegionPtr /*prgnSave*/,
288         int /*xorg*/,
289         int /*yorg*/
290 #endif
291 );
292
293 typedef    RegionPtr (* RestoreAreasProcPtr)(
294 #if NeedNestedPrototypes
295         WindowPtr /*pWindow*/,
296         RegionPtr /*prgnRestore*/
297 #endif
298 );
299
300 typedef    void (* ExposeCopyProcPtr)(
301 #if NeedNestedPrototypes
302         WindowPtr /*pSrc*/,
303         DrawablePtr /*pDst*/,
304         GCPtr /*pGC*/,
305         RegionPtr /*prgnExposed*/,
306         int /*srcx*/,
307         int /*srcy*/,
308         int /*dstx*/,
309         int /*dsty*/,
310         unsigned long /*plane*/
311 #endif
312 );
313
314 typedef    RegionPtr (* TranslateBackingStoreProcPtr)(
315 #if NeedNestedPrototypes
316         WindowPtr /*pWindow*/,
317         int /*windx*/,
318         int /*windy*/,
319         RegionPtr /*oldClip*/,
320         int /*oldx*/,
321         int /*oldy*/
322 #endif
323 );
324
325 typedef    RegionPtr (* ClearBackingStoreProcPtr)(
326 #if NeedNestedPrototypes
327         WindowPtr /*pWindow*/,
328         int /*x*/,
329         int /*y*/,
330         int /*w*/,
331         int /*h*/,
332         Bool /*generateExposures*/
333 #endif
334 );
335
336 typedef    void (* DrawGuaranteeProcPtr)(
337 #if NeedNestedPrototypes
338         WindowPtr /*pWindow*/,
339         GCPtr /*pGC*/,
340         int /*guarantee*/
341 #endif
342 );
343     
344 typedef    Bool (* RealizeFontProcPtr)(
345 #if NeedNestedPrototypes
346         ScreenPtr /*pScreen*/,
347         FontPtr /*pFont*/
348 #endif
349 );
350
351 typedef    Bool (* UnrealizeFontProcPtr)(
352 #if NeedNestedPrototypes
353         ScreenPtr /*pScreen*/,
354         FontPtr /*pFont*/
355 #endif
356 );
357
358 typedef    void (* ConstrainCursorProcPtr)(
359 #if NeedNestedPrototypes
360         ScreenPtr /*pScreen*/,
361         BoxPtr /*pBox*/
362 #endif
363 );
364
365 typedef    void (* CursorLimitsProcPtr)(
366 #if NeedNestedPrototypes
367         ScreenPtr /*pScreen*/,
368         CursorPtr /*pCursor*/,
369         BoxPtr /*pHotBox*/,
370         BoxPtr /*pTopLeftBox*/
371 #endif
372 );
373
374 typedef    Bool (* DisplayCursorProcPtr)(
375 #if NeedNestedPrototypes
376         ScreenPtr /*pScreen*/,
377         CursorPtr /*pCursor*/
378 #endif
379 );
380
381 typedef    Bool (* RealizeCursorProcPtr)(
382 #if NeedNestedPrototypes
383         ScreenPtr /*pScreen*/,
384         CursorPtr /*pCursor*/
385 #endif
386 );
387
388 typedef    Bool (* UnrealizeCursorProcPtr)(
389 #if NeedNestedPrototypes
390         ScreenPtr /*pScreen*/,
391         CursorPtr /*pCursor*/
392 #endif
393 );
394
395 typedef    void (* RecolorCursorProcPtr)(
396 #if NeedNestedPrototypes
397         ScreenPtr /*pScreen*/,
398         CursorPtr /*pCursor*/,
399         Bool /*displayed*/
400 #endif
401 );
402
403 typedef    Bool (* SetCursorPositionProcPtr)(
404 #if NeedNestedPrototypes
405         ScreenPtr /*pScreen*/,
406         int /*x*/,
407         int /*y*/,
408         Bool /*generateEvent*/
409 #endif
410 );
411
412 typedef    Bool (* CreateGCProcPtr)(
413 #if NeedNestedPrototypes
414         GCPtr /*pGC*/
415 #endif
416 );
417
418 typedef    Bool (* CreateColormapProcPtr)(
419 #if NeedNestedPrototypes
420         ColormapPtr /*pColormap*/
421 #endif
422 );
423
424 typedef    void (* DestroyColormapProcPtr)(
425 #if NeedNestedPrototypes
426         ColormapPtr /*pColormap*/
427 #endif
428 );
429
430 typedef    void (* InstallColormapProcPtr)(
431 #if NeedNestedPrototypes
432         ColormapPtr /*pColormap*/
433 #endif
434 );
435
436 typedef    void (* UninstallColormapProcPtr)(
437 #if NeedNestedPrototypes
438         ColormapPtr /*pColormap*/
439 #endif
440 );
441
442 typedef    int (* ListInstalledColormapsProcPtr) (
443 #if NeedNestedPrototypes
444         ScreenPtr /*pScreen*/,
445         XID* /*pmaps */
446 #endif
447 );
448
449 typedef    void (* StoreColorsProcPtr)(
450 #if NeedNestedPrototypes
451         ColormapPtr /*pColormap*/,
452         int /*ndef*/,
453         xColorItem * /*pdef*/
454 #endif
455 );
456
457 typedef    void (* ResolveColorProcPtr)(
458 #if NeedNestedPrototypes
459         unsigned short* /*pred*/,
460         unsigned short* /*pgreen*/,
461         unsigned short* /*pblue*/,
462         VisualPtr /*pVisual*/
463 #endif
464 );
465
466 typedef    RegionPtr (* RegionCreateProcPtr)(
467 #if NeedNestedPrototypes
468         BoxPtr /*rect*/,
469         int /*size*/
470 #endif
471 );
472
473 typedef    void (* RegionInitProcPtr)(
474 #if NeedNestedPrototypes
475         RegionPtr /*pReg*/,
476         BoxPtr /*rect*/,
477         int /*size*/
478 #endif
479 );
480
481 typedef    Bool (* RegionCopyProcPtr)(
482 #if NeedNestedPrototypes
483         RegionPtr /*dst*/,
484         RegionPtr /*src*/
485 #endif
486 );
487
488 typedef    void (* RegionDestroyProcPtr)(
489 #if NeedNestedPrototypes
490         RegionPtr /*pReg*/
491 #endif
492 );
493
494 typedef    void (* RegionUninitProcPtr)(
495 #if NeedNestedPrototypes
496         RegionPtr /*pReg*/
497 #endif
498 );
499
500 typedef    Bool (* IntersectProcPtr)(
501 #if NeedNestedPrototypes
502         RegionPtr /*newReg*/,
503         RegionPtr /*reg1*/,
504         RegionPtr /*reg2*/
505 #endif
506 );
507
508 typedef    Bool (* UnionProcPtr)(
509 #if NeedNestedPrototypes
510         RegionPtr /*newReg*/,
511         RegionPtr /*reg1*/,
512         RegionPtr /*reg2*/
513 #endif
514 );
515
516 typedef    Bool (* SubtractProcPtr)(
517 #if NeedNestedPrototypes
518         RegionPtr /*regD*/,
519         RegionPtr /*regM*/,
520         RegionPtr /*regS*/
521 #endif
522 );
523
524 typedef    Bool (* InverseProcPtr)(
525 #if NeedNestedPrototypes
526         RegionPtr /*newReg*/,
527         RegionPtr /*reg1*/,
528         BoxPtr /*invRect*/
529 #endif
530 );
531
532 typedef    void (* RegionResetProcPtr)(
533 #if NeedNestedPrototypes
534         RegionPtr /*pReg*/,
535         BoxPtr /*pBox*/
536 #endif
537 );
538
539 typedef    void (* TranslateRegionProcPtr)(
540 #if NeedNestedPrototypes
541         RegionPtr /*pReg*/,
542         int /*x*/,
543         int /*y*/
544 #endif
545 );
546
547 typedef    int (* RectInProcPtr)(
548 #if NeedNestedPrototypes
549         RegionPtr /*region*/,
550         BoxPtr /*prect*/
551 #endif
552 );
553
554 typedef    Bool (* PointInRegionProcPtr)(
555 #if NeedNestedPrototypes
556         RegionPtr /*pReg*/,
557         int /*x*/,
558         int /*y*/,
559         BoxPtr /*box*/
560 #endif
561 );
562
563 typedef    Bool (* RegionNotEmptyProcPtr)(
564 #if NeedNestedPrototypes
565         RegionPtr /*pReg*/
566 #endif
567 );
568
569 typedef    void (* RegionEmptyProcPtr)(
570 #if NeedNestedPrototypes
571         RegionPtr /*pReg*/
572 #endif
573 );
574
575 typedef    BoxPtr (* RegionExtentsProcPtr)(
576 #if NeedNestedPrototypes
577         RegionPtr /*pReg*/
578 #endif
579 );
580
581 typedef    Bool (* RegionAppendProcPtr)(
582 #if NeedNestedPrototypes
583         RegionPtr /*dstrgn*/,
584         RegionPtr /*rgn*/
585 #endif
586 );
587
588 typedef    Bool (* RegionValidateProcPtr)(
589 #if NeedNestedPrototypes
590         RegionPtr /*badreg*/,
591         Bool* /*pOverlap*/
592 #endif
593 );
594
595 typedef    RegionPtr (* BitmapToRegionProcPtr)(
596 #if NeedNestedPrototypes
597         PixmapPtr /*pPix*/
598 #endif
599 );
600
601 typedef    RegionPtr (* RectsToRegionProcPtr)(
602 #if NeedNestedPrototypes
603         int /*nrects*/,
604         xRectangle* /*prect*/,
605         int /*ctype*/
606 #endif
607 );
608
609 typedef    void (* SendGraphicsExposeProcPtr)(
610 #if NeedNestedPrototypes
611         ClientPtr /*client*/,
612         RegionPtr /*pRgn*/,
613         XID /*drawable*/,
614         int /*major*/,
615         int /*minor*/
616 #endif
617 );
618
619 typedef    void (* ScreenBlockHandlerProcPtr)(
620 #if NeedNestedPrototypes
621         int /*screenNum*/,
622         pointer /*blockData*/,
623         struct timeval ** /*pTimeout*/,
624         pointer /*pReadmask*/
625 #endif
626 );
627
628 typedef    void (* ScreenWakeupHandlerProcPtr)(
629 #if NeedNestedPrototypes
630          int /*screenNum*/,
631          pointer /*wakeupData*/,
632          unsigned long /*result*/,
633          pointer /*pReadMask*/
634 #endif
635 );
636
637 typedef    Bool (* CreateScreenResourcesProcPtr)(
638 #if NeedNestedPrototypes
639         ScreenPtr /*pScreen*/
640 #endif
641 );
642
643 typedef    Bool (* ModifyPixmapHeaderProcPtr)(
644 #if NeedNestedPrototypes
645         PixmapPtr /*pPixmap*/,
646         int /*width*/,
647         int /*height*/,
648         int /*depth*/,
649         int /*bitsPerPixel*/,
650         int /*devKind*/,
651         pointer /*pPixData*/
652 #endif
653 );
654
655 typedef    void (* MarkWindowProcPtr)(
656 #if NeedNestedPrototypes
657         WindowPtr /*pWin*/
658 #endif
659 );
660
661 typedef    Bool (* MarkOverlappedWindowsProcPtr)(
662 #if NeedNestedPrototypes
663         WindowPtr /*parent*/,
664         WindowPtr /*firstChild*/,
665         WindowPtr * /*pLayerWin*/
666 #endif
667 );
668
669 typedef    Bool (* ChangeSaveUnderProcPtr)(
670 #if NeedNestedPrototypes
671         WindowPtr /*pLayerWin*/,
672         WindowPtr /*firstChild*/
673 #endif
674 );
675
676 typedef    void (* PostChangeSaveUnderProcPtr)(
677 #if NeedNestedPrototypes
678         WindowPtr /*pLayerWin*/,
679         WindowPtr /*firstChild*/
680 #endif
681 );
682
683 typedef    void (* MoveWindowProcPtr)(
684 #if NeedNestedPrototypes
685         WindowPtr /*pWin*/,
686         int /*x*/,
687         int /*y*/,
688         WindowPtr /*pSib*/,
689         VTKind /*kind*/
690 #endif
691 );
692
693 typedef    void (* ResizeWindowProcPtr)(
694 #if NeedNestedPrototypes
695     WindowPtr /*pWin*/,
696     int /*x*/,
697     int /*y*/, 
698     unsigned int /*w*/,
699     unsigned int /*h*/,
700     WindowPtr /*pSib*/
701 #endif
702 );
703
704 typedef    WindowPtr (* GetLayerWindowProcPtr)(
705 #if NeedNestedPrototypes
706     WindowPtr /*pWin*/
707 #endif
708 );
709
710 typedef    void (* HandleExposuresProcPtr)(
711 #if NeedNestedPrototypes
712     WindowPtr /*pWin*/
713 #endif
714 );
715
716 typedef    void (* ReparentWindowProcPtr)(
717 #if NeedNestedPrototypes
718     WindowPtr /*pWin*/,
719     WindowPtr /*pPriorParent*/
720 #endif
721 );
722
723 #ifdef SHAPE
724 typedef    void (* SetShapeProcPtr)(
725 #if NeedFunctionPrototypes
726         WindowPtr /*pWin*/
727 #endif
728 );
729 #endif /* SHAPE */
730
731 typedef    void (* ChangeBorderWidthProcPtr)(
732 #if NeedFunctionPrototypes
733         WindowPtr /*pWin*/,
734         unsigned int /*width*/
735 #endif
736 );
737
738 typedef    void (* MarkUnrealizedWindowProcPtr)(
739 #if NeedFunctionPrototypes
740         WindowPtr /*pChild*/,
741         WindowPtr /*pWin*/,
742         Bool /*fromConfigure*/
743 #endif
744 );
745
746 typedef struct _Screen {
747     int                 myNum;  /* index of this instance in Screens[] */
748     ATOM                id;
749     short               width, height;
750     short               mmWidth, mmHeight;
751     short               numDepths;
752     unsigned char       rootDepth;
753     DepthPtr            allowedDepths;
754     unsigned long       rootVisual;
755     unsigned long       defColormap;
756     short               minInstalledCmaps, maxInstalledCmaps;
757     char                backingStoreSupport, saveUnderSupport;
758     unsigned long       whitePixel, blackPixel;
759     unsigned long       rgf;    /* array of flags; she's -- HUNGARIAN */
760     GCPtr               GCperDepth[MAXFORMATS+1];
761                         /* next field is a stipple to use as default in
762                            a GC.  we don't build default tiles of all depths
763                            because they are likely to be of a color
764                            different from the default fg pixel, so
765                            we don't win anything by building
766                            a standard one.
767                         */
768     PixmapPtr           PixmapPerDepth[1];
769     pointer             devPrivate;
770     short               numVisuals;
771     VisualPtr           visuals;
772     int                 WindowPrivateLen;
773     unsigned            *WindowPrivateSizes;
774     unsigned            totalWindowSize;
775     int                 GCPrivateLen;
776     unsigned            *GCPrivateSizes;
777     unsigned            totalGCSize;
778
779     /* Random screen procedures */
780
781     CloseScreenProcPtr          CloseScreen;
782     QueryBestSizeProcPtr        QueryBestSize;
783     SaveScreenProcPtr           SaveScreen;
784     GetImageProcPtr             GetImage;
785     GetSpansProcPtr             GetSpans;
786     PointerNonInterestBoxProcPtr PointerNonInterestBox;
787     SourceValidateProcPtr       SourceValidate;
788
789     /* Window Procedures */
790
791     CreateWindowProcPtr         CreateWindow;
792     DestroyWindowProcPtr        DestroyWindow;
793     PositionWindowProcPtr       PositionWindow;
794     ChangeWindowAttributesProcPtr ChangeWindowAttributes;
795     RealizeWindowProcPtr        RealizeWindow;
796     UnrealizeWindowProcPtr      UnrealizeWindow;
797     ValidateTreeProcPtr         ValidateTree;
798     PostValidateTreeProcPtr     PostValidateTree;
799     WindowExposuresProcPtr      WindowExposures;
800     PaintWindowBackgroundProcPtr PaintWindowBackground;
801     PaintWindowBorderProcPtr    PaintWindowBorder;
802     CopyWindowProcPtr           CopyWindow;
803     ClearToBackgroundProcPtr    ClearToBackground;
804     ClipNotifyProcPtr           ClipNotify;
805
806     /* Pixmap procedures */
807
808     CreatePixmapProcPtr         CreatePixmap;
809     DestroyPixmapProcPtr        DestroyPixmap;
810
811     /* Backing store procedures */
812
813     SaveDoomedAreasProcPtr      SaveDoomedAreas;
814     RestoreAreasProcPtr         RestoreAreas;
815     ExposeCopyProcPtr           ExposeCopy;
816     TranslateBackingStoreProcPtr TranslateBackingStore;
817     ClearBackingStoreProcPtr    ClearBackingStore;
818     DrawGuaranteeProcPtr        DrawGuarantee;
819     
820     /* Font procedures */
821
822     RealizeFontProcPtr          RealizeFont;
823     UnrealizeFontProcPtr        UnrealizeFont;
824
825     /* Cursor Procedures */
826
827     ConstrainCursorProcPtr      ConstrainCursor;
828     CursorLimitsProcPtr         CursorLimits;
829     DisplayCursorProcPtr        DisplayCursor;
830     RealizeCursorProcPtr        RealizeCursor;
831     UnrealizeCursorProcPtr      UnrealizeCursor;
832     RecolorCursorProcPtr        RecolorCursor;
833     SetCursorPositionProcPtr    SetCursorPosition;
834
835     /* GC procedures */
836
837     CreateGCProcPtr             CreateGC;
838
839     /* Colormap procedures */
840
841     CreateColormapProcPtr       CreateColormap;
842     DestroyColormapProcPtr      DestroyColormap;
843     InstallColormapProcPtr      InstallColormap;
844     UninstallColormapProcPtr    UninstallColormap;
845     ListInstalledColormapsProcPtr ListInstalledColormaps;
846     StoreColorsProcPtr          StoreColors;
847     ResolveColorProcPtr         ResolveColor;
848
849     /* Region procedures */
850
851     RegionCreateProcPtr         RegionCreate;
852     RegionInitProcPtr           RegionInit;
853     RegionCopyProcPtr           RegionCopy;
854     RegionDestroyProcPtr        RegionDestroy;
855     RegionUninitProcPtr         RegionUninit;
856     IntersectProcPtr            Intersect;
857     UnionProcPtr                Union;
858     SubtractProcPtr             Subtract;
859     InverseProcPtr              Inverse;
860     RegionResetProcPtr          RegionReset;
861     TranslateRegionProcPtr      TranslateRegion;
862     RectInProcPtr               RectIn;
863     PointInRegionProcPtr        PointInRegion;
864     RegionNotEmptyProcPtr       RegionNotEmpty;
865     RegionEmptyProcPtr          RegionEmpty;
866     RegionExtentsProcPtr        RegionExtents;
867     RegionAppendProcPtr         RegionAppend;
868     RegionValidateProcPtr       RegionValidate;
869     BitmapToRegionProcPtr       BitmapToRegion;
870     RectsToRegionProcPtr        RectsToRegion;
871     SendGraphicsExposeProcPtr   SendGraphicsExpose;
872
873     /* os layer procedures */
874
875     ScreenBlockHandlerProcPtr   BlockHandler;
876     ScreenWakeupHandlerProcPtr  WakeupHandler;
877
878     pointer blockData;
879     pointer wakeupData;
880
881     /* anybody can get a piece of this array */
882     DevUnion    *devPrivates;
883
884     CreateScreenResourcesProcPtr CreateScreenResources;
885     ModifyPixmapHeaderProcPtr   ModifyPixmapHeader;
886
887     PixmapPtr pScratchPixmap;           /* scratch pixmap "pool" */
888
889 #ifdef PIXPRIV
890     int                 PixmapPrivateLen;
891     unsigned            *PixmapPrivateSizes;
892     unsigned            totalPixmapSize;
893 #endif
894
895     MarkWindowProcPtr           MarkWindow;
896     MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
897     ChangeSaveUnderProcPtr      ChangeSaveUnder;
898     PostChangeSaveUnderProcPtr  PostChangeSaveUnder;
899     MoveWindowProcPtr           MoveWindow;
900     ResizeWindowProcPtr         ResizeWindow;
901     GetLayerWindowProcPtr       GetLayerWindow;
902     HandleExposuresProcPtr      HandleExposures;
903     ReparentWindowProcPtr       ReparentWindow;
904
905 #ifdef SHAPE
906     SetShapeProcPtr             SetShape;
907 #endif /* SHAPE */
908
909     ChangeBorderWidthProcPtr    ChangeBorderWidth;
910     MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
911
912 } ScreenRec;
913
914 typedef struct _ScreenInfo {
915     int         imageByteOrder;
916     int         bitmapScanlineUnit;
917     int         bitmapScanlinePad;
918     int         bitmapBitOrder;
919     int         numPixmapFormats;
920     PixmapFormatRec
921                 formats[MAXFORMATS];
922     int         arraySize;
923     int         numScreens;
924     ScreenPtr   screens[MAXSCREENS];
925     int         numVideoScreens;
926 } ScreenInfo;
927
928 extern ScreenInfo screenInfo;
929
930 extern void InitOutput(
931 #if NeedFunctionPrototypes
932     ScreenInfo  * /*pScreenInfo*/,
933     int         /*argc*/,
934     char        ** /*argv*/
935 #endif
936 );
937
938 #endif /* SCREENINTSTRUCT_H */