scrnintstr.h revision 6747b715
105b261ecSmrg/***********************************************************
205b261ecSmrg
305b261ecSmrgCopyright 1987, 1998  The Open Group
405b261ecSmrg
505b261ecSmrgPermission to use, copy, modify, distribute, and sell this software and its
605b261ecSmrgdocumentation for any purpose is hereby granted without fee, provided that
705b261ecSmrgthe above copyright notice appear in all copies and that both that
805b261ecSmrgcopyright notice and this permission notice appear in supporting
905b261ecSmrgdocumentation.
1005b261ecSmrg
1105b261ecSmrgThe above copyright notice and this permission notice shall be included in
1205b261ecSmrgall copies or substantial portions of the Software.
1305b261ecSmrg
1405b261ecSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1505b261ecSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1605b261ecSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
1705b261ecSmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
1805b261ecSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1905b261ecSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2005b261ecSmrg
2105b261ecSmrgExcept as contained in this notice, the name of The Open Group shall not be
2205b261ecSmrgused in advertising or otherwise to promote the sale, use or other dealings
2305b261ecSmrgin this Software without prior written authorization from The Open Group.
2405b261ecSmrg
2505b261ecSmrg
2605b261ecSmrgCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
2705b261ecSmrg
2805b261ecSmrg                        All Rights Reserved
2905b261ecSmrg
3005b261ecSmrgPermission to use, copy, modify, and distribute this software and its
3105b261ecSmrgdocumentation for any purpose and without fee is hereby granted,
3205b261ecSmrgprovided that the above copyright notice appear in all copies and that
3305b261ecSmrgboth that copyright notice and this permission notice appear in
3405b261ecSmrgsupporting documentation, and that the name of Digital not be
3505b261ecSmrgused in advertising or publicity pertaining to distribution of the
3605b261ecSmrgsoftware without specific, written prior permission.
3705b261ecSmrg
3805b261ecSmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
3905b261ecSmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
4005b261ecSmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
4105b261ecSmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
4205b261ecSmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
4305b261ecSmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
4405b261ecSmrgSOFTWARE.
4505b261ecSmrg
4605b261ecSmrg******************************************************************/
4705b261ecSmrg
4805b261ecSmrg#ifndef SCREENINTSTRUCT_H
4905b261ecSmrg#define SCREENINTSTRUCT_H
5005b261ecSmrg
5105b261ecSmrg#include "screenint.h"
5205b261ecSmrg#include "regionstr.h"
5305b261ecSmrg#include "bstore.h"
5405b261ecSmrg#include "colormap.h"
5505b261ecSmrg#include "cursor.h"
5605b261ecSmrg#include "validate.h"
5705b261ecSmrg#include <X11/Xproto.h>
5805b261ecSmrg#include "dix.h"
594642e01fSmrg#include "privates.h"
6005b261ecSmrg
6105b261ecSmrgtypedef struct _PixmapFormat {
6205b261ecSmrg    unsigned char	depth;
6305b261ecSmrg    unsigned char	bitsPerPixel;
6405b261ecSmrg    unsigned char	scanlinePad;
6505b261ecSmrg    } PixmapFormatRec;
6605b261ecSmrg
6705b261ecSmrgtypedef struct _Visual {
6805b261ecSmrg    VisualID		vid;
6905b261ecSmrg    short		class;
7005b261ecSmrg    short		bitsPerRGBValue;
7105b261ecSmrg    short		ColormapEntries;
7205b261ecSmrg    short		nplanes;/* = log2 (ColormapEntries). This does not
7305b261ecSmrg				 * imply that the screen has this many planes.
7405b261ecSmrg				 * it may have more or fewer */
7505b261ecSmrg    unsigned long	redMask, greenMask, blueMask;
7605b261ecSmrg    int			offsetRed, offsetGreen, offsetBlue;
7705b261ecSmrg  } VisualRec;
7805b261ecSmrg
7905b261ecSmrgtypedef struct _Depth {
8005b261ecSmrg    unsigned char	depth;
8105b261ecSmrg    short		numVids;
8205b261ecSmrg    VisualID		*vids;    /* block of visual ids for this depth */
8305b261ecSmrg  } DepthRec;
8405b261ecSmrg
856747b715Smrgtypedef struct _ScreenSaverStuff {
866747b715Smrg    WindowPtr pWindow;
876747b715Smrg    XID       wid;
886747b715Smrg    char      blanked;
896747b715Smrg    Bool      (*ExternalScreenSaver)(
906747b715Smrg	ScreenPtr	/*pScreen*/,
916747b715Smrg	int		/*xstate*/,
926747b715Smrg	Bool		/*force*/);
936747b715Smrg} ScreenSaverStuffRec;
946747b715Smrg
9505b261ecSmrg
9605b261ecSmrg/*
9705b261ecSmrg *  There is a typedef for each screen function pointer so that code that
9805b261ecSmrg *  needs to declare a screen function pointer (e.g. in a screen private
9905b261ecSmrg *  or as a local variable) can easily do so and retain full type checking.
10005b261ecSmrg */
10105b261ecSmrg
10205b261ecSmrgtypedef    Bool (* CloseScreenProcPtr)(
10305b261ecSmrg	int /*index*/,
10405b261ecSmrg	ScreenPtr /*pScreen*/);
10505b261ecSmrg
10605b261ecSmrgtypedef    void (* QueryBestSizeProcPtr)(
10705b261ecSmrg	int /*class*/,
10805b261ecSmrg	unsigned short * /*pwidth*/,
10905b261ecSmrg	unsigned short * /*pheight*/,
11005b261ecSmrg	ScreenPtr /*pScreen*/);
11105b261ecSmrg
11205b261ecSmrgtypedef    Bool (* SaveScreenProcPtr)(
11305b261ecSmrg	 ScreenPtr /*pScreen*/,
11405b261ecSmrg	 int /*on*/);
11505b261ecSmrg
11605b261ecSmrgtypedef    void (* GetImageProcPtr)(
11705b261ecSmrg	DrawablePtr /*pDrawable*/,
11805b261ecSmrg	int /*sx*/,
11905b261ecSmrg	int /*sy*/,
12005b261ecSmrg	int /*w*/,
12105b261ecSmrg	int /*h*/,
12205b261ecSmrg	unsigned int /*format*/,
12305b261ecSmrg	unsigned long /*planeMask*/,
12405b261ecSmrg	char * /*pdstLine*/);
12505b261ecSmrg
12605b261ecSmrgtypedef    void (* GetSpansProcPtr)(
12705b261ecSmrg	DrawablePtr /*pDrawable*/,
12805b261ecSmrg	int /*wMax*/,
12905b261ecSmrg	DDXPointPtr /*ppt*/,
13005b261ecSmrg	int* /*pwidth*/,
13105b261ecSmrg	int /*nspans*/,
13205b261ecSmrg	char * /*pdstStart*/);
13305b261ecSmrg
13405b261ecSmrgtypedef    void (* SourceValidateProcPtr)(
13505b261ecSmrg	DrawablePtr /*pDrawable*/,
13605b261ecSmrg	int /*x*/,
13705b261ecSmrg	int /*y*/,
13805b261ecSmrg	int /*width*/,
13905b261ecSmrg	int /*height*/);
14005b261ecSmrg
14105b261ecSmrgtypedef    Bool (* CreateWindowProcPtr)(
14205b261ecSmrg	WindowPtr /*pWindow*/);
14305b261ecSmrg
14405b261ecSmrgtypedef    Bool (* DestroyWindowProcPtr)(
14505b261ecSmrg	WindowPtr /*pWindow*/);
14605b261ecSmrg
14705b261ecSmrgtypedef    Bool (* PositionWindowProcPtr)(
14805b261ecSmrg	WindowPtr /*pWindow*/,
14905b261ecSmrg	int /*x*/,
15005b261ecSmrg	int /*y*/);
15105b261ecSmrg
15205b261ecSmrgtypedef    Bool (* ChangeWindowAttributesProcPtr)(
15305b261ecSmrg	WindowPtr /*pWindow*/,
15405b261ecSmrg	unsigned long /*mask*/);
15505b261ecSmrg
15605b261ecSmrgtypedef    Bool (* RealizeWindowProcPtr)(
15705b261ecSmrg	WindowPtr /*pWindow*/);
15805b261ecSmrg
15905b261ecSmrgtypedef    Bool (* UnrealizeWindowProcPtr)(
16005b261ecSmrg	WindowPtr /*pWindow*/);
16105b261ecSmrg
16205b261ecSmrgtypedef    void (* RestackWindowProcPtr)(
16305b261ecSmrg	WindowPtr /*pWindow*/,
16405b261ecSmrg	WindowPtr /*pOldNextSib*/);
16505b261ecSmrg
16605b261ecSmrgtypedef    int  (* ValidateTreeProcPtr)(
16705b261ecSmrg	WindowPtr /*pParent*/,
16805b261ecSmrg	WindowPtr /*pChild*/,
16905b261ecSmrg	VTKind /*kind*/);
17005b261ecSmrg
17105b261ecSmrgtypedef    void (* PostValidateTreeProcPtr)(
17205b261ecSmrg	WindowPtr /*pParent*/,
17305b261ecSmrg	WindowPtr /*pChild*/,
17405b261ecSmrg	VTKind /*kind*/);
17505b261ecSmrg
17605b261ecSmrgtypedef    void (* WindowExposuresProcPtr)(
17705b261ecSmrg	WindowPtr /*pWindow*/,
17805b261ecSmrg	RegionPtr /*prgn*/,
17905b261ecSmrg	RegionPtr /*other_exposed*/);
18005b261ecSmrg
18105b261ecSmrgtypedef    void (* CopyWindowProcPtr)(
18205b261ecSmrg	WindowPtr /*pWindow*/,
18305b261ecSmrg	DDXPointRec /*ptOldOrg*/,
18405b261ecSmrg	RegionPtr /*prgnSrc*/);
18505b261ecSmrg
18605b261ecSmrgtypedef    void (* ClearToBackgroundProcPtr)(
18705b261ecSmrg	WindowPtr /*pWindow*/,
18805b261ecSmrg	int /*x*/,
18905b261ecSmrg	int /*y*/,
19005b261ecSmrg	int /*w*/,
19105b261ecSmrg	int /*h*/,
19205b261ecSmrg	Bool /*generateExposures*/);
19305b261ecSmrg
19405b261ecSmrgtypedef    void (* ClipNotifyProcPtr)(
19505b261ecSmrg	WindowPtr /*pWindow*/,
19605b261ecSmrg	int /*dx*/,
19705b261ecSmrg	int /*dy*/);
19805b261ecSmrg
1994642e01fSmrg/* pixmap will exist only for the duration of the current rendering operation */
2004642e01fSmrg#define CREATE_PIXMAP_USAGE_SCRATCH                     1
2014642e01fSmrg/* pixmap will be the backing pixmap for a redirected window */
2024642e01fSmrg#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP              2
2034642e01fSmrg/* pixmap will contain a glyph */
2044642e01fSmrg#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE               3
2054642e01fSmrg
20605b261ecSmrgtypedef    PixmapPtr (* CreatePixmapProcPtr)(
20705b261ecSmrg	ScreenPtr /*pScreen*/,
20805b261ecSmrg	int /*width*/,
20905b261ecSmrg	int /*height*/,
2104642e01fSmrg	int /*depth*/,
2114642e01fSmrg	unsigned /*usage_hint*/);
21205b261ecSmrg
21305b261ecSmrgtypedef    Bool (* DestroyPixmapProcPtr)(
21405b261ecSmrg	PixmapPtr /*pPixmap*/);
21505b261ecSmrg
21605b261ecSmrgtypedef    void (* SaveDoomedAreasProcPtr)(
21705b261ecSmrg	WindowPtr /*pWindow*/,
21805b261ecSmrg	RegionPtr /*prgnSave*/,
21905b261ecSmrg	int /*xorg*/,
22005b261ecSmrg	int /*yorg*/);
22105b261ecSmrg
22205b261ecSmrgtypedef    RegionPtr (* RestoreAreasProcPtr)(
22305b261ecSmrg	WindowPtr /*pWindow*/,
22405b261ecSmrg	RegionPtr /*prgnRestore*/);
22505b261ecSmrg
22605b261ecSmrgtypedef    void (* ExposeCopyProcPtr)(
22705b261ecSmrg	WindowPtr /*pSrc*/,
22805b261ecSmrg	DrawablePtr /*pDst*/,
22905b261ecSmrg	GCPtr /*pGC*/,
23005b261ecSmrg	RegionPtr /*prgnExposed*/,
23105b261ecSmrg	int /*srcx*/,
23205b261ecSmrg	int /*srcy*/,
23305b261ecSmrg	int /*dstx*/,
23405b261ecSmrg	int /*dsty*/,
23505b261ecSmrg	unsigned long /*plane*/);
23605b261ecSmrg
23705b261ecSmrgtypedef    RegionPtr (* TranslateBackingStoreProcPtr)(
23805b261ecSmrg	WindowPtr /*pWindow*/,
23905b261ecSmrg	int /*windx*/,
24005b261ecSmrg	int /*windy*/,
24105b261ecSmrg	RegionPtr /*oldClip*/,
24205b261ecSmrg	int /*oldx*/,
24305b261ecSmrg	int /*oldy*/);
24405b261ecSmrg
24505b261ecSmrgtypedef    RegionPtr (* ClearBackingStoreProcPtr)(
24605b261ecSmrg	WindowPtr /*pWindow*/,
24705b261ecSmrg	int /*x*/,
24805b261ecSmrg	int /*y*/,
24905b261ecSmrg	int /*w*/,
25005b261ecSmrg	int /*h*/,
25105b261ecSmrg	Bool /*generateExposures*/);
25205b261ecSmrg
25305b261ecSmrgtypedef    void (* DrawGuaranteeProcPtr)(
25405b261ecSmrg	WindowPtr /*pWindow*/,
25505b261ecSmrg	GCPtr /*pGC*/,
25605b261ecSmrg	int /*guarantee*/);
25705b261ecSmrg
25805b261ecSmrgtypedef    Bool (* RealizeFontProcPtr)(
25905b261ecSmrg	ScreenPtr /*pScreen*/,
26005b261ecSmrg	FontPtr /*pFont*/);
26105b261ecSmrg
26205b261ecSmrgtypedef    Bool (* UnrealizeFontProcPtr)(
26305b261ecSmrg	ScreenPtr /*pScreen*/,
26405b261ecSmrg	FontPtr /*pFont*/);
26505b261ecSmrg
26605b261ecSmrgtypedef    void (* ConstrainCursorProcPtr)(
2674642e01fSmrg        DeviceIntPtr /*pDev*/,
26805b261ecSmrg	ScreenPtr /*pScreen*/,
26905b261ecSmrg	BoxPtr /*pBox*/);
27005b261ecSmrg
27105b261ecSmrgtypedef    void (* CursorLimitsProcPtr)(
2724642e01fSmrg        DeviceIntPtr /* pDev */,
27305b261ecSmrg	ScreenPtr /*pScreen*/,
27405b261ecSmrg	CursorPtr /*pCursor*/,
27505b261ecSmrg	BoxPtr /*pHotBox*/,
27605b261ecSmrg	BoxPtr /*pTopLeftBox*/);
27705b261ecSmrg
27805b261ecSmrgtypedef    Bool (* DisplayCursorProcPtr)(
2794642e01fSmrg        DeviceIntPtr /* pDev */,
28005b261ecSmrg	ScreenPtr /*pScreen*/,
28105b261ecSmrg	CursorPtr /*pCursor*/);
28205b261ecSmrg
28305b261ecSmrgtypedef    Bool (* RealizeCursorProcPtr)(
2844642e01fSmrg        DeviceIntPtr /* pDev */,
28505b261ecSmrg	ScreenPtr /*pScreen*/,
28605b261ecSmrg	CursorPtr /*pCursor*/);
28705b261ecSmrg
28805b261ecSmrgtypedef    Bool (* UnrealizeCursorProcPtr)(
2894642e01fSmrg        DeviceIntPtr /* pDev */,
29005b261ecSmrg	ScreenPtr /*pScreen*/,
29105b261ecSmrg	CursorPtr /*pCursor*/);
29205b261ecSmrg
29305b261ecSmrgtypedef    void (* RecolorCursorProcPtr)(
2944642e01fSmrg        DeviceIntPtr /* pDev */,
29505b261ecSmrg	ScreenPtr /*pScreen*/,
29605b261ecSmrg	CursorPtr /*pCursor*/,
29705b261ecSmrg	Bool /*displayed*/);
29805b261ecSmrg
29905b261ecSmrgtypedef    Bool (* SetCursorPositionProcPtr)(
3004642e01fSmrg        DeviceIntPtr /* pDev */,
30105b261ecSmrg	ScreenPtr /*pScreen*/,
30205b261ecSmrg	int /*x*/,
30305b261ecSmrg	int /*y*/,
30405b261ecSmrg	Bool /*generateEvent*/);
30505b261ecSmrg
30605b261ecSmrgtypedef    Bool (* CreateGCProcPtr)(
30705b261ecSmrg	GCPtr /*pGC*/);
30805b261ecSmrg
30905b261ecSmrgtypedef    Bool (* CreateColormapProcPtr)(
31005b261ecSmrg	ColormapPtr /*pColormap*/);
31105b261ecSmrg
31205b261ecSmrgtypedef    void (* DestroyColormapProcPtr)(
31305b261ecSmrg	ColormapPtr /*pColormap*/);
31405b261ecSmrg
31505b261ecSmrgtypedef    void (* InstallColormapProcPtr)(
31605b261ecSmrg	ColormapPtr /*pColormap*/);
31705b261ecSmrg
31805b261ecSmrgtypedef    void (* UninstallColormapProcPtr)(
31905b261ecSmrg	ColormapPtr /*pColormap*/);
32005b261ecSmrg
32105b261ecSmrgtypedef    int (* ListInstalledColormapsProcPtr) (
32205b261ecSmrg	ScreenPtr /*pScreen*/,
32305b261ecSmrg	XID* /*pmaps */);
32405b261ecSmrg
32505b261ecSmrgtypedef    void (* StoreColorsProcPtr)(
32605b261ecSmrg	ColormapPtr /*pColormap*/,
32705b261ecSmrg	int /*ndef*/,
32805b261ecSmrg	xColorItem * /*pdef*/);
32905b261ecSmrg
33005b261ecSmrgtypedef    void (* ResolveColorProcPtr)(
33105b261ecSmrg	unsigned short* /*pred*/,
33205b261ecSmrg	unsigned short* /*pgreen*/,
33305b261ecSmrg	unsigned short* /*pblue*/,
33405b261ecSmrg	VisualPtr /*pVisual*/);
33505b261ecSmrg
33605b261ecSmrgtypedef    RegionPtr (* BitmapToRegionProcPtr)(
33705b261ecSmrg	PixmapPtr /*pPix*/);
33805b261ecSmrg
33905b261ecSmrgtypedef    void (* SendGraphicsExposeProcPtr)(
34005b261ecSmrg	ClientPtr /*client*/,
34105b261ecSmrg	RegionPtr /*pRgn*/,
34205b261ecSmrg	XID /*drawable*/,
34305b261ecSmrg	int /*major*/,
34405b261ecSmrg	int /*minor*/);
34505b261ecSmrg
34605b261ecSmrgtypedef    void (* ScreenBlockHandlerProcPtr)(
34705b261ecSmrg	int /*screenNum*/,
34805b261ecSmrg	pointer /*blockData*/,
34905b261ecSmrg	pointer /*pTimeout*/,
35005b261ecSmrg	pointer /*pReadmask*/);
35105b261ecSmrg
35205b261ecSmrgtypedef    void (* ScreenWakeupHandlerProcPtr)(
35305b261ecSmrg	 int /*screenNum*/,
35405b261ecSmrg	 pointer /*wakeupData*/,
35505b261ecSmrg	 unsigned long /*result*/,
35605b261ecSmrg	 pointer /*pReadMask*/);
35705b261ecSmrg
35805b261ecSmrgtypedef    Bool (* CreateScreenResourcesProcPtr)(
35905b261ecSmrg	ScreenPtr /*pScreen*/);
36005b261ecSmrg
36105b261ecSmrgtypedef    Bool (* ModifyPixmapHeaderProcPtr)(
36205b261ecSmrg	PixmapPtr /*pPixmap*/,
36305b261ecSmrg	int /*width*/,
36405b261ecSmrg	int /*height*/,
36505b261ecSmrg	int /*depth*/,
36605b261ecSmrg	int /*bitsPerPixel*/,
36705b261ecSmrg	int /*devKind*/,
36805b261ecSmrg	pointer /*pPixData*/);
36905b261ecSmrg
37005b261ecSmrgtypedef    PixmapPtr (* GetWindowPixmapProcPtr)(
37105b261ecSmrg	WindowPtr /*pWin*/);
37205b261ecSmrg
37305b261ecSmrgtypedef    void (* SetWindowPixmapProcPtr)(
37405b261ecSmrg	WindowPtr /*pWin*/,
37505b261ecSmrg	PixmapPtr /*pPix*/);
37605b261ecSmrg
37705b261ecSmrgtypedef    PixmapPtr (* GetScreenPixmapProcPtr)(
37805b261ecSmrg	ScreenPtr /*pScreen*/);
37905b261ecSmrg
38005b261ecSmrgtypedef    void (* SetScreenPixmapProcPtr)(
38105b261ecSmrg	PixmapPtr /*pPix*/);
38205b261ecSmrg
38305b261ecSmrgtypedef    void (* MarkWindowProcPtr)(
38405b261ecSmrg	WindowPtr /*pWin*/);
38505b261ecSmrg
38605b261ecSmrgtypedef    Bool (* MarkOverlappedWindowsProcPtr)(
38705b261ecSmrg	WindowPtr /*parent*/,
38805b261ecSmrg	WindowPtr /*firstChild*/,
38905b261ecSmrg	WindowPtr * /*pLayerWin*/);
39005b261ecSmrg
39105b261ecSmrgtypedef    Bool (* ChangeSaveUnderProcPtr)(
39205b261ecSmrg	WindowPtr /*pLayerWin*/,
39305b261ecSmrg	WindowPtr /*firstChild*/);
39405b261ecSmrg
39505b261ecSmrgtypedef    void (* PostChangeSaveUnderProcPtr)(
39605b261ecSmrg	WindowPtr /*pLayerWin*/,
39705b261ecSmrg	WindowPtr /*firstChild*/);
39805b261ecSmrg
3996747b715Smrgtypedef    int (* ConfigNotifyProcPtr)(
4006747b715Smrg	WindowPtr /*pWin*/,
4016747b715Smrg	int /*x*/,
4026747b715Smrg	int /*y*/,
4036747b715Smrg	int /*w*/,
4046747b715Smrg	int /*h*/,
4056747b715Smrg	int /*bw*/,
4066747b715Smrg	WindowPtr /*pSib*/);
4076747b715Smrg
40805b261ecSmrgtypedef    void (* MoveWindowProcPtr)(
40905b261ecSmrg	WindowPtr /*pWin*/,
41005b261ecSmrg	int /*x*/,
41105b261ecSmrg	int /*y*/,
41205b261ecSmrg	WindowPtr /*pSib*/,
41305b261ecSmrg	VTKind /*kind*/);
41405b261ecSmrg
41505b261ecSmrgtypedef    void (* ResizeWindowProcPtr)(
41605b261ecSmrg    WindowPtr /*pWin*/,
41705b261ecSmrg    int /*x*/,
41805b261ecSmrg    int /*y*/,
41905b261ecSmrg    unsigned int /*w*/,
42005b261ecSmrg    unsigned int /*h*/,
42105b261ecSmrg    WindowPtr /*pSib*/
42205b261ecSmrg);
42305b261ecSmrg
42405b261ecSmrgtypedef    WindowPtr (* GetLayerWindowProcPtr)(
42505b261ecSmrg    WindowPtr /*pWin*/
42605b261ecSmrg);
42705b261ecSmrg
42805b261ecSmrgtypedef    void (* HandleExposuresProcPtr)(
42905b261ecSmrg    WindowPtr /*pWin*/);
43005b261ecSmrg
43105b261ecSmrgtypedef    void (* ReparentWindowProcPtr)(
43205b261ecSmrg    WindowPtr /*pWin*/,
43305b261ecSmrg    WindowPtr /*pPriorParent*/);
43405b261ecSmrg
43505b261ecSmrgtypedef    void (* SetShapeProcPtr)(
4366747b715Smrg        WindowPtr /*pWin*/,
4376747b715Smrg        int /* kind */);
43805b261ecSmrg
43905b261ecSmrgtypedef    void (* ChangeBorderWidthProcPtr)(
44005b261ecSmrg	WindowPtr /*pWin*/,
44105b261ecSmrg	unsigned int /*width*/);
44205b261ecSmrg
44305b261ecSmrgtypedef    void (* MarkUnrealizedWindowProcPtr)(
44405b261ecSmrg	WindowPtr /*pChild*/,
44505b261ecSmrg	WindowPtr /*pWin*/,
44605b261ecSmrg	Bool /*fromConfigure*/);
44705b261ecSmrg
4484642e01fSmrgtypedef    Bool (* DeviceCursorInitializeProcPtr)(
4494642e01fSmrg        DeviceIntPtr /* pDev */,
4504642e01fSmrg        ScreenPtr    /* pScreen */);
4514642e01fSmrg
4524642e01fSmrgtypedef    void (* DeviceCursorCleanupProcPtr)(
4534642e01fSmrg        DeviceIntPtr /* pDev */,
4544642e01fSmrg        ScreenPtr    /* pScreen */);
4554642e01fSmrg
45605b261ecSmrgtypedef struct _Screen {
45705b261ecSmrg    int			myNum;	/* index of this instance in Screens[] */
45805b261ecSmrg    ATOM		id;
4596747b715Smrg    short		x, y, width, height;
46005b261ecSmrg    short		mmWidth, mmHeight;
46105b261ecSmrg    short		numDepths;
46205b261ecSmrg    unsigned char      	rootDepth;
46305b261ecSmrg    DepthPtr       	allowedDepths;
46405b261ecSmrg    unsigned long      	rootVisual;
46505b261ecSmrg    unsigned long	defColormap;
46605b261ecSmrg    short		minInstalledCmaps, maxInstalledCmaps;
46705b261ecSmrg    char                backingStoreSupport, saveUnderSupport;
46805b261ecSmrg    unsigned long	whitePixel, blackPixel;
46905b261ecSmrg    GCPtr		GCperDepth[MAXFORMATS+1];
47005b261ecSmrg			/* next field is a stipple to use as default in
47105b261ecSmrg			   a GC.  we don't build default tiles of all depths
47205b261ecSmrg			   because they are likely to be of a color
47305b261ecSmrg			   different from the default fg pixel, so
47405b261ecSmrg			   we don't win anything by building
47505b261ecSmrg			   a standard one.
47605b261ecSmrg			*/
47705b261ecSmrg    PixmapPtr		PixmapPerDepth[1];
47805b261ecSmrg    pointer		devPrivate;
47905b261ecSmrg    short       	numVisuals;
48005b261ecSmrg    VisualPtr		visuals;
4816747b715Smrg    WindowPtr		root;
4826747b715Smrg    ScreenSaverStuffRec screensaver;
48305b261ecSmrg
48405b261ecSmrg    /* Random screen procedures */
48505b261ecSmrg
48605b261ecSmrg    CloseScreenProcPtr		CloseScreen;
48705b261ecSmrg    QueryBestSizeProcPtr	QueryBestSize;
48805b261ecSmrg    SaveScreenProcPtr		SaveScreen;
48905b261ecSmrg    GetImageProcPtr		GetImage;
49005b261ecSmrg    GetSpansProcPtr		GetSpans;
49105b261ecSmrg    SourceValidateProcPtr	SourceValidate;
49205b261ecSmrg
49305b261ecSmrg    /* Window Procedures */
49405b261ecSmrg
49505b261ecSmrg    CreateWindowProcPtr		CreateWindow;
49605b261ecSmrg    DestroyWindowProcPtr	DestroyWindow;
49705b261ecSmrg    PositionWindowProcPtr	PositionWindow;
49805b261ecSmrg    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
49905b261ecSmrg    RealizeWindowProcPtr	RealizeWindow;
50005b261ecSmrg    UnrealizeWindowProcPtr	UnrealizeWindow;
50105b261ecSmrg    ValidateTreeProcPtr		ValidateTree;
50205b261ecSmrg    PostValidateTreeProcPtr	PostValidateTree;
50305b261ecSmrg    WindowExposuresProcPtr	WindowExposures;
50405b261ecSmrg    CopyWindowProcPtr		CopyWindow;
50505b261ecSmrg    ClearToBackgroundProcPtr	ClearToBackground;
50605b261ecSmrg    ClipNotifyProcPtr		ClipNotify;
50705b261ecSmrg    RestackWindowProcPtr	RestackWindow;
50805b261ecSmrg
50905b261ecSmrg    /* Pixmap procedures */
51005b261ecSmrg
51105b261ecSmrg    CreatePixmapProcPtr		CreatePixmap;
51205b261ecSmrg    DestroyPixmapProcPtr	DestroyPixmap;
51305b261ecSmrg
51405b261ecSmrg    /* Backing store procedures */
51505b261ecSmrg
51605b261ecSmrg    SaveDoomedAreasProcPtr	SaveDoomedAreas;
51705b261ecSmrg    RestoreAreasProcPtr		RestoreAreas;
51805b261ecSmrg    ExposeCopyProcPtr		ExposeCopy;
51905b261ecSmrg    TranslateBackingStoreProcPtr TranslateBackingStore;
52005b261ecSmrg    ClearBackingStoreProcPtr	ClearBackingStore;
52105b261ecSmrg    DrawGuaranteeProcPtr	DrawGuarantee;
52205b261ecSmrg    /*
52305b261ecSmrg     * A read/write copy of the lower level backing store vector is needed now
52405b261ecSmrg     * that the functions can be wrapped.
52505b261ecSmrg     */
52605b261ecSmrg    BSFuncRec			BackingStoreFuncs;
52705b261ecSmrg
52805b261ecSmrg    /* Font procedures */
52905b261ecSmrg
53005b261ecSmrg    RealizeFontProcPtr		RealizeFont;
53105b261ecSmrg    UnrealizeFontProcPtr	UnrealizeFont;
53205b261ecSmrg
53305b261ecSmrg    /* Cursor Procedures */
53405b261ecSmrg
53505b261ecSmrg    ConstrainCursorProcPtr	ConstrainCursor;
53605b261ecSmrg    CursorLimitsProcPtr		CursorLimits;
53705b261ecSmrg    DisplayCursorProcPtr	DisplayCursor;
53805b261ecSmrg    RealizeCursorProcPtr	RealizeCursor;
53905b261ecSmrg    UnrealizeCursorProcPtr	UnrealizeCursor;
54005b261ecSmrg    RecolorCursorProcPtr	RecolorCursor;
54105b261ecSmrg    SetCursorPositionProcPtr	SetCursorPosition;
54205b261ecSmrg
54305b261ecSmrg    /* GC procedures */
54405b261ecSmrg
54505b261ecSmrg    CreateGCProcPtr		CreateGC;
54605b261ecSmrg
54705b261ecSmrg    /* Colormap procedures */
54805b261ecSmrg
54905b261ecSmrg    CreateColormapProcPtr	CreateColormap;
55005b261ecSmrg    DestroyColormapProcPtr	DestroyColormap;
55105b261ecSmrg    InstallColormapProcPtr	InstallColormap;
55205b261ecSmrg    UninstallColormapProcPtr	UninstallColormap;
55305b261ecSmrg    ListInstalledColormapsProcPtr ListInstalledColormaps;
55405b261ecSmrg    StoreColorsProcPtr		StoreColors;
55505b261ecSmrg    ResolveColorProcPtr		ResolveColor;
55605b261ecSmrg
55705b261ecSmrg    /* Region procedures */
55805b261ecSmrg
55905b261ecSmrg    BitmapToRegionProcPtr	BitmapToRegion;
56005b261ecSmrg    SendGraphicsExposeProcPtr	SendGraphicsExpose;
56105b261ecSmrg
56205b261ecSmrg    /* os layer procedures */
56305b261ecSmrg
56405b261ecSmrg    ScreenBlockHandlerProcPtr	BlockHandler;
56505b261ecSmrg    ScreenWakeupHandlerProcPtr	WakeupHandler;
56605b261ecSmrg
56705b261ecSmrg    pointer blockData;
56805b261ecSmrg    pointer wakeupData;
56905b261ecSmrg
57005b261ecSmrg    /* anybody can get a piece of this array */
5714642e01fSmrg    PrivateRec	*devPrivates;
57205b261ecSmrg
57305b261ecSmrg    CreateScreenResourcesProcPtr CreateScreenResources;
57405b261ecSmrg    ModifyPixmapHeaderProcPtr	ModifyPixmapHeader;
57505b261ecSmrg
57605b261ecSmrg    GetWindowPixmapProcPtr	GetWindowPixmap;
57705b261ecSmrg    SetWindowPixmapProcPtr	SetWindowPixmap;
57805b261ecSmrg    GetScreenPixmapProcPtr	GetScreenPixmap;
57905b261ecSmrg    SetScreenPixmapProcPtr	SetScreenPixmap;
58005b261ecSmrg
58105b261ecSmrg    PixmapPtr pScratchPixmap;		/* scratch pixmap "pool" */
58205b261ecSmrg
58305b261ecSmrg    unsigned int		totalPixmapSize;
58405b261ecSmrg
58505b261ecSmrg    MarkWindowProcPtr		MarkWindow;
58605b261ecSmrg    MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
58705b261ecSmrg    ChangeSaveUnderProcPtr	ChangeSaveUnder;
58805b261ecSmrg    PostChangeSaveUnderProcPtr	PostChangeSaveUnder;
5896747b715Smrg    ConfigNotifyProcPtr		ConfigNotify;
59005b261ecSmrg    MoveWindowProcPtr		MoveWindow;
59105b261ecSmrg    ResizeWindowProcPtr		ResizeWindow;
59205b261ecSmrg    GetLayerWindowProcPtr	GetLayerWindow;
59305b261ecSmrg    HandleExposuresProcPtr	HandleExposures;
59405b261ecSmrg    ReparentWindowProcPtr	ReparentWindow;
59505b261ecSmrg
59605b261ecSmrg    SetShapeProcPtr		SetShape;
59705b261ecSmrg
59805b261ecSmrg    ChangeBorderWidthProcPtr	ChangeBorderWidth;
59905b261ecSmrg    MarkUnrealizedWindowProcPtr	MarkUnrealizedWindow;
60005b261ecSmrg
6014642e01fSmrg    /* Device cursor procedures */
6024642e01fSmrg    DeviceCursorInitializeProcPtr DeviceCursorInitialize;
6034642e01fSmrg    DeviceCursorCleanupProcPtr    DeviceCursorCleanup;
60405b261ecSmrg} ScreenRec;
60505b261ecSmrg
6066747b715Smrgstatic inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) {
6076747b715Smrg    return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */
6086747b715Smrg}
6096747b715Smrg
61005b261ecSmrgtypedef struct _ScreenInfo {
61105b261ecSmrg    int		imageByteOrder;
61205b261ecSmrg    int		bitmapScanlineUnit;
61305b261ecSmrg    int		bitmapScanlinePad;
61405b261ecSmrg    int		bitmapBitOrder;
61505b261ecSmrg    int		numPixmapFormats;
61605b261ecSmrg    PixmapFormatRec
61705b261ecSmrg		formats[MAXFORMATS];
61805b261ecSmrg    int		numScreens;
61905b261ecSmrg    ScreenPtr	screens[MAXSCREENS];
62005b261ecSmrg} ScreenInfo;
62105b261ecSmrg
6226747b715Smrgextern _X_EXPORT ScreenInfo screenInfo;
62305b261ecSmrg
6246747b715Smrgextern _X_EXPORT void InitOutput(
62505b261ecSmrg    ScreenInfo 	* /*pScreenInfo*/,
62605b261ecSmrg    int     	/*argc*/,
62705b261ecSmrg    char    	** /*argv*/);
62805b261ecSmrg
62905b261ecSmrg#endif /* SCREENINTSTRUCT_H */
630