DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ScreenRec(D4nfb)


ScreenRec -- ddx structure defining the characteristics of a screen

Synopsis

#include "scrninstr.h"

Description

This structure defines the fundamental characteristics of a screen. The X server allocates one ScreenRec for every screen it manages. ScreenRecs contain 2 types of members: those that hold information about the screen state and those that contain pointers to routines used by the DIX layer to manipulate the screen. Although they can be used by other layers, most of the members are modified solely by the DIX layer. The DDX layer creates and maintains the members that point to routines which are considered to be part of the information that the DDX layer provides to the DIX layer.

Structure definition

Because of the size and complexity of this structure, the definition is broken up into logical subsections and the individual members are not all documented.

The first section contains various screen definitions

typedef struct _Screen {
    int			myNum;	/* index of this instance in Screens[] */
    ATOM		id;
    short		width, height;
    short		mmWidth, mmHeight;
    short		numDepths;
    unsigned char      	rootDepth;
    DepthPtr       	allowedDepths;
    unsigned long      	rootVisual;
    unsigned long	defColormap;
    short		minInstalledCmaps, maxInstalledCmaps;
    char                backingStoreSupport, saveUnderSupport;
    unsigned long	whitePixel, blackPixel;
    unsigned long	rgf;	/* array of flags; she's -- HUNGARIAN */
    GCPtr		GCperDepth[MAXFORMATS+1];
    PixmapPtr		PixmapPerDepth[1];
    pointer		devPrivate;
    short       	numVisuals;
    VisualPtr		visuals;
    int			WindowPrivateLen;
    unsigned		*WindowPrivateSizes;
    unsigned		totalWindowSize;
    int			GCPrivateLen;
    unsigned		*GCPrivateSizes;
    unsigned		totalGCSize;
#ifdef PIXPRIV
    int			PixmapPrivateLen;
    unsigned		*PixmapPrivateSizes;
    unsigned		totalPixmapSize;
    long		_reserved_pad_data[47]; /* new privates */
#else
    long		_reserved_pad_data[50]; /* padding for expansion S001 */
#endif
Note the following:

myNum
index of this instance in the Screens[] array.

PixmapPtr
stipple used as a default in a GC. Default tiles of all depths are not built because they may be a different color than the default fg pixel.

Screen utility procedures

These are pointers and prototypes to functions used by the dix layer to determine the best size for cursors, images, and pixmaps and to close screens that are not neded, retrieve images or raster collections to change screen saver states, control pointer events in certain areas, and to check whether screen regions are available for use.
       Bool (* CloseScreen)();		/* index, pScreen */
       void (* QueryBestSize)();		/* class, pwidth, pheight, pScreen */
       Bool (* SaveScreen)();		/* pScreen, on */
       void (* GetImage)();		/* pDrawable, sx, sy, w, h, format,
   					 * planemask, pdestbits */
       void (* GetSpans)();		/* pDrawable, wMax, ppt, pwidth,
   					 * nspans, pdstbits */
       void (* PointerNonInterestBox)();	/* pScr, BoxPtr */
       void (* SourceValidate)();		/* pDrawable, x, y, w, h */

Window procedures

Pointers and prototypes for procedures used to create, destroy, and position windows and to control window attributes. They also realize windows before maping, unrealize them before destruction, and keep track of various other window attributes.
       Bool (* CreateWindow)();		/* pWin */
       Bool (* DestroyWindow)();		/* pWin */
       Bool (* PositionWindow)();		/* pWin, x, y */
       Bool (* ChangeWindowAttributes)();	/* pWin, mask */
       Bool (* RealizeWindow)();		/* pWin */
       Bool (* UnrealizeWindow)();		/* pWin */
       int  (* ValidateTree)();		/* pParent, pChild, kind */
       void (* PostValidateTree)();	/* pParent, pChild, kind */
       void (* WindowExposures)();         /* pWin, pRegion, pBSRegion */
       void (* PaintWindowBackground)();	/* pWin, pRgn, which */
       void (* PaintWindowBorder)();	/* pWin, pRgn, which */
       void (* CopyWindow)();		/* pWin, oldPt, pOldRegion */
       void (* ClearToBackground)();	/* pWin, x,y,w,h, sendExpose */
       void (* ClipNotify)();              /* pWin, dx, dy */

Pixmap procedures

Pointers and prototypes for functions that create and destroy pixmaps.
       PixmapPtr (* CreatePixmap)(); 	/* pScreen, width, height, depth */
       Bool (* DestroyPixmap)();		/* pPixmap */

Backing store procedures

Pointers and prototypes for functions that control the ``backing store'' interface. Backing store is used to save and restore parts of windows that are obscured.
       void (* SaveDoomedAreas)();		/* pWin, pRegion, dx, dy */
       RegionPtr (* RestoreAreas)();	/* pWin, pRegion */
       void (* ExposeCopy)();		/* pSrc, pDst, pGC, pRegion, */
   					/* srcx, srcy, dstx, dsty, plane */
       RegionPtr (* TranslateBackingStore)();/* pWin, dx, dy, pOldClip */
       RegionPtr (* ClearBackingStore)();	/* pWin, x, y, w, h, sendExpose */
       void (* DrawGuarantee)();		/* pWin, pGC, guarantee */

Font procedures

Pointers and prototypes for procedures used by the dix layer to cause the ddx layer to allocate and remove font storage space.
       Bool (* RealizeFont)();		/* pScr, pFont */
       Bool (* UnrealizeFont)();		/* pScr, pFont */

Cursor procedures

Pointers and prototypes for procedures that allow the dix layer to limit the places the cursor can appear on the screen, find out the limits already placed onthe cursor, control the allocation of space for the cursor, and change the cursor's color and position.
       void (* ConstrainCursor)();   	/* pScr, BoxPtr */
       void (* CursorLimits)();		/* pScr, pCurs, BoxPtr, BoxPtr */
       Bool (* DisplayCursor)();		/* pScr, pCurs */
       Bool (* RealizeCursor)();		/* pScr, pCurs */
       Bool (* UnrealizeCursor)();		/* pScr, pCurs */
       void (* RecolorCursor)();		/* pScr, pCurs, displayed */
       Bool (* SetCursorPosition)();	/* pScr, x, y */

GC procedure

Pointer and prototype for function used by the dix layer to tell the ddx layer that a new graphics context has been created.
       Bool (* CreateGC)();		/* pGC */

Colormap procedures

Pointers and prototypes for functions that control the creation, destruction, installation, and modification of colormaps. Also contains routines that allow the installed colormaps to be listed andmodified so as to be displayed in a screen's displayable range.
       Bool (* CreateColormap)();		/* pcmap */
       void (* DestroyColormap)();		/* pcmap */
       void (* InstallColormap)();		/* pcmap */
       void (* UninstallColormap)();	/* pcmap */
       int (* ListInstalledColormaps) (); 	/* pScreen, pmaps */
       void (* StoreColors)();		/* pmap, ndef, pdef */
       void (* ResolveColor)();		/* preg, pgreen, pblue */

Region procedures

Pointers and prototypes for functions required by ddx in order to implement regions. These routines are used by both ddx and dix to create, destroy, and combine regions.
       RegionPtr (* RegionCreate)(); 	/* rect, size */
       void (* RegionInit)();		/* pRegion, rect, size */
       Bool (* RegionCopy)();		/* dstrgn, srcrgn */
       void (* RegionDestroy)();		/* pRegion */
       void (* RegionUninit)();		/* pRegion */
       Bool (* Intersect)();		/* newReg, reg1, reg2 */
       Bool (* Union)();			/* newReg, reg1, reg2 */
       Bool (* Subtract)();		/* regD, regM, regS */
       Bool (* Inverse)();			/* newReg, reg1, invRect */
       void (* RegionReset)();		/* pRegion, pBox */
       void (* TranslateRegion)();		/* pRegion, x, y */
       int (* RectIn)();			/* pRegion, pRect */
       Bool (* PointInRegion)();		/* pRegion, x, y, pBox */
       Bool (* RegionNotEmpty)();      	/* pRegion: RegionPtr */
       void (* RegionEmpty)();        	/* pRegion: RegionPtr */
       BoxPtr (* RegionExtents)(); 	/* pRegion: RegionPtr */
       Bool (* RegionAppend)();		/* pRegion, pRegion */
       Bool (* RegionValidate)();		/* pRegion, pOverlap */
       RegionPtr (* BitmapToRegion)();	/* PixmapPtr */
       RegionPtr (* RectsToRegion)();	/* nrects, pRects, ordering */
       void (* SendGraphicsExpose)();	/* client, rgn, draw, major, minor */
   

Bool (* CreateScreenResources)(); /* pScreen */ Bool (* ModifyPixmapHeader)(); /* pPixmap, w, h, depth, bpp, devKind, pixdata */

OS layer procedures

Utility routines used by the dix layer before and after it calls the os layer to check for input.
       void (* BlockHandler)();		/* data: pointer */
       void (* WakeupHandler)();		/* data: pointer */
       pointer blockData;
       pointer wakeupData;
   

/* anybody can get a piece of this array */ DevUnion *devPrivates;

PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */

Usage

A prototype ScreenRec structure is needed by the nfbScreenInit(D3nfb) function for drivers that use the nfb layer.

Porting notes

The ScreenRec structure is defined by the X Consortium. The SCO X Link Kit modifies this structure by padding it to ensure that it is always the same size.

Version applicability

This structure is supported for NFB drivers on all releases of SCO OpenServer 5, SVR5, and AIX 5L.

References

nfbScreenInit(D3nfb)

``Screen Private'' in Developing NFB graphics adapter drivers


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005