2003-11-14 16:54:54 +01:00
|
|
|
/*
|
|
|
|
|
|
|
|
Copyright 1990, 1998 The Open Group
|
|
|
|
|
|
|
|
Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
the above copyright notice appear in all copies and that both that
|
|
|
|
copyright notice and this permission notice appear in supporting
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included
|
|
|
|
in all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
|
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
|
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
Except as contained in this notice, the name of The Open Group shall
|
|
|
|
not be used in advertising or otherwise to promote the sale, use or
|
|
|
|
other dealings in this Software without prior written authorization
|
|
|
|
from The Open Group.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2005-07-03 09:02:09 +02:00
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
2005-04-20 14:25:48 +02:00
|
|
|
#include <X11/X.h>
|
2003-11-14 16:54:54 +01:00
|
|
|
#include "servermd.h"
|
2005-07-03 10:53:54 +02:00
|
|
|
#include "misc.h"
|
2003-11-14 16:54:54 +01:00
|
|
|
#include "mi.h"
|
|
|
|
#include "scrnintstr.h"
|
|
|
|
#include "pixmapstr.h"
|
|
|
|
#include "dix.h"
|
|
|
|
#include "miline.h"
|
2003-11-14 17:49:22 +01:00
|
|
|
#ifdef MITSHM
|
|
|
|
#define _XSHM_SERVER_
|
2005-04-20 14:25:48 +02:00
|
|
|
#include <X11/extensions/XShm.h>
|
2003-11-14 17:49:22 +01:00
|
|
|
#endif
|
2003-11-14 16:54:54 +01:00
|
|
|
|
|
|
|
/* We use this structure to propogate some information from miScreenInit to
|
|
|
|
* miCreateScreenResources. miScreenInit allocates the structure, fills it
|
|
|
|
* in, and puts it into pScreen->devPrivate. miCreateScreenResources
|
|
|
|
* extracts the info and frees the structure. We could've accomplished the
|
|
|
|
* same thing by adding fields to the screen structure, but they would have
|
|
|
|
* ended up being redundant, and would have exposed this mi implementation
|
|
|
|
* detail to the whole server.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
pointer pbits; /* pointer to framebuffer */
|
|
|
|
int width; /* delta to add to a framebuffer addr to move one row down */
|
|
|
|
} miScreenInitParmsRec, *miScreenInitParmsPtr;
|
|
|
|
|
|
|
|
|
|
|
|
/* this plugs into pScreen->ModifyPixmapHeader */
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
|
|
|
|
int bitsPerPixel, int devKind, pointer pPixData)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
if (!pPixmap)
|
|
|
|
return FALSE;
|
2003-11-14 17:49:22 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If all arguments are specified, reinitialize everything (including
|
|
|
|
* validated state).
|
|
|
|
*/
|
|
|
|
if ((width > 0) && (height > 0) && (depth > 0) && (bitsPerPixel > 0) &&
|
|
|
|
(devKind > 0) && pPixData) {
|
|
|
|
pPixmap->drawable.depth = depth;
|
|
|
|
pPixmap->drawable.bitsPerPixel = bitsPerPixel;
|
|
|
|
pPixmap->drawable.id = 0;
|
|
|
|
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
|
|
|
pPixmap->drawable.x = 0;
|
|
|
|
pPixmap->drawable.y = 0;
|
|
|
|
pPixmap->drawable.width = width;
|
|
|
|
pPixmap->drawable.height = height;
|
|
|
|
pPixmap->devKind = devKind;
|
|
|
|
pPixmap->refcnt = 1;
|
|
|
|
pPixmap->devPrivate.ptr = pPixData;
|
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* Only modify specified fields, keeping all others intact.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (width > 0)
|
|
|
|
pPixmap->drawable.width = width;
|
|
|
|
|
|
|
|
if (height > 0)
|
|
|
|
pPixmap->drawable.height = height;
|
|
|
|
|
|
|
|
if (depth > 0)
|
|
|
|
pPixmap->drawable.depth = depth;
|
|
|
|
|
|
|
|
if (bitsPerPixel > 0)
|
|
|
|
pPixmap->drawable.bitsPerPixel = bitsPerPixel;
|
|
|
|
else if ((bitsPerPixel < 0) && (depth > 0))
|
|
|
|
pPixmap->drawable.bitsPerPixel = BitsPerPixel(depth);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* CAVEAT: Non-SI DDXen may use devKind and devPrivate fields for
|
|
|
|
* other purposes.
|
|
|
|
*/
|
|
|
|
if (devKind > 0)
|
|
|
|
pPixmap->devKind = devKind;
|
|
|
|
else if ((devKind < 0) && ((width > 0) || (depth > 0)))
|
|
|
|
pPixmap->devKind = PixmapBytePad(pPixmap->drawable.width,
|
|
|
|
pPixmap->drawable.depth);
|
|
|
|
|
|
|
|
if (pPixData)
|
|
|
|
pPixmap->devPrivate.ptr = pPixData;
|
|
|
|
}
|
2003-11-14 16:54:54 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2007-03-25 23:56:32 +02:00
|
|
|
static Bool
|
|
|
|
miCloseScreen (int iScreen, ScreenPtr pScreen)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
return ((*pScreen->DestroyPixmap)((PixmapPtr)pScreen->devPrivate));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* With the introduction of pixmap privates, the "screen pixmap" can no
|
|
|
|
* longer be created in miScreenInit, since all the modules that could
|
|
|
|
* possibly ask for pixmap private space have not been initialized at
|
|
|
|
* that time. pScreen->CreateScreenResources is called after all
|
|
|
|
* possible private-requesting modules have been inited; we create the
|
|
|
|
* screen pixmap here.
|
|
|
|
*/
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miCreateScreenResources(ScreenPtr pScreen)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
miScreenInitParmsPtr pScrInitParms;
|
|
|
|
pointer value;
|
|
|
|
|
|
|
|
pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate;
|
|
|
|
|
|
|
|
/* if width is non-zero, pScreen->devPrivate will be a pixmap
|
|
|
|
* else it will just take the value pbits
|
|
|
|
*/
|
|
|
|
if (pScrInitParms->width)
|
|
|
|
{
|
|
|
|
PixmapPtr pPixmap;
|
|
|
|
|
|
|
|
/* create a pixmap with no data, then redirect it to point to
|
|
|
|
* the screen
|
|
|
|
*/
|
2007-10-31 22:15:35 +01:00
|
|
|
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0);
|
2003-11-14 16:54:54 +01:00
|
|
|
if (!pPixmap)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width,
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->height, pScreen->rootDepth,
|
|
|
|
BitsPerPixel(pScreen->rootDepth),
|
2003-11-14 16:54:54 +01:00
|
|
|
PixmapBytePad(pScrInitParms->width, pScreen->rootDepth),
|
|
|
|
pScrInitParms->pbits))
|
|
|
|
return FALSE;
|
|
|
|
value = (pointer)pPixmap;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
value = pScrInitParms->pbits;
|
|
|
|
}
|
|
|
|
xfree(pScreen->devPrivate); /* freeing miScreenInitParmsRec */
|
|
|
|
pScreen->devPrivate = value; /* pPixmap or pbits */
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
miScreenDevPrivateInit(ScreenPtr pScreen, int width, pointer pbits)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
miScreenInitParmsPtr pScrInitParms;
|
|
|
|
|
|
|
|
/* Stash pbits and width in a short-lived miScreenInitParmsRec attached
|
|
|
|
* to the screen, until CreateScreenResources can put them in the
|
|
|
|
* screen pixmap.
|
|
|
|
*/
|
2009-01-22 08:11:16 +01:00
|
|
|
pScrInitParms = xalloc(sizeof(miScreenInitParmsRec));
|
2003-11-14 16:54:54 +01:00
|
|
|
if (!pScrInitParms)
|
|
|
|
return FALSE;
|
|
|
|
pScrInitParms->pbits = pbits;
|
|
|
|
pScrInitParms->width = width;
|
|
|
|
pScreen->devPrivate = (pointer)pScrInitParms;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-10-03 23:23:58 +02:00
|
|
|
static PixmapPtr
|
|
|
|
miGetScreenPixmap(ScreenPtr pScreen)
|
|
|
|
{
|
|
|
|
return (PixmapPtr)(pScreen->devPrivate);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
miSetScreenPixmap(PixmapPtr pPix)
|
|
|
|
{
|
|
|
|
if (pPix)
|
|
|
|
pPix->drawable.pScreen->devPrivate = (pointer)pPix;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
Bool
|
2008-05-28 04:57:07 +02:00
|
|
|
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 */
|
|
|
|
)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
|
|
|
pScreen->width = xsize;
|
|
|
|
pScreen->height = ysize;
|
|
|
|
pScreen->mmWidth = (xsize * 254 + dpix * 5) / (dpix * 10);
|
|
|
|
pScreen->mmHeight = (ysize * 254 + dpiy * 5) / (dpiy * 10);
|
|
|
|
pScreen->numDepths = numDepths;
|
|
|
|
pScreen->rootDepth = rootDepth;
|
|
|
|
pScreen->allowedDepths = depths;
|
|
|
|
pScreen->rootVisual = rootVisual;
|
|
|
|
/* defColormap */
|
|
|
|
pScreen->minInstalledCmaps = 1;
|
|
|
|
pScreen->maxInstalledCmaps = 1;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->backingStoreSupport = NotUseful;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->saveUnderSupport = NotUseful;
|
|
|
|
/* whitePixel, blackPixel */
|
|
|
|
pScreen->ModifyPixmapHeader = miModifyPixmapHeader;
|
|
|
|
pScreen->CreateScreenResources = miCreateScreenResources;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->GetScreenPixmap = miGetScreenPixmap;
|
|
|
|
pScreen->SetScreenPixmap = miSetScreenPixmap;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->numVisuals = numVisuals;
|
|
|
|
pScreen->visuals = visuals;
|
|
|
|
if (width)
|
|
|
|
{
|
|
|
|
#ifdef MITSHM
|
|
|
|
ShmRegisterFbFuncs(pScreen);
|
|
|
|
#endif
|
|
|
|
pScreen->CloseScreen = miCloseScreen;
|
|
|
|
}
|
|
|
|
/* else CloseScreen */
|
|
|
|
/* QueryBestSize, SaveScreen, GetImage, GetSpans */
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->PointerNonInterestBox = (PointerNonInterestBoxProcPtr) 0;
|
|
|
|
pScreen->SourceValidate = (SourceValidateProcPtr) 0;
|
2003-11-14 16:54:54 +01:00
|
|
|
/* CreateWindow, DestroyWindow, PositionWindow, ChangeWindowAttributes */
|
|
|
|
/* RealizeWindow, UnrealizeWindow */
|
|
|
|
pScreen->ValidateTree = miValidateTree;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->PostValidateTree = (PostValidateTreeProcPtr) 0;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->WindowExposures = miWindowExposures;
|
2007-09-12 15:58:46 +02:00
|
|
|
/* CopyWindow */
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->ClearToBackground = miClearToBackground;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->ClipNotify = (ClipNotifyProcPtr) 0;
|
|
|
|
pScreen->RestackWindow = (RestackWindowProcPtr) 0;
|
2003-11-14 16:54:54 +01:00
|
|
|
/* CreatePixmap, DestroyPixmap */
|
|
|
|
/* RealizeFont, UnrealizeFont */
|
|
|
|
/* CreateGC */
|
|
|
|
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
|
|
|
|
/* ListInstalledColormaps, StoreColors, ResolveColor */
|
|
|
|
/* BitmapToRegion */
|
|
|
|
pScreen->SendGraphicsExpose = miSendGraphicsExpose;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr)NoopDDA;
|
|
|
|
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->blockData = (pointer)0;
|
|
|
|
pScreen->wakeupData = (pointer)0;
|
|
|
|
pScreen->MarkWindow = miMarkWindow;
|
|
|
|
pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
|
2008-08-13 23:28:08 +02:00
|
|
|
pScreen->ChangeSaveUnder = NULL;
|
|
|
|
pScreen->PostChangeSaveUnder = NULL;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->MoveWindow = miMoveWindow;
|
|
|
|
pScreen->ResizeWindow = miSlideAndSizeWindow;
|
|
|
|
pScreen->GetLayerWindow = miGetLayerWindow;
|
|
|
|
pScreen->HandleExposures = miHandleValidateExposures;
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->ReparentWindow = (ReparentWindowProcPtr) 0;
|
2003-11-14 16:54:54 +01:00
|
|
|
pScreen->ChangeBorderWidth = miChangeBorderWidth;
|
|
|
|
pScreen->SetShape = miSetShape;
|
|
|
|
pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow;
|
|
|
|
|
2003-11-14 17:49:22 +01:00
|
|
|
pScreen->SaveDoomedAreas = 0;
|
|
|
|
pScreen->RestoreAreas = 0;
|
|
|
|
pScreen->ExposeCopy = 0;
|
|
|
|
pScreen->TranslateBackingStore = 0;
|
|
|
|
pScreen->ClearBackingStore = 0;
|
|
|
|
pScreen->DrawGuarantee = 0;
|
|
|
|
|
2003-11-14 16:54:54 +01:00
|
|
|
miSetZeroLineBias(pScreen, DEFAULTZEROLINEBIAS);
|
|
|
|
|
|
|
|
return miScreenDevPrivateInit(pScreen, width, pbits);
|
|
|
|
}
|
|
|
|
|
2008-08-29 00:05:40 +02:00
|
|
|
static int privateKeyIndex;
|
|
|
|
static DevPrivateKey privateKey = &privateKeyIndex;
|
2007-08-28 15:28:25 +02:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
DevPrivateKey
|
2009-01-11 08:42:28 +01:00
|
|
|
miAllocateGCPrivateIndex(void)
|
2003-11-14 17:49:22 +01:00
|
|
|
{
|
2007-08-28 15:28:25 +02:00
|
|
|
return privateKey;
|
2003-11-14 17:49:22 +01:00
|
|
|
}
|
|
|
|
|
2008-08-29 00:05:40 +02:00
|
|
|
static int miZeroLineScreenKeyIndex;
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKeyIndex;
|
2003-11-14 16:54:54 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2008-05-28 04:57:07 +02:00
|
|
|
miSetZeroLineBias(ScreenPtr pScreen, unsigned int bias)
|
2003-11-14 16:54:54 +01:00
|
|
|
{
|
2009-02-07 20:47:54 +01:00
|
|
|
dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey,
|
|
|
|
(unsigned long *)(unsigned long)bias);
|
2003-11-14 16:54:54 +01:00
|
|
|
}
|