aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/miscrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/mi/miscrinit.c')
-rw-r--r--xorg-server/mi/miscrinit.c91
1 files changed, 38 insertions, 53 deletions
diff --git a/xorg-server/mi/miscrinit.c b/xorg-server/mi/miscrinit.c
index 7ca5f5df1..28d331653 100644
--- a/xorg-server/mi/miscrinit.c
+++ b/xorg-server/mi/miscrinit.c
@@ -61,15 +61,8 @@ typedef struct
/* this plugs into pScreen->ModifyPixmapHeader */
_X_EXPORT Bool
-miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind,
- pPixData)
- PixmapPtr pPixmap;
- int width;
- int height;
- int depth;
- int bitsPerPixel;
- int devKind;
- pointer pPixData;
+miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData)
{
if (!pPixmap)
return FALSE;
@@ -140,8 +133,7 @@ miCloseScreen (int iScreen, ScreenPtr pScreen)
* screen pixmap here.
*/
_X_EXPORT Bool
-miCreateScreenResources(pScreen)
- ScreenPtr pScreen;
+miCreateScreenResources(ScreenPtr pScreen)
{
miScreenInitParmsPtr pScrInitParms;
pointer value;
@@ -180,10 +172,7 @@ miCreateScreenResources(pScreen)
}
Bool
-miScreenDevPrivateInit(pScreen, width, pbits)
- ScreenPtr pScreen;
- int width;
- pointer pbits;
+miScreenDevPrivateInit(ScreenPtr pScreen, int width, pointer pbits)
{
miScreenInitParmsPtr pScrInitParms;
@@ -200,20 +189,33 @@ miScreenDevPrivateInit(pScreen, width, pbits)
return TRUE;
}
+static PixmapPtr
+miGetScreenPixmap(ScreenPtr pScreen)
+{
+ return (PixmapPtr)(pScreen->devPrivate);
+}
+
+static void
+miSetScreenPixmap(PixmapPtr pPix)
+{
+ if (pPix)
+ pPix->drawable.pScreen->devPrivate = (pointer)pPix;
+}
+
_X_EXPORT Bool
-miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
- rootDepth, numDepths, depths, rootVisual, numVisuals, visuals)
- ScreenPtr pScreen;
- pointer pbits; /* pointer to screen bits */
- int xsize, ysize; /* in pixels */
- int dpix, dpiy; /* dots per inch */
- int width; /* pixel width of frame buffer */
- int rootDepth; /* depth of root window */
- int numDepths; /* number of depths supported */
- DepthRec *depths; /* supported depths */
- VisualID rootVisual; /* root visual */
- int numVisuals; /* number of visuals supported */
- VisualRec *visuals; /* supported visuals */
+miScreenInit(
+ ScreenPtr pScreen,
+ pointer pbits, /* pointer to screen bits */
+ int xsize, int ysize, /* in pixels */
+ int dpix, int dpiy, /* dots per inch */
+ int width, /* pixel width of frame buffer */
+ int rootDepth, /* depth of root window */
+ int numDepths, /* number of depths supported */
+ DepthRec *depths, /* supported depths */
+ VisualID rootVisual, /* root visual */
+ int numVisuals, /* number of visuals supported */
+ VisualRec *visuals /* supported visuals */
+ )
{
pScreen->width = xsize;
pScreen->height = ysize;
@@ -268,17 +270,15 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
pScreen->wakeupData = (pointer)0;
pScreen->MarkWindow = miMarkWindow;
pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
- pScreen->ChangeSaveUnder = miChangeSaveUnder;
- pScreen->PostChangeSaveUnder = miPostChangeSaveUnder;
+ pScreen->ChangeSaveUnder = NULL;
+ pScreen->PostChangeSaveUnder = NULL;
pScreen->MoveWindow = miMoveWindow;
pScreen->ResizeWindow = miSlideAndSizeWindow;
pScreen->GetLayerWindow = miGetLayerWindow;
pScreen->HandleExposures = miHandleValidateExposures;
pScreen->ReparentWindow = (ReparentWindowProcPtr) 0;
pScreen->ChangeBorderWidth = miChangeBorderWidth;
-#ifdef SHAPE
pScreen->SetShape = miSetShape;
-#endif
pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow;
pScreen->SaveDoomedAreas = 0;
@@ -293,35 +293,20 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
return miScreenDevPrivateInit(pScreen, width, pbits);
}
-static DevPrivateKey privateKey = &privateKey;
+static int privateKeyIndex;
+static DevPrivateKey privateKey = &privateKeyIndex;
-_X_EXPORT DevPrivateKey
+DevPrivateKey
miAllocateGCPrivateIndex()
{
return privateKey;
}
-_X_EXPORT DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKey;
+static int miZeroLineScreenKeyIndex;
+_X_EXPORT DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKeyIndex;
_X_EXPORT void
-miSetZeroLineBias(pScreen, bias)
- ScreenPtr pScreen;
- unsigned int bias;
+miSetZeroLineBias(ScreenPtr pScreen, unsigned int bias)
{
dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (pointer)bias);
}
-
-_X_EXPORT PixmapPtr
-miGetScreenPixmap(pScreen)
- ScreenPtr pScreen;
-{
- return (PixmapPtr)(pScreen->devPrivate);
-}
-
-_X_EXPORT void
-miSetScreenPixmap(pPix)
- PixmapPtr pPix;
-{
- if (pPix)
- pPix->drawable.pScreen->devPrivate = (pointer)pPix;
-}