#ifndef _XF86VIDMODE_H_
#define _XF86VIDMODE_H_
#include <X11/Xfuncproto.h>
#include <X11/Xmd.h>
#define X_XF86VidModeQueryVersion 0
#define X_XF86VidModeGetModeLine 1
#define X_XF86VidModeModModeLine 2
#define X_XF86VidModeSwitchMode 3
#define X_XF86VidModeGetMonitor 4
#define X_XF86VidModeLockModeSwitch 5
#define X_XF86VidModeGetAllModeLines 6
#define X_XF86VidModeAddModeLine 7
#define X_XF86VidModeDeleteModeLine 8
#define X_XF86VidModeValidateModeLine 9
#define X_XF86VidModeSwitchToMode 10
#define X_XF86VidModeGetViewPort 11
#define X_XF86VidModeSetViewPort 12
#define X_XF86VidModeGetDotClocks 13
#define X_XF86VidModeSetClientVersion 14
#define X_XF86VidModeSetGamma 15
#define X_XF86VidModeGetGamma 16
#define X_XF86VidModeGetGammaRamp 17
#define X_XF86VidModeSetGammaRamp 18
#define X_XF86VidModeGetGammaRampSize 19
#define X_XF86VidModeGetPermissions 20
#define CLKFLAG_PROGRAMABLE 1
#ifdef XF86VIDMODE_EVENTS
#define XF86VidModeNotify 0
#define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
#define XF86VidModeNotifyMask 0x00000001
#define XF86VidModeNonEvent 0
#define XF86VidModeModeChange 1
#else
#define XF86VidModeNumberEvents 0
#endif
#define XF86VidModeBadClock 0
#define XF86VidModeBadHTimings 1
#define XF86VidModeBadVTimings 2
#define XF86VidModeModeUnsuitable 3
#define XF86VidModeExtensionDisabled 4
#define XF86VidModeClientNotLocal 5
#define XF86VidModeZoomLocked 6
#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
#define XF86VM_READ_PERMISSION 1
#define XF86VM_WRITE_PERMISSION 2
#ifndef _XF86VIDMODE_SERVER_
typedef struct {
unsigned short hdisplay;
unsigned short hsyncstart;
unsigned short hsyncend;
unsigned short htotal;
unsigned short hskew;
unsigned short vdisplay;
unsigned short vsyncstart;
unsigned short vsyncend;
unsigned short vtotal;
unsigned int flags;
int privsize;
#if defined(__cplusplus) || defined(c_plusplus)
INT32 *c_private;
#else
INT32 *private;
#endif
} XF86VidModeModeLine;
typedef struct {
unsigned int dotclock;
unsigned short hdisplay;
unsigned short hsyncstart;
unsigned short hsyncend;
unsigned short htotal;
unsigned short hskew;
unsigned short vdisplay;
unsigned short vsyncstart;
unsigned short vsyncend;
unsigned short vtotal;
unsigned int flags;
int privsize;
#if defined(__cplusplus) || defined(c_plusplus)
INT32 *c_private;
#else
INT32 *private;
#endif
} XF86VidModeModeInfo;
typedef struct {
float hi;
float lo;
} XF86VidModeSyncRange;
typedef struct {
char* vendor;
char* model;
float EMPTY;
unsigned char nhsync;
XF86VidModeSyncRange* hsync;
unsigned char nvsync;
XF86VidModeSyncRange* vsync;
} XF86VidModeMonitor;
typedef struct {
int type;
unsigned long serial;
Bool send_event;
Display *display;
Window root;
int state;
int kind;
Bool forced;
Time time;
} XF86VidModeNotifyEvent;
typedef struct {
float red;
float green;
float blue;
} XF86VidModeGamma;
#define XF86VidModeSelectNextMode(disp, scr) \
XF86VidModeSwitchMode(disp, scr, 1)
#define XF86VidModeSelectPrevMode(disp, scr) \
XF86VidModeSwitchMode(disp, scr, -1)
_XFUNCPROTOBEGIN
Bool XF86VidModeQueryVersion(
Display* ,
int* ,
int*
);
Bool XF86VidModeQueryExtension(
Display* ,
int* ,
int*
);
Bool XF86VidModeSetClientVersion(
Display*
);
Bool XF86VidModeGetModeLine(
Display* ,
int ,
int* ,
XF86VidModeModeLine*
);
Bool XF86VidModeGetAllModeLines(
Display* ,
int ,
int* ,
XF86VidModeModeInfo***
);
Bool XF86VidModeAddModeLine(
Display* ,
int ,
XF86VidModeModeInfo* ,
XF86VidModeModeInfo*
);
Bool XF86VidModeDeleteModeLine(
Display* ,
int ,
XF86VidModeModeInfo*
);
Bool XF86VidModeModModeLine(
Display* ,
int ,
XF86VidModeModeLine*
);
Status XF86VidModeValidateModeLine(
Display* ,
int ,
XF86VidModeModeInfo*
);
Bool XF86VidModeSwitchMode(
Display* ,
int ,
int
);
Bool XF86VidModeSwitchToMode(
Display* ,
int ,
XF86VidModeModeInfo*
);
Bool XF86VidModeLockModeSwitch(
Display* ,
int ,
int
);
Bool XF86VidModeGetMonitor(
Display* ,
int ,
XF86VidModeMonitor*
);
Bool XF86VidModeGetViewPort(
Display* ,
int ,
int* ,
int*
);
Bool XF86VidModeSetViewPort(
Display* ,
int ,
int ,
int
);
Bool XF86VidModeGetDotClocks(
Display* ,
int ,
int* ,
int* ,
int* ,
int**
);
Bool XF86VidModeGetGamma(
Display* ,
int ,
XF86VidModeGamma*
);
Bool XF86VidModeSetGamma(
Display* ,
int ,
XF86VidModeGamma*
);
Bool XF86VidModeSetGammaRamp(
Display* ,
int ,
int ,
unsigned short* ,
unsigned short* ,
unsigned short*
);
Bool XF86VidModeGetGammaRamp(
Display* ,
int ,
int ,
unsigned short* ,
unsigned short* ,
unsigned short*
);
Bool XF86VidModeGetGammaRampSize(
Display* ,
int ,
int*
);
Bool XF86VidModeGetPermissions(
Display* ,
int ,
int*
);
_XFUNCPROTOEND
#endif
#endif