RandR: New data structure, old API. At least it compiles now
This commit is contained in:
parent
d95c758630
commit
cab3a0145f
|
@ -65,11 +65,11 @@ miRRGetInfo (ScreenPtr pScreen, Rotation *rotations)
|
||||||
rrMode.height = pScreen->height;
|
rrMode.height = pScreen->height;
|
||||||
rrMode.widthInMillimeters = pScreen->mmWidth;
|
rrMode.widthInMillimeters = pScreen->mmWidth;
|
||||||
rrMode.heightInMillimeters = pScreen->mmHeight;
|
rrMode.heightInMillimeters = pScreen->mmHeight;
|
||||||
pMonitor = RRRegisterMonitor (pScreen, RR_Rotate_0);
|
rrMode.nameLength = strlen (name);
|
||||||
|
pMonitor = RRRegisterMonitor (pScreen, NULL, RR_Rotate_0);
|
||||||
pMode = RRRegisterMode (pMonitor,
|
pMode = RRRegisterMode (pMonitor,
|
||||||
&rrMode,
|
&rrMode,
|
||||||
name,
|
name);
|
||||||
strlen (name));
|
|
||||||
if (!pMode)
|
if (!pMode)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!setConfig)
|
if (!setConfig)
|
||||||
|
@ -90,6 +90,8 @@ Bool
|
||||||
miRRSetMode (ScreenPtr pScreen,
|
miRRSetMode (ScreenPtr pScreen,
|
||||||
int monitor,
|
int monitor,
|
||||||
RRModePtr pMode,
|
RRModePtr pMode,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
Rotation rotation)
|
Rotation rotation)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
699
randr/randr.c
699
randr/randr.c
File diff suppressed because it is too large
Load Diff
|
@ -34,11 +34,19 @@
|
||||||
|
|
||||||
#include <X11/extensions/randrproto.h>
|
#include <X11/extensions/randrproto.h>
|
||||||
|
|
||||||
|
#define RANDR_SCREEN_INTERFACE 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Modeline for a monitor. Name follows directly after this struct
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define RRModeName(pMode) ((char *) (pMode + 1))
|
||||||
|
|
||||||
typedef struct _rrMode {
|
typedef struct _rrMode {
|
||||||
struct _rrMode *next;
|
struct _rrMode *next;
|
||||||
int id;
|
|
||||||
Bool referenced;
|
Bool referenced;
|
||||||
Bool oldReferenced;
|
Bool oldReferenced;
|
||||||
|
int id;
|
||||||
xRRMonitorMode mode;
|
xRRMonitorMode mode;
|
||||||
} RRMode, *RRModePtr;
|
} RRMode, *RRModePtr;
|
||||||
|
|
||||||
|
@ -47,12 +55,15 @@ typedef struct _rrMonitor {
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
RRModePtr pModes;
|
RRModePtr pModes;
|
||||||
void *identifier; /* made unique by DDX */
|
void *identifier; /* made unique by DDX */
|
||||||
|
int id; /* index in list of monitors */
|
||||||
Bool referenced;
|
Bool referenced;
|
||||||
|
Bool oldReferenced;
|
||||||
|
Rotation rotations;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Current state
|
* Current state
|
||||||
*/
|
*/
|
||||||
int mode;
|
RRModePtr pMode;
|
||||||
int x, y;
|
int x, y;
|
||||||
Rotation rotation;
|
Rotation rotation;
|
||||||
} RRMonitor, *RRMonitorPtr;
|
} RRMonitor, *RRMonitorPtr;
|
||||||
|
@ -76,7 +87,18 @@ typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
|
||||||
|
|
||||||
#ifdef RANDR_SCREEN_INTERFACE
|
#ifdef RANDR_SCREEN_INTERFACE
|
||||||
|
|
||||||
typedef void *RRScreenSizePtr;
|
typedef struct _rrRefresh {
|
||||||
|
CARD16 refresh;
|
||||||
|
RRModePtr pMode;
|
||||||
|
} RRRefreshRec, *RRRefreshPtr;
|
||||||
|
|
||||||
|
typedef struct _rrScreenSize {
|
||||||
|
int id;
|
||||||
|
short width, height;
|
||||||
|
short mmWidth, mmHeight;
|
||||||
|
int nrefresh;
|
||||||
|
RRRefreshPtr refresh;
|
||||||
|
} RRScreenSizeRec, *RRScreenSizePtr;
|
||||||
|
|
||||||
typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
|
typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
|
||||||
Rotation rotation,
|
Rotation rotation,
|
||||||
|
@ -87,12 +109,23 @@ typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
|
||||||
|
|
||||||
|
|
||||||
typedef struct _rrScrPriv {
|
typedef struct _rrScrPriv {
|
||||||
RRSetModeProcPtr rrSetMode;
|
/*
|
||||||
|
* 'public' part of the structure; DDXen fill this in
|
||||||
|
* as they initialize
|
||||||
|
*/
|
||||||
|
#ifdef RANDR_SCREEN_INTERFACE
|
||||||
|
RRSetConfigProcPtr rrSetConfig;
|
||||||
|
#endif
|
||||||
RRGetInfoProcPtr rrGetInfo;
|
RRGetInfoProcPtr rrGetInfo;
|
||||||
RRCloseScreenProcPtr CloseScreen;
|
RRSetScreenSizeProcPtr rrSetScreenSize;
|
||||||
|
RRSetModeProcPtr rrSetMode;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Private part of the structure; not considered part of the ABI
|
||||||
|
*/
|
||||||
TimeStamp lastSetTime; /* last changed by client */
|
TimeStamp lastSetTime; /* last changed by client */
|
||||||
TimeStamp lastConfigTime; /* possible configs changed */
|
TimeStamp lastConfigTime; /* possible configs changed */
|
||||||
|
RRCloseScreenProcPtr CloseScreen;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* monitor data
|
* monitor data
|
||||||
|
@ -105,7 +138,6 @@ typedef struct _rrScrPriv {
|
||||||
*/
|
*/
|
||||||
Rotation rotations;
|
Rotation rotations;
|
||||||
|
|
||||||
RRSetConfigProcPtr rrSetConfig;
|
|
||||||
|
|
||||||
Rotation rotation;
|
Rotation rotation;
|
||||||
#endif
|
#endif
|
||||||
|
@ -137,8 +169,7 @@ RRRegisterMonitor (ScreenPtr pScreen,
|
||||||
RRModePtr
|
RRModePtr
|
||||||
RRRegisterMode (RRMonitorPtr pMonitor,
|
RRRegisterMode (RRMonitorPtr pMonitor,
|
||||||
xRRMonitorMode *pMode,
|
xRRMonitorMode *pMode,
|
||||||
char *name,
|
char *name);
|
||||||
int nameLength);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finally, set the current configuration of each monitor
|
* Finally, set the current configuration of each monitor
|
||||||
|
@ -147,6 +178,8 @@ RRRegisterMode (RRMonitorPtr pMonitor,
|
||||||
void
|
void
|
||||||
RRSetCurrentMode (RRMonitorPtr pMonitor,
|
RRSetCurrentMode (RRMonitorPtr pMonitor,
|
||||||
RRModePtr pMode,
|
RRModePtr pMode,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
Rotation rotation);
|
Rotation rotation);
|
||||||
|
|
||||||
Bool RRScreenInit(ScreenPtr pScreen);
|
Bool RRScreenInit(ScreenPtr pScreen);
|
||||||
|
@ -167,6 +200,8 @@ Bool
|
||||||
miRRSetMode (ScreenPtr pScreen,
|
miRRSetMode (ScreenPtr pScreen,
|
||||||
int monitor,
|
int monitor,
|
||||||
RRModePtr pMode,
|
RRModePtr pMode,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
Rotation rotation);
|
Rotation rotation);
|
||||||
|
|
||||||
#ifdef RANDR_SCREEN_INTERFACE
|
#ifdef RANDR_SCREEN_INTERFACE
|
||||||
|
|
Loading…
Reference in New Issue