programs/Xserver/hw/xfree86/common/xf86RandR.c

programs/Xserver/hw/xfree86/loader/xf86sym.c Add a new function
    xf86GetRotation to allow third party modules to obtain the current
    rotation.
This commit is contained in:
Alan Hourihane 2005-10-11 14:45:01 +00:00
parent cad18ec979
commit 2828d92c6c
2 changed files with 13 additions and 1 deletions

View File

@ -47,7 +47,7 @@ typedef struct _xf86RandRInfo {
Rotation rotation;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
static int xf86RandRIndex;
static int xf86RandRIndex = -1;
static int xf86RandRGeneration;
#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[xf86RandRIndex].ptr)
@ -317,6 +317,17 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen)
return (*pScreen->CloseScreen) (index, pScreen);
}
Rotation
xf86GetRotation(ScreenPtr pScreen)
{
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
if (xf86RandRIndex == -1)
return RR_Rotate_0;
return randrp->rotation;
}
Bool
xf86RandRInit (ScreenPtr pScreen)
{

View File

@ -474,6 +474,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86CommonSpecialKey)
SYMFUNC(xf86IsPc98)
SYMFUNC(xf86DisableRandR)
SYMFUNC(xf86GetRotation)
SYMFUNC(xf86GetVersion)
SYMFUNC(xf86GetModuleVersion)
SYMFUNC(xf86GetClocks)