scrnintstr.h revision 9ace9065
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 "colormap.h" 5405b261ecSmrg#include "cursor.h" 5505b261ecSmrg#include "validate.h" 5605b261ecSmrg#include <X11/Xproto.h> 5705b261ecSmrg#include "dix.h" 584642e01fSmrg#include "privates.h" 5905b261ecSmrg 6005b261ecSmrgtypedef struct _PixmapFormat { 6105b261ecSmrg unsigned char depth; 6205b261ecSmrg unsigned char bitsPerPixel; 6305b261ecSmrg unsigned char scanlinePad; 6405b261ecSmrg } PixmapFormatRec; 6505b261ecSmrg 6605b261ecSmrgtypedef struct _Visual { 6705b261ecSmrg VisualID vid; 6805b261ecSmrg short class; 6905b261ecSmrg short bitsPerRGBValue; 7005b261ecSmrg short ColormapEntries; 7105b261ecSmrg short nplanes;/* = log2 (ColormapEntries). This does not 7205b261ecSmrg * imply that the screen has this many planes. 7305b261ecSmrg * it may have more or fewer */ 7405b261ecSmrg unsigned long redMask, greenMask, blueMask; 7505b261ecSmrg int offsetRed, offsetGreen, offsetBlue; 7605b261ecSmrg } VisualRec; 7705b261ecSmrg 7805b261ecSmrgtypedef struct _Depth { 7905b261ecSmrg unsigned char depth; 8005b261ecSmrg short numVids; 8105b261ecSmrg VisualID *vids; /* block of visual ids for this depth */ 8205b261ecSmrg } DepthRec; 8305b261ecSmrg 846747b715Smrgtypedef struct _ScreenSaverStuff { 856747b715Smrg WindowPtr pWindow; 866747b715Smrg XID wid; 876747b715Smrg char blanked; 886747b715Smrg Bool (*ExternalScreenSaver)( 896747b715Smrg ScreenPtr /*pScreen*/, 906747b715Smrg int /*xstate*/, 916747b715Smrg Bool /*force*/); 926747b715Smrg} ScreenSaverStuffRec; 936747b715Smrg 9405b261ecSmrg 9505b261ecSmrg/* 9605b261ecSmrg * There is a typedef for each screen function pointer so that code that 9705b261ecSmrg * needs to declare a screen function pointer (e.g. in a screen private 9805b261ecSmrg * or as a local variable) can easily do so and retain full type checking. 9905b261ecSmrg */ 10005b261ecSmrg 10105b261ecSmrgtypedef Bool (* CloseScreenProcPtr)( 10205b261ecSmrg int /*index*/, 10305b261ecSmrg ScreenPtr /*pScreen*/); 10405b261ecSmrg 10505b261ecSmrgtypedef void (* QueryBestSizeProcPtr)( 10605b261ecSmrg int /*class*/, 10705b261ecSmrg unsigned short * /*pwidth*/, 10805b261ecSmrg unsigned short * /*pheight*/, 10905b261ecSmrg ScreenPtr /*pScreen*/); 11005b261ecSmrg 11105b261ecSmrgtypedef Bool (* SaveScreenProcPtr)( 11205b261ecSmrg ScreenPtr /*pScreen*/, 11305b261ecSmrg int /*on*/); 11405b261ecSmrg 11505b261ecSmrgtypedef void (* GetImageProcPtr)( 11605b261ecSmrg DrawablePtr /*pDrawable*/, 11705b261ecSmrg int /*sx*/, 11805b261ecSmrg int /*sy*/, 11905b261ecSmrg int /*w*/, 12005b261ecSmrg int /*h*/, 12105b261ecSmrg unsigned int /*format*/, 12205b261ecSmrg unsigned long /*planeMask*/, 12305b261ecSmrg char * /*pdstLine*/); 12405b261ecSmrg 12505b261ecSmrgtypedef void (* GetSpansProcPtr)( 12605b261ecSmrg DrawablePtr /*pDrawable*/, 12705b261ecSmrg int /*wMax*/, 12805b261ecSmrg DDXPointPtr /*ppt*/, 12905b261ecSmrg int* /*pwidth*/, 13005b261ecSmrg int /*nspans*/, 13105b261ecSmrg char * /*pdstStart*/); 13205b261ecSmrg 13305b261ecSmrgtypedef void (* SourceValidateProcPtr)( 13405b261ecSmrg DrawablePtr /*pDrawable*/, 13505b261ecSmrg int /*x*/, 13605b261ecSmrg int /*y*/, 13705b261ecSmrg int /*width*/, 1389ace9065Smrg int /*height*/, 1399ace9065Smrg unsigned int /*subWindowMode*/); 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 Bool (* RealizeFontProcPtr)( 21705b261ecSmrg ScreenPtr /*pScreen*/, 21805b261ecSmrg FontPtr /*pFont*/); 21905b261ecSmrg 22005b261ecSmrgtypedef Bool (* UnrealizeFontProcPtr)( 22105b261ecSmrg ScreenPtr /*pScreen*/, 22205b261ecSmrg FontPtr /*pFont*/); 22305b261ecSmrg 22405b261ecSmrgtypedef void (* ConstrainCursorProcPtr)( 2254642e01fSmrg DeviceIntPtr /*pDev*/, 22605b261ecSmrg ScreenPtr /*pScreen*/, 22705b261ecSmrg BoxPtr /*pBox*/); 22805b261ecSmrg 22905b261ecSmrgtypedef void (* CursorLimitsProcPtr)( 2304642e01fSmrg DeviceIntPtr /* pDev */, 23105b261ecSmrg ScreenPtr /*pScreen*/, 23205b261ecSmrg CursorPtr /*pCursor*/, 23305b261ecSmrg BoxPtr /*pHotBox*/, 23405b261ecSmrg BoxPtr /*pTopLeftBox*/); 23505b261ecSmrg 23605b261ecSmrgtypedef Bool (* DisplayCursorProcPtr)( 2374642e01fSmrg DeviceIntPtr /* pDev */, 23805b261ecSmrg ScreenPtr /*pScreen*/, 23905b261ecSmrg CursorPtr /*pCursor*/); 24005b261ecSmrg 24105b261ecSmrgtypedef Bool (* RealizeCursorProcPtr)( 2424642e01fSmrg DeviceIntPtr /* pDev */, 24305b261ecSmrg ScreenPtr /*pScreen*/, 24405b261ecSmrg CursorPtr /*pCursor*/); 24505b261ecSmrg 24605b261ecSmrgtypedef Bool (* UnrealizeCursorProcPtr)( 2474642e01fSmrg DeviceIntPtr /* pDev */, 24805b261ecSmrg ScreenPtr /*pScreen*/, 24905b261ecSmrg CursorPtr /*pCursor*/); 25005b261ecSmrg 25105b261ecSmrgtypedef void (* RecolorCursorProcPtr)( 2524642e01fSmrg DeviceIntPtr /* pDev */, 25305b261ecSmrg ScreenPtr /*pScreen*/, 25405b261ecSmrg CursorPtr /*pCursor*/, 25505b261ecSmrg Bool /*displayed*/); 25605b261ecSmrg 25705b261ecSmrgtypedef Bool (* SetCursorPositionProcPtr)( 2584642e01fSmrg DeviceIntPtr /* pDev */, 25905b261ecSmrg ScreenPtr /*pScreen*/, 26005b261ecSmrg int /*x*/, 26105b261ecSmrg int /*y*/, 26205b261ecSmrg Bool /*generateEvent*/); 26305b261ecSmrg 26405b261ecSmrgtypedef Bool (* CreateGCProcPtr)( 26505b261ecSmrg GCPtr /*pGC*/); 26605b261ecSmrg 26705b261ecSmrgtypedef Bool (* CreateColormapProcPtr)( 26805b261ecSmrg ColormapPtr /*pColormap*/); 26905b261ecSmrg 27005b261ecSmrgtypedef void (* DestroyColormapProcPtr)( 27105b261ecSmrg ColormapPtr /*pColormap*/); 27205b261ecSmrg 27305b261ecSmrgtypedef void (* InstallColormapProcPtr)( 27405b261ecSmrg ColormapPtr /*pColormap*/); 27505b261ecSmrg 27605b261ecSmrgtypedef void (* UninstallColormapProcPtr)( 27705b261ecSmrg ColormapPtr /*pColormap*/); 27805b261ecSmrg 27905b261ecSmrgtypedef int (* ListInstalledColormapsProcPtr) ( 28005b261ecSmrg ScreenPtr /*pScreen*/, 28105b261ecSmrg XID* /*pmaps */); 28205b261ecSmrg 28305b261ecSmrgtypedef void (* StoreColorsProcPtr)( 28405b261ecSmrg ColormapPtr /*pColormap*/, 28505b261ecSmrg int /*ndef*/, 28605b261ecSmrg xColorItem * /*pdef*/); 28705b261ecSmrg 28805b261ecSmrgtypedef void (* ResolveColorProcPtr)( 28905b261ecSmrg unsigned short* /*pred*/, 29005b261ecSmrg unsigned short* /*pgreen*/, 29105b261ecSmrg unsigned short* /*pblue*/, 29205b261ecSmrg VisualPtr /*pVisual*/); 29305b261ecSmrg 29405b261ecSmrgtypedef RegionPtr (* BitmapToRegionProcPtr)( 29505b261ecSmrg PixmapPtr /*pPix*/); 29605b261ecSmrg 29705b261ecSmrgtypedef void (* SendGraphicsExposeProcPtr)( 29805b261ecSmrg ClientPtr /*client*/, 29905b261ecSmrg RegionPtr /*pRgn*/, 30005b261ecSmrg XID /*drawable*/, 30105b261ecSmrg int /*major*/, 30205b261ecSmrg int /*minor*/); 30305b261ecSmrg 30405b261ecSmrgtypedef void (* ScreenBlockHandlerProcPtr)( 30505b261ecSmrg int /*screenNum*/, 30605b261ecSmrg pointer /*blockData*/, 30705b261ecSmrg pointer /*pTimeout*/, 30805b261ecSmrg pointer /*pReadmask*/); 30905b261ecSmrg 31005b261ecSmrgtypedef void (* ScreenWakeupHandlerProcPtr)( 31105b261ecSmrg int /*screenNum*/, 31205b261ecSmrg pointer /*wakeupData*/, 31305b261ecSmrg unsigned long /*result*/, 31405b261ecSmrg pointer /*pReadMask*/); 31505b261ecSmrg 31605b261ecSmrgtypedef Bool (* CreateScreenResourcesProcPtr)( 31705b261ecSmrg ScreenPtr /*pScreen*/); 31805b261ecSmrg 31905b261ecSmrgtypedef Bool (* ModifyPixmapHeaderProcPtr)( 32005b261ecSmrg PixmapPtr /*pPixmap*/, 32105b261ecSmrg int /*width*/, 32205b261ecSmrg int /*height*/, 32305b261ecSmrg int /*depth*/, 32405b261ecSmrg int /*bitsPerPixel*/, 32505b261ecSmrg int /*devKind*/, 32605b261ecSmrg pointer /*pPixData*/); 32705b261ecSmrg 32805b261ecSmrgtypedef PixmapPtr (* GetWindowPixmapProcPtr)( 32905b261ecSmrg WindowPtr /*pWin*/); 33005b261ecSmrg 33105b261ecSmrgtypedef void (* SetWindowPixmapProcPtr)( 33205b261ecSmrg WindowPtr /*pWin*/, 33305b261ecSmrg PixmapPtr /*pPix*/); 33405b261ecSmrg 33505b261ecSmrgtypedef PixmapPtr (* GetScreenPixmapProcPtr)( 33605b261ecSmrg ScreenPtr /*pScreen*/); 33705b261ecSmrg 33805b261ecSmrgtypedef void (* SetScreenPixmapProcPtr)( 33905b261ecSmrg PixmapPtr /*pPix*/); 34005b261ecSmrg 34105b261ecSmrgtypedef void (* MarkWindowProcPtr)( 34205b261ecSmrg WindowPtr /*pWin*/); 34305b261ecSmrg 34405b261ecSmrgtypedef Bool (* MarkOverlappedWindowsProcPtr)( 34505b261ecSmrg WindowPtr /*parent*/, 34605b261ecSmrg WindowPtr /*firstChild*/, 34705b261ecSmrg WindowPtr * /*pLayerWin*/); 34805b261ecSmrg 3496747b715Smrgtypedef int (* ConfigNotifyProcPtr)( 3506747b715Smrg WindowPtr /*pWin*/, 3516747b715Smrg int /*x*/, 3526747b715Smrg int /*y*/, 3536747b715Smrg int /*w*/, 3546747b715Smrg int /*h*/, 3556747b715Smrg int /*bw*/, 3566747b715Smrg WindowPtr /*pSib*/); 3576747b715Smrg 35805b261ecSmrgtypedef void (* MoveWindowProcPtr)( 35905b261ecSmrg WindowPtr /*pWin*/, 36005b261ecSmrg int /*x*/, 36105b261ecSmrg int /*y*/, 36205b261ecSmrg WindowPtr /*pSib*/, 36305b261ecSmrg VTKind /*kind*/); 36405b261ecSmrg 36505b261ecSmrgtypedef void (* ResizeWindowProcPtr)( 36605b261ecSmrg WindowPtr /*pWin*/, 36705b261ecSmrg int /*x*/, 36805b261ecSmrg int /*y*/, 36905b261ecSmrg unsigned int /*w*/, 37005b261ecSmrg unsigned int /*h*/, 37105b261ecSmrg WindowPtr /*pSib*/ 37205b261ecSmrg); 37305b261ecSmrg 37405b261ecSmrgtypedef WindowPtr (* GetLayerWindowProcPtr)( 37505b261ecSmrg WindowPtr /*pWin*/ 37605b261ecSmrg); 37705b261ecSmrg 37805b261ecSmrgtypedef void (* HandleExposuresProcPtr)( 37905b261ecSmrg WindowPtr /*pWin*/); 38005b261ecSmrg 38105b261ecSmrgtypedef void (* ReparentWindowProcPtr)( 38205b261ecSmrg WindowPtr /*pWin*/, 38305b261ecSmrg WindowPtr /*pPriorParent*/); 38405b261ecSmrg 38505b261ecSmrgtypedef void (* SetShapeProcPtr)( 3866747b715Smrg WindowPtr /*pWin*/, 3876747b715Smrg int /* kind */); 38805b261ecSmrg 38905b261ecSmrgtypedef void (* ChangeBorderWidthProcPtr)( 39005b261ecSmrg WindowPtr /*pWin*/, 39105b261ecSmrg unsigned int /*width*/); 39205b261ecSmrg 39305b261ecSmrgtypedef void (* MarkUnrealizedWindowProcPtr)( 39405b261ecSmrg WindowPtr /*pChild*/, 39505b261ecSmrg WindowPtr /*pWin*/, 39605b261ecSmrg Bool /*fromConfigure*/); 39705b261ecSmrg 3984642e01fSmrgtypedef Bool (* DeviceCursorInitializeProcPtr)( 3994642e01fSmrg DeviceIntPtr /* pDev */, 4004642e01fSmrg ScreenPtr /* pScreen */); 4014642e01fSmrg 4024642e01fSmrgtypedef void (* DeviceCursorCleanupProcPtr)( 4034642e01fSmrg DeviceIntPtr /* pDev */, 4044642e01fSmrg ScreenPtr /* pScreen */); 4054642e01fSmrg 4069ace9065Smrgtypedef void (*ConstrainCursorHarderProcPtr)( 4079ace9065Smrg DeviceIntPtr, ScreenPtr, int, int *, int *); 4089ace9065Smrg 40905b261ecSmrgtypedef struct _Screen { 41005b261ecSmrg int myNum; /* index of this instance in Screens[] */ 41105b261ecSmrg ATOM id; 4126747b715Smrg short x, y, width, height; 41305b261ecSmrg short mmWidth, mmHeight; 41405b261ecSmrg short numDepths; 41505b261ecSmrg unsigned char rootDepth; 41605b261ecSmrg DepthPtr allowedDepths; 41705b261ecSmrg unsigned long rootVisual; 41805b261ecSmrg unsigned long defColormap; 41905b261ecSmrg short minInstalledCmaps, maxInstalledCmaps; 42005b261ecSmrg char backingStoreSupport, saveUnderSupport; 42105b261ecSmrg unsigned long whitePixel, blackPixel; 42205b261ecSmrg GCPtr GCperDepth[MAXFORMATS+1]; 42305b261ecSmrg /* next field is a stipple to use as default in 42405b261ecSmrg a GC. we don't build default tiles of all depths 42505b261ecSmrg because they are likely to be of a color 42605b261ecSmrg different from the default fg pixel, so 42705b261ecSmrg we don't win anything by building 42805b261ecSmrg a standard one. 42905b261ecSmrg */ 43005b261ecSmrg PixmapPtr PixmapPerDepth[1]; 43105b261ecSmrg pointer devPrivate; 43205b261ecSmrg short numVisuals; 43305b261ecSmrg VisualPtr visuals; 4346747b715Smrg WindowPtr root; 4356747b715Smrg ScreenSaverStuffRec screensaver; 43605b261ecSmrg 43705b261ecSmrg /* Random screen procedures */ 43805b261ecSmrg 43905b261ecSmrg CloseScreenProcPtr CloseScreen; 44005b261ecSmrg QueryBestSizeProcPtr QueryBestSize; 44105b261ecSmrg SaveScreenProcPtr SaveScreen; 44205b261ecSmrg GetImageProcPtr GetImage; 44305b261ecSmrg GetSpansProcPtr GetSpans; 44405b261ecSmrg SourceValidateProcPtr SourceValidate; 44505b261ecSmrg 44605b261ecSmrg /* Window Procedures */ 44705b261ecSmrg 44805b261ecSmrg CreateWindowProcPtr CreateWindow; 44905b261ecSmrg DestroyWindowProcPtr DestroyWindow; 45005b261ecSmrg PositionWindowProcPtr PositionWindow; 45105b261ecSmrg ChangeWindowAttributesProcPtr ChangeWindowAttributes; 45205b261ecSmrg RealizeWindowProcPtr RealizeWindow; 45305b261ecSmrg UnrealizeWindowProcPtr UnrealizeWindow; 45405b261ecSmrg ValidateTreeProcPtr ValidateTree; 45505b261ecSmrg PostValidateTreeProcPtr PostValidateTree; 45605b261ecSmrg WindowExposuresProcPtr WindowExposures; 45705b261ecSmrg CopyWindowProcPtr CopyWindow; 45805b261ecSmrg ClearToBackgroundProcPtr ClearToBackground; 45905b261ecSmrg ClipNotifyProcPtr ClipNotify; 46005b261ecSmrg RestackWindowProcPtr RestackWindow; 46105b261ecSmrg 46205b261ecSmrg /* Pixmap procedures */ 46305b261ecSmrg 46405b261ecSmrg CreatePixmapProcPtr CreatePixmap; 46505b261ecSmrg DestroyPixmapProcPtr DestroyPixmap; 46605b261ecSmrg 46705b261ecSmrg /* Font procedures */ 46805b261ecSmrg 46905b261ecSmrg RealizeFontProcPtr RealizeFont; 47005b261ecSmrg UnrealizeFontProcPtr UnrealizeFont; 47105b261ecSmrg 47205b261ecSmrg /* Cursor Procedures */ 47305b261ecSmrg 47405b261ecSmrg ConstrainCursorProcPtr ConstrainCursor; 4759ace9065Smrg ConstrainCursorHarderProcPtr ConstrainCursorHarder; 47605b261ecSmrg CursorLimitsProcPtr CursorLimits; 47705b261ecSmrg DisplayCursorProcPtr DisplayCursor; 47805b261ecSmrg RealizeCursorProcPtr RealizeCursor; 47905b261ecSmrg UnrealizeCursorProcPtr UnrealizeCursor; 48005b261ecSmrg RecolorCursorProcPtr RecolorCursor; 48105b261ecSmrg SetCursorPositionProcPtr SetCursorPosition; 48205b261ecSmrg 48305b261ecSmrg /* GC procedures */ 48405b261ecSmrg 48505b261ecSmrg CreateGCProcPtr CreateGC; 48605b261ecSmrg 48705b261ecSmrg /* Colormap procedures */ 48805b261ecSmrg 48905b261ecSmrg CreateColormapProcPtr CreateColormap; 49005b261ecSmrg DestroyColormapProcPtr DestroyColormap; 49105b261ecSmrg InstallColormapProcPtr InstallColormap; 49205b261ecSmrg UninstallColormapProcPtr UninstallColormap; 49305b261ecSmrg ListInstalledColormapsProcPtr ListInstalledColormaps; 49405b261ecSmrg StoreColorsProcPtr StoreColors; 49505b261ecSmrg ResolveColorProcPtr ResolveColor; 49605b261ecSmrg 49705b261ecSmrg /* Region procedures */ 49805b261ecSmrg 49905b261ecSmrg BitmapToRegionProcPtr BitmapToRegion; 50005b261ecSmrg SendGraphicsExposeProcPtr SendGraphicsExpose; 50105b261ecSmrg 50205b261ecSmrg /* os layer procedures */ 50305b261ecSmrg 50405b261ecSmrg ScreenBlockHandlerProcPtr BlockHandler; 50505b261ecSmrg ScreenWakeupHandlerProcPtr WakeupHandler; 50605b261ecSmrg 50705b261ecSmrg pointer blockData; 50805b261ecSmrg pointer wakeupData; 50905b261ecSmrg 51005b261ecSmrg /* anybody can get a piece of this array */ 5114642e01fSmrg PrivateRec *devPrivates; 51205b261ecSmrg 51305b261ecSmrg CreateScreenResourcesProcPtr CreateScreenResources; 51405b261ecSmrg ModifyPixmapHeaderProcPtr ModifyPixmapHeader; 51505b261ecSmrg 51605b261ecSmrg GetWindowPixmapProcPtr GetWindowPixmap; 51705b261ecSmrg SetWindowPixmapProcPtr SetWindowPixmap; 51805b261ecSmrg GetScreenPixmapProcPtr GetScreenPixmap; 51905b261ecSmrg SetScreenPixmapProcPtr SetScreenPixmap; 52005b261ecSmrg 52105b261ecSmrg PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */ 52205b261ecSmrg 52305b261ecSmrg unsigned int totalPixmapSize; 52405b261ecSmrg 52505b261ecSmrg MarkWindowProcPtr MarkWindow; 52605b261ecSmrg MarkOverlappedWindowsProcPtr MarkOverlappedWindows; 5276747b715Smrg ConfigNotifyProcPtr ConfigNotify; 52805b261ecSmrg MoveWindowProcPtr MoveWindow; 52905b261ecSmrg ResizeWindowProcPtr ResizeWindow; 53005b261ecSmrg GetLayerWindowProcPtr GetLayerWindow; 53105b261ecSmrg HandleExposuresProcPtr HandleExposures; 53205b261ecSmrg ReparentWindowProcPtr ReparentWindow; 53305b261ecSmrg 53405b261ecSmrg SetShapeProcPtr SetShape; 53505b261ecSmrg 53605b261ecSmrg ChangeBorderWidthProcPtr ChangeBorderWidth; 53705b261ecSmrg MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; 53805b261ecSmrg 5394642e01fSmrg /* Device cursor procedures */ 5404642e01fSmrg DeviceCursorInitializeProcPtr DeviceCursorInitialize; 5414642e01fSmrg DeviceCursorCleanupProcPtr DeviceCursorCleanup; 5429ace9065Smrg 5439ace9065Smrg /* set it in driver side if X server can copy the framebuffer content. 5449ace9065Smrg * Meant to be used together with '-background none' option, avoiding 5459ace9065Smrg * malicious users to steal framebuffer's content if that would be the 5469ace9065Smrg * default */ 5479ace9065Smrg Bool canDoBGNoneRoot; 54805b261ecSmrg} ScreenRec; 54905b261ecSmrg 5506747b715Smrgstatic inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) { 5516747b715Smrg return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */ 5526747b715Smrg} 5536747b715Smrg 55405b261ecSmrgtypedef struct _ScreenInfo { 55505b261ecSmrg int imageByteOrder; 55605b261ecSmrg int bitmapScanlineUnit; 55705b261ecSmrg int bitmapScanlinePad; 55805b261ecSmrg int bitmapBitOrder; 55905b261ecSmrg int numPixmapFormats; 56005b261ecSmrg PixmapFormatRec 56105b261ecSmrg formats[MAXFORMATS]; 56205b261ecSmrg int numScreens; 56305b261ecSmrg ScreenPtr screens[MAXSCREENS]; 56405b261ecSmrg} ScreenInfo; 56505b261ecSmrg 5666747b715Smrgextern _X_EXPORT ScreenInfo screenInfo; 56705b261ecSmrg 5686747b715Smrgextern _X_EXPORT void InitOutput( 56905b261ecSmrg ScreenInfo * /*pScreenInfo*/, 57005b261ecSmrg int /*argc*/, 57105b261ecSmrg char ** /*argv*/); 57205b261ecSmrg 57305b261ecSmrg#endif /* SCREENINTSTRUCT_H */ 574