#ifndef SCREENINTSTRUCT_H
#define SCREENINTSTRUCT_H
#include "screenint.h"
#include "regionstr.h"
#include "bstore.h"
#include "colormap.h"
#include "cursor.h"
#include "validate.h"
#include <X11/Xproto.h>
#include "dix.h"
#include "privates.h"
typedef struct _PixmapFormat {
unsigned char depth;
unsigned char bitsPerPixel;
unsigned char scanlinePad;
} PixmapFormatRec;
typedef struct _Visual {
VisualID vid;
short class;
short bitsPerRGBValue;
short ColormapEntries;
short nplanes;
unsigned long redMask, greenMask, blueMask;
int offsetRed, offsetGreen, offsetBlue;
} VisualRec;
typedef struct _Depth {
unsigned char depth;
short numVids;
VisualID *vids;
} DepthRec;
typedef Bool (* CloseScreenProcPtr)(
int ,
ScreenPtr );
typedef void (* QueryBestSizeProcPtr)(
int ,
unsigned short * ,
unsigned short * ,
ScreenPtr );
typedef Bool (* SaveScreenProcPtr)(
ScreenPtr ,
int );
typedef void (* GetImageProcPtr)(
DrawablePtr ,
int ,
int ,
int ,
int ,
unsigned int ,
unsigned long ,
char * );
typedef void (* GetSpansProcPtr)(
DrawablePtr ,
int ,
DDXPointPtr ,
int* ,
int ,
char * );
typedef void (* PointerNonInterestBoxProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
BoxPtr );
typedef void (* SourceValidateProcPtr)(
DrawablePtr ,
int ,
int ,
int ,
int );
typedef Bool (* CreateWindowProcPtr)(
WindowPtr );
typedef Bool (* DestroyWindowProcPtr)(
WindowPtr );
typedef Bool (* PositionWindowProcPtr)(
WindowPtr ,
int ,
int );
typedef Bool (* ChangeWindowAttributesProcPtr)(
WindowPtr ,
unsigned long );
typedef Bool (* RealizeWindowProcPtr)(
WindowPtr );
typedef Bool (* UnrealizeWindowProcPtr)(
WindowPtr );
typedef void (* RestackWindowProcPtr)(
WindowPtr ,
WindowPtr );
typedef int (* ValidateTreeProcPtr)(
WindowPtr ,
WindowPtr ,
VTKind );
typedef void (* PostValidateTreeProcPtr)(
WindowPtr ,
WindowPtr ,
VTKind );
typedef void (* WindowExposuresProcPtr)(
WindowPtr ,
RegionPtr ,
RegionPtr );
typedef void (* PaintWindowProcPtr)(
WindowPtr ,
RegionPtr ,
int );
typedef PaintWindowProcPtr PaintWindowBackgroundProcPtr;
typedef PaintWindowProcPtr PaintWindowBorderProcPtr;
typedef void (* CopyWindowProcPtr)(
WindowPtr ,
DDXPointRec ,
RegionPtr );
typedef void (* ClearToBackgroundProcPtr)(
WindowPtr ,
int ,
int ,
int ,
int ,
Bool );
typedef void (* ClipNotifyProcPtr)(
WindowPtr ,
int ,
int );
#define CREATE_PIXMAP_USAGE_SCRATCH 1
#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
typedef PixmapPtr (* CreatePixmapProcPtr)(
ScreenPtr ,
int ,
int ,
int ,
unsigned );
typedef Bool (* DestroyPixmapProcPtr)(
PixmapPtr );
typedef void (* SaveDoomedAreasProcPtr)(
WindowPtr ,
RegionPtr ,
int ,
int );
typedef RegionPtr (* RestoreAreasProcPtr)(
WindowPtr ,
RegionPtr );
typedef void (* ExposeCopyProcPtr)(
WindowPtr ,
DrawablePtr ,
GCPtr ,
RegionPtr ,
int ,
int ,
int ,
int ,
unsigned long );
typedef RegionPtr (* TranslateBackingStoreProcPtr)(
WindowPtr ,
int ,
int ,
RegionPtr ,
int ,
int );
typedef RegionPtr (* ClearBackingStoreProcPtr)(
WindowPtr ,
int ,
int ,
int ,
int ,
Bool );
typedef void (* DrawGuaranteeProcPtr)(
WindowPtr ,
GCPtr ,
int );
typedef Bool (* RealizeFontProcPtr)(
ScreenPtr ,
FontPtr );
typedef Bool (* UnrealizeFontProcPtr)(
ScreenPtr ,
FontPtr );
typedef void (* ConstrainCursorProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
BoxPtr );
typedef void (* CursorLimitsProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
CursorPtr ,
BoxPtr ,
BoxPtr );
typedef Bool (* DisplayCursorProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
CursorPtr );
typedef Bool (* RealizeCursorProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
CursorPtr );
typedef Bool (* UnrealizeCursorProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
CursorPtr );
typedef void (* RecolorCursorProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
CursorPtr ,
Bool );
typedef Bool (* SetCursorPositionProcPtr)(
DeviceIntPtr ,
ScreenPtr ,
int ,
int ,
Bool );
typedef Bool (* CreateGCProcPtr)(
GCPtr );
typedef Bool (* CreateColormapProcPtr)(
ColormapPtr );
typedef void (* DestroyColormapProcPtr)(
ColormapPtr );
typedef void (* InstallColormapProcPtr)(
ColormapPtr );
typedef void (* UninstallColormapProcPtr)(
ColormapPtr );
typedef int (* ListInstalledColormapsProcPtr) (
ScreenPtr ,
XID* );
typedef void (* StoreColorsProcPtr)(
ColormapPtr ,
int ,
xColorItem * );
typedef void (* ResolveColorProcPtr)(
unsigned short* ,
unsigned short* ,
unsigned short* ,
VisualPtr );
typedef RegionPtr (* BitmapToRegionProcPtr)(
PixmapPtr );
typedef void (* SendGraphicsExposeProcPtr)(
ClientPtr ,
RegionPtr ,
XID ,
int ,
int );
typedef void (* ScreenBlockHandlerProcPtr)(
int ,
pointer ,
pointer ,
pointer );
typedef void (* ScreenWakeupHandlerProcPtr)(
int ,
pointer ,
unsigned long ,
pointer );
typedef Bool (* CreateScreenResourcesProcPtr)(
ScreenPtr );
typedef Bool (* ModifyPixmapHeaderProcPtr)(
PixmapPtr ,
int ,
int ,
int ,
int ,
int ,
pointer );
typedef PixmapPtr (* GetWindowPixmapProcPtr)(
WindowPtr );
typedef void (* SetWindowPixmapProcPtr)(
WindowPtr ,
PixmapPtr );
typedef PixmapPtr (* GetScreenPixmapProcPtr)(
ScreenPtr );
typedef void (* SetScreenPixmapProcPtr)(
PixmapPtr );
typedef void (* MarkWindowProcPtr)(
WindowPtr );
typedef Bool (* MarkOverlappedWindowsProcPtr)(
WindowPtr ,
WindowPtr ,
WindowPtr * );
typedef Bool (* ChangeSaveUnderProcPtr)(
WindowPtr ,
WindowPtr );
typedef void (* PostChangeSaveUnderProcPtr)(
WindowPtr ,
WindowPtr );
typedef void (* MoveWindowProcPtr)(
WindowPtr ,
int ,
int ,
WindowPtr ,
VTKind );
typedef void (* ResizeWindowProcPtr)(
WindowPtr ,
int ,
int ,
unsigned int ,
unsigned int ,
WindowPtr
);
typedef WindowPtr (* GetLayerWindowProcPtr)(
WindowPtr
);
typedef void (* HandleExposuresProcPtr)(
WindowPtr );
typedef void (* ReparentWindowProcPtr)(
WindowPtr ,
WindowPtr );
typedef void (* SetShapeProcPtr)(
WindowPtr );
typedef void (* ChangeBorderWidthProcPtr)(
WindowPtr ,
unsigned int );
typedef void (* MarkUnrealizedWindowProcPtr)(
WindowPtr ,
WindowPtr ,
Bool );
typedef Bool (* DeviceCursorInitializeProcPtr)(
DeviceIntPtr ,
ScreenPtr );
typedef void (* DeviceCursorCleanupProcPtr)(
DeviceIntPtr ,
ScreenPtr );
typedef struct _Screen {
int myNum;
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;
GCPtr GCperDepth[MAXFORMATS+1];
PixmapPtr PixmapPerDepth[1];
pointer devPrivate;
short numVisuals;
VisualPtr visuals;
CloseScreenProcPtr CloseScreen;
QueryBestSizeProcPtr QueryBestSize;
SaveScreenProcPtr SaveScreen;
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
PointerNonInterestBoxProcPtr PointerNonInterestBox;
SourceValidateProcPtr SourceValidate;
CreateWindowProcPtr CreateWindow;
DestroyWindowProcPtr DestroyWindow;
PositionWindowProcPtr PositionWindow;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
RealizeWindowProcPtr RealizeWindow;
UnrealizeWindowProcPtr UnrealizeWindow;
ValidateTreeProcPtr ValidateTree;
PostValidateTreeProcPtr PostValidateTree;
WindowExposuresProcPtr WindowExposures;
PaintWindowBackgroundProcPtr PaintWindowBackground;
PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
ClipNotifyProcPtr ClipNotify;
RestackWindowProcPtr RestackWindow;
CreatePixmapProcPtr CreatePixmap;
DestroyPixmapProcPtr DestroyPixmap;
SaveDoomedAreasProcPtr SaveDoomedAreas;
RestoreAreasProcPtr RestoreAreas;
ExposeCopyProcPtr ExposeCopy;
TranslateBackingStoreProcPtr TranslateBackingStore;
ClearBackingStoreProcPtr ClearBackingStore;
DrawGuaranteeProcPtr DrawGuarantee;
BSFuncRec BackingStoreFuncs;
RealizeFontProcPtr RealizeFont;
UnrealizeFontProcPtr UnrealizeFont;
ConstrainCursorProcPtr ConstrainCursor;
CursorLimitsProcPtr CursorLimits;
DisplayCursorProcPtr DisplayCursor;
RealizeCursorProcPtr RealizeCursor;
UnrealizeCursorProcPtr UnrealizeCursor;
RecolorCursorProcPtr RecolorCursor;
SetCursorPositionProcPtr SetCursorPosition;
CreateGCProcPtr CreateGC;
CreateColormapProcPtr CreateColormap;
DestroyColormapProcPtr DestroyColormap;
InstallColormapProcPtr InstallColormap;
UninstallColormapProcPtr UninstallColormap;
ListInstalledColormapsProcPtr ListInstalledColormaps;
StoreColorsProcPtr StoreColors;
ResolveColorProcPtr ResolveColor;
BitmapToRegionProcPtr BitmapToRegion;
SendGraphicsExposeProcPtr SendGraphicsExpose;
ScreenBlockHandlerProcPtr BlockHandler;
ScreenWakeupHandlerProcPtr WakeupHandler;
pointer blockData;
pointer wakeupData;
PrivateRec *devPrivates;
CreateScreenResourcesProcPtr CreateScreenResources;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
GetWindowPixmapProcPtr GetWindowPixmap;
SetWindowPixmapProcPtr SetWindowPixmap;
GetScreenPixmapProcPtr GetScreenPixmap;
SetScreenPixmapProcPtr SetScreenPixmap;
PixmapPtr pScratchPixmap;
unsigned int totalPixmapSize;
MarkWindowProcPtr MarkWindow;
MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
ChangeSaveUnderProcPtr ChangeSaveUnder;
PostChangeSaveUnderProcPtr PostChangeSaveUnder;
MoveWindowProcPtr MoveWindow;
ResizeWindowProcPtr ResizeWindow;
GetLayerWindowProcPtr GetLayerWindow;
HandleExposuresProcPtr HandleExposures;
ReparentWindowProcPtr ReparentWindow;
SetShapeProcPtr SetShape;
ChangeBorderWidthProcPtr ChangeBorderWidth;
MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
DeviceCursorInitializeProcPtr DeviceCursorInitialize;
DeviceCursorCleanupProcPtr DeviceCursorCleanup;
} ScreenRec;
typedef struct _ScreenInfo {
int imageByteOrder;
int bitmapScanlineUnit;
int bitmapScanlinePad;
int bitmapBitOrder;
int numPixmapFormats;
PixmapFormatRec
formats[MAXFORMATS];
int arraySize;
int numScreens;
ScreenPtr screens[MAXSCREENS];
int unused;
} ScreenInfo;
extern ScreenInfo screenInfo;
extern void InitOutput(
ScreenInfo * ,
int ,
char ** );
#endif