aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86VidMode.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/xfree86/common/xf86VidMode.c
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86VidMode.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86VidMode.c76
1 files changed, 35 insertions, 41 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86VidMode.c b/xorg-server/hw/xfree86/common/xf86VidMode.c
index 24fccd31b..49b86e73a 100644
--- a/xorg-server/hw/xfree86/common/xf86VidMode.c
+++ b/xorg-server/hw/xfree86/common/xf86VidMode.c
@@ -56,20 +56,14 @@ static Bool VidModeClose(int i, ScreenPtr pScreen);
#endif
-#ifdef DEBUG
-# define DEBUG_P(x) ErrorF(x"\n");
-#else
-# define DEBUG_P(x) /**/
-#endif
-
-_X_EXPORT Bool
+Bool
VidModeExtensionInit(ScreenPtr pScreen)
{
#ifdef XF86VIDMODE
VidModePtr pVidMode;
if (!xf86GetVidModeEnabled()) {
- DEBUG_P("!xf86GetVidModeEnabled()");
+ DebugF("!xf86GetVidModeEnabled()\n");
return FALSE;
}
@@ -77,7 +71,7 @@ VidModeExtensionInit(ScreenPtr pScreen)
if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey,
xcalloc(sizeof(VidModeRec), 1))) {
- DEBUG_P("xcalloc failed");
+ DebugF("xcalloc failed\n");
return FALSE;
}
@@ -89,7 +83,7 @@ VidModeExtensionInit(ScreenPtr pScreen)
VidModeCount++;
return TRUE;
#else
- DEBUG_P("no vidmode extension");
+ DebugF("no vidmode extension\n");
return FALSE;
#endif
}
@@ -123,13 +117,13 @@ VidModeAvailable(int scrnIndex)
VidModePtr pVidMode;
if (VidModeKey == NULL) {
- DEBUG_P("VidModeKey == NULL");
+ DebugF("VidModeKey == NULL\n");
return FALSE;
}
pScrn = xf86Screens[scrnIndex];
if (pScrn == NULL) {
- DEBUG_P("pScrn == NULL");
+ DebugF("pScrn == NULL\n");
return FALSE;
}
@@ -137,12 +131,12 @@ VidModeAvailable(int scrnIndex)
if (pVidMode)
return TRUE;
else {
- DEBUG_P("pVidMode == NULL");
+ DebugF("pVidMode == NULL\n");
return FALSE;
}
}
-_X_EXPORT Bool
+Bool
VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock)
{
ScrnInfoPtr pScrn;
@@ -161,7 +155,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock)
return FALSE;
}
-_X_EXPORT int
+int
VidModeGetDotClock(int scrnIndex, int Clock)
{
ScrnInfoPtr pScrn;
@@ -176,7 +170,7 @@ VidModeGetDotClock(int scrnIndex, int Clock)
return pScrn->clock[Clock];
}
-_X_EXPORT int
+int
VidModeGetNumOfClocks(int scrnIndex, Bool *progClock)
{
ScrnInfoPtr pScrn;
@@ -194,7 +188,7 @@ VidModeGetNumOfClocks(int scrnIndex, Bool *progClock)
}
}
-_X_EXPORT Bool
+Bool
VidModeGetClocks(int scrnIndex, int *Clocks)
{
ScrnInfoPtr pScrn;
@@ -215,7 +209,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks)
}
-_X_EXPORT Bool
+Bool
VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
{
ScrnInfoPtr pScrn;
@@ -238,7 +232,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
return VidModeGetNextModeline(scrnIndex, mode, dotClock);
}
-_X_EXPORT Bool
+Bool
VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock)
{
ScrnInfoPtr pScrn;
@@ -263,7 +257,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock)
return FALSE;
}
-_X_EXPORT Bool
+Bool
VidModeDeleteModeline(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
@@ -276,7 +270,7 @@ VidModeDeleteModeline(int scrnIndex, pointer mode)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeZoomViewport(int scrnIndex, int zoom)
{
ScrnInfoPtr pScrn;
@@ -289,7 +283,7 @@ VidModeZoomViewport(int scrnIndex, int zoom)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeSetViewPort(int scrnIndex, int x, int y)
{
ScrnInfoPtr pScrn;
@@ -310,7 +304,7 @@ VidModeSetViewPort(int scrnIndex, int x, int y)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeGetViewPort(int scrnIndex, int *x, int *y)
{
ScrnInfoPtr pScrn;
@@ -324,7 +318,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeSwitchMode(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
@@ -346,7 +340,7 @@ VidModeSwitchMode(int scrnIndex, pointer mode)
return retval;
}
-_X_EXPORT Bool
+Bool
VidModeLockZoom(int scrnIndex, Bool lock)
{
ScrnInfoPtr pScrn;
@@ -363,7 +357,7 @@ VidModeLockZoom(int scrnIndex, Bool lock)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeGetMonitor(int scrnIndex, pointer *monitor)
{
ScrnInfoPtr pScrn;
@@ -377,7 +371,7 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor)
return TRUE;
}
-_X_EXPORT ModeStatus
+ModeStatus
VidModeCheckModeForMonitor(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
@@ -390,7 +384,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode)
return xf86CheckModeForMonitor((DisplayModePtr)mode, pScrn->monitor);
}
-_X_EXPORT ModeStatus
+ModeStatus
VidModeCheckModeForDriver(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
@@ -403,7 +397,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode)
return xf86CheckModeForDriver(pScrn, (DisplayModePtr)mode, 0);
}
-_X_EXPORT void
+void
VidModeSetCrtcForMode(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
@@ -422,7 +416,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode)
return;
}
-_X_EXPORT Bool
+Bool
VidModeAddModeline(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
@@ -443,7 +437,7 @@ VidModeAddModeline(int scrnIndex, pointer mode)
return TRUE;
}
-_X_EXPORT int
+int
VidModeGetNumOfModes(int scrnIndex)
{
pointer mode = NULL;
@@ -459,7 +453,7 @@ VidModeGetNumOfModes(int scrnIndex)
} while (TRUE);
}
-_X_EXPORT Bool
+Bool
VidModeSetGamma(int scrnIndex, float red, float green, float blue)
{
ScrnInfoPtr pScrn;
@@ -478,7 +472,7 @@ VidModeSetGamma(int scrnIndex, float red, float green, float blue)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue)
{
ScrnInfoPtr pScrn;
@@ -493,7 +487,7 @@ VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b)
{
ScrnInfoPtr pScrn;
@@ -506,7 +500,7 @@ VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b)
return TRUE;
}
-_X_EXPORT Bool
+Bool
VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b)
{
ScrnInfoPtr pScrn;
@@ -519,7 +513,7 @@ VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b)
return TRUE;
}
-_X_EXPORT int
+int
VidModeGetGammaRampSize(int scrnIndex)
{
if (!VidModeAvailable(scrnIndex))
@@ -528,7 +522,7 @@ VidModeGetGammaRampSize(int scrnIndex)
return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen);
}
-_X_EXPORT pointer
+pointer
VidModeCreateMode(void)
{
DisplayModePtr mode;
@@ -544,14 +538,14 @@ VidModeCreateMode(void)
return mode;
}
-_X_EXPORT void
+void
VidModeCopyMode(pointer modefrom, pointer modeto)
{
memcpy(modeto, modefrom, sizeof(DisplayModeRec));
}
-_X_EXPORT int
+int
VidModeGetModeValue(pointer mode, int valtyp)
{
int ret = 0;
@@ -594,7 +588,7 @@ VidModeGetModeValue(pointer mode, int valtyp)
return ret;
}
-_X_EXPORT void
+void
VidModeSetModeValue(pointer mode, int valtyp, int val)
{
switch (valtyp) {
@@ -635,7 +629,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val)
return;
}
-_X_EXPORT vidMonitorValue
+vidMonitorValue
VidModeGetMonitorValue(pointer monitor, int valtyp, int indx)
{
vidMonitorValue ret;