1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _VIDMODEPROC_H_
#define _VIDMODEPROC_H_
#include "displaymode.h"
typedef enum {
VIDMODE_H_DISPLAY,
VIDMODE_H_SYNCSTART,
VIDMODE_H_SYNCEND,
VIDMODE_H_TOTAL,
VIDMODE_H_SKEW,
VIDMODE_V_DISPLAY,
VIDMODE_V_SYNCSTART,
VIDMODE_V_SYNCEND,
VIDMODE_V_TOTAL,
VIDMODE_FLAGS,
VIDMODE_CLOCK
} VidModeSelectMode;
typedef enum {
VIDMODE_MON_VENDOR,
VIDMODE_MON_MODEL,
VIDMODE_MON_NHSYNC,
VIDMODE_MON_NVREFRESH,
VIDMODE_MON_HSYNC_LO,
VIDMODE_MON_HSYNC_HI,
VIDMODE_MON_VREFRESH_LO,
VIDMODE_MON_VREFRESH_HI
} VidModeSelectMonitor;
typedef union {
const void *ptr;
int i;
float f;
} vidMonitorValue;
typedef Bool (*VidModeExtensionInitProcPtr) (ScreenPtr pScreen);
typedef vidMonitorValue (*VidModeGetMonitorValueProcPtr) (ScreenPtr pScreen,
int valtyp,
int indx);
typedef Bool (*VidModeGetEnabledProcPtr) (void);
typedef Bool (*VidModeGetAllowNonLocalProcPtr) (void);
typedef Bool (*VidModeGetCurrentModelineProcPtr) (ScreenPtr pScreen,
DisplayModePtr *mode,
int *dotClock);
typedef Bool (*VidModeGetFirstModelineProcPtr) (ScreenPtr pScreen,
DisplayModePtr *mode,
int *dotClock);
typedef Bool (*VidModeGetNextModelineProcPtr) (ScreenPtr pScreen,
DisplayModePtr *mode,
int *dotClock);
typedef Bool (*VidModeDeleteModelineProcPtr) (ScreenPtr pScreen,
DisplayModePtr mode);
typedef Bool (*VidModeZoomViewportProcPtr) (ScreenPtr pScreen,
int zoom);
typedef Bool (*VidModeGetViewPortProcPtr) (ScreenPtr pScreen,
int *x,
int *y);
typedef Bool (*VidModeSetViewPortProcPtr) (ScreenPtr pScreen,
int x,
int y);
typedef Bool (*VidModeSwitchModeProcPtr) (ScreenPtr pScreen,
DisplayModePtr mode);
typedef Bool (*VidModeLockZoomProcPtr) (ScreenPtr pScreen,
Bool lock);
typedef int (*VidModeGetNumOfClocksProcPtr) (ScreenPtr pScreen,
Bool *progClock);
typedef Bool (*VidModeGetClocksProcPtr) (ScreenPtr pScreen,
int *Clocks);
typedef ModeStatus (*VidModeCheckModeForMonitorProcPtr) (ScreenPtr pScreen,
DisplayModePtr mode);
typedef ModeStatus (*VidModeCheckModeForDriverProcPtr) (ScreenPtr pScreen,
DisplayModePtr mode);
typedef void (*VidModeSetCrtcForModeProcPtr) (ScreenPtr pScreen,
DisplayModePtr mode);
typedef Bool (*VidModeAddModelineProcPtr) (ScreenPtr pScreen,
DisplayModePtr mode);
typedef int (*VidModeGetDotClockProcPtr) (ScreenPtr pScreen,
int Clock);
typedef int (*VidModeGetNumOfModesProcPtr) (ScreenPtr pScreen);
typedef Bool (*VidModeSetGammaProcPtr) (ScreenPtr pScreen,
float red,
float green,
float blue);
typedef Bool (*VidModeGetGammaProcPtr) (ScreenPtr pScreen,
float *red,
float *green,
float *blue);
typedef Bool (*VidModeSetGammaRampProcPtr) (ScreenPtr pScreen,
int size,
CARD16 *red,
CARD16 *green,
CARD16 *blue);
typedef Bool (*VidModeGetGammaRampProcPtr) (ScreenPtr pScreen,
int size,
CARD16 *red,
CARD16 *green,
CARD16 *blue);
typedef int (*VidModeGetGammaRampSizeProcPtr) (ScreenPtr pScreen);
typedef struct {
DisplayModePtr First;
DisplayModePtr Next;
int Flags;
VidModeExtensionInitProcPtr ExtensionInit;
VidModeGetMonitorValueProcPtr GetMonitorValue;
VidModeGetCurrentModelineProcPtr GetCurrentModeline;
VidModeGetFirstModelineProcPtr GetFirstModeline;
VidModeGetNextModelineProcPtr GetNextModeline;
VidModeDeleteModelineProcPtr DeleteModeline;
VidModeZoomViewportProcPtr ZoomViewport;
VidModeGetViewPortProcPtr GetViewPort;
VidModeSetViewPortProcPtr SetViewPort;
VidModeSwitchModeProcPtr SwitchMode;
VidModeLockZoomProcPtr LockZoom;
VidModeGetNumOfClocksProcPtr GetNumOfClocks;
VidModeGetClocksProcPtr GetClocks;
VidModeCheckModeForMonitorProcPtr CheckModeForMonitor;
VidModeCheckModeForDriverProcPtr CheckModeForDriver;
VidModeSetCrtcForModeProcPtr SetCrtcForMode;
VidModeAddModelineProcPtr AddModeline;
VidModeGetDotClockProcPtr GetDotClock;
VidModeGetNumOfModesProcPtr GetNumOfModes;
VidModeSetGammaProcPtr SetGamma;
VidModeGetGammaProcPtr GetGamma;
VidModeSetGammaRampProcPtr SetGammaRamp;
VidModeGetGammaRampProcPtr GetGammaRamp;
VidModeGetGammaRampSizeProcPtr GetGammaRampSize;
} VidModeRec, *VidModePtr;
void VidModeAddExtension(Bool allow_non_local);
VidModePtr VidModeGetPtr(ScreenPtr pScreen);
VidModePtr VidModeInit(ScreenPtr pScreen);
#endif
|