1
/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */
4
Copyright 1995 Kaleb S. KEITHLEY
6
Permission is hereby granted, free of charge, to any person obtaining
7
a copy of this software and associated documentation files (the
8
"Software"), to deal in the Software without restriction, including
9
without limitation the rights to use, copy, modify, merge, publish,
10
distribute, sublicense, and/or sell copies of the Software, and to
11
permit persons to whom the Software is furnished to do so, subject to
12
the following conditions:
14
The above copyright notice and this permission notice shall be
15
included in all copies or substantial portions of the Software.
17
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
21
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
OTHER DEALINGS IN THE SOFTWARE.
25
Except as contained in this notice, the name of Kaleb S. KEITHLEY
26
shall not be used in advertising or otherwise to promote the sale, use
27
or other dealings in this Software without prior written authorization
28
from Kaleb S. KEITHLEY
31
/* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */
33
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
35
#ifndef _XF86VIDMODE_H_
36
#define _XF86VIDMODE_H_
38
#include <X11/Xfuncproto.h>
41
#define X_XF86VidModeQueryVersion 0
42
#define X_XF86VidModeGetModeLine 1
43
#define X_XF86VidModeModModeLine 2
44
#define X_XF86VidModeSwitchMode 3
45
#define X_XF86VidModeGetMonitor 4
46
#define X_XF86VidModeLockModeSwitch 5
47
#define X_XF86VidModeGetAllModeLines 6
48
#define X_XF86VidModeAddModeLine 7
49
#define X_XF86VidModeDeleteModeLine 8
50
#define X_XF86VidModeValidateModeLine 9
51
#define X_XF86VidModeSwitchToMode 10
52
#define X_XF86VidModeGetViewPort 11
53
#define X_XF86VidModeSetViewPort 12
54
/* new for version 2.x of this extension */
55
#define X_XF86VidModeGetDotClocks 13
56
#define X_XF86VidModeSetClientVersion 14
57
#define X_XF86VidModeSetGamma 15
58
#define X_XF86VidModeGetGamma 16
59
#define X_XF86VidModeGetGammaRamp 17
60
#define X_XF86VidModeSetGammaRamp 18
61
#define X_XF86VidModeGetGammaRampSize 19
62
#define X_XF86VidModeGetPermissions 20
64
#define CLKFLAG_PROGRAMABLE 1
66
#ifdef XF86VIDMODE_EVENTS
67
#define XF86VidModeNotify 0
68
#define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
70
#define XF86VidModeNotifyMask 0x00000001
72
#define XF86VidModeNonEvent 0
73
#define XF86VidModeModeChange 1
75
#define XF86VidModeNumberEvents 0
78
#define XF86VidModeBadClock 0
79
#define XF86VidModeBadHTimings 1
80
#define XF86VidModeBadVTimings 2
81
#define XF86VidModeModeUnsuitable 3
82
#define XF86VidModeExtensionDisabled 4
83
#define XF86VidModeClientNotLocal 5
84
#define XF86VidModeZoomLocked 6
85
#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
87
#define XF86VM_READ_PERMISSION 1
88
#define XF86VM_WRITE_PERMISSION 2
90
#ifndef _XF86VIDMODE_SERVER_
93
unsigned short hdisplay;
94
unsigned short hsyncstart;
95
unsigned short hsyncend;
96
unsigned short htotal;
98
unsigned short vdisplay;
99
unsigned short vsyncstart;
100
unsigned short vsyncend;
101
unsigned short vtotal;
104
#if defined(__cplusplus) || defined(c_plusplus)
105
/* private is a C++ reserved word */
110
} XF86VidModeModeLine;
113
unsigned int dotclock;
114
unsigned short hdisplay;
115
unsigned short hsyncstart;
116
unsigned short hsyncend;
117
unsigned short htotal;
118
unsigned short hskew;
119
unsigned short vdisplay;
120
unsigned short vsyncstart;
121
unsigned short vsyncend;
122
unsigned short vtotal;
125
#if defined(__cplusplus) || defined(c_plusplus)
126
/* private is a C++ reserved word */
131
} XF86VidModeModeInfo;
136
} XF86VidModeSyncRange;
142
unsigned char nhsync;
143
XF86VidModeSyncRange* hsync;
144
unsigned char nvsync;
145
XF86VidModeSyncRange* vsync;
146
} XF86VidModeMonitor;
149
int type; /* of event */
150
unsigned long serial; /* # of last request processed by server */
151
Bool send_event; /* true if this came from a SendEvent req */
152
Display *display; /* Display the event was read from */
153
Window root; /* root window of event screen */
154
int state; /* What happened */
155
int kind; /* What happened */
156
Bool forced; /* extents of new region */
157
Time time; /* event timestamp */
158
} XF86VidModeNotifyEvent;
161
float red; /* Red Gamma value */
162
float green; /* Green Gamma value */
163
float blue; /* Blue Gamma value */
167
#define XF86VidModeSelectNextMode(disp, scr) \
168
XF86VidModeSwitchMode(disp, scr, 1)
169
#define XF86VidModeSelectPrevMode(disp, scr) \
170
XF86VidModeSwitchMode(disp, scr, -1)
174
Bool XF86VidModeQueryVersion(
176
int* /* majorVersion */,
177
int* /* minorVersion */
180
Bool XF86VidModeQueryExtension(
182
int* /* event_base */,
183
int* /* error_base */
186
Bool XF86VidModeSetClientVersion(
190
Bool XF86VidModeGetModeLine(
194
XF86VidModeModeLine* /* modeline */
197
Bool XF86VidModeGetAllModeLines(
200
int* /* modecount */,
201
XF86VidModeModeInfo*** /* modelinesPtr */
204
Bool XF86VidModeAddModeLine(
207
XF86VidModeModeInfo* /* new modeline */,
208
XF86VidModeModeInfo* /* after modeline */
211
Bool XF86VidModeDeleteModeLine(
214
XF86VidModeModeInfo* /* modeline */
217
Bool XF86VidModeModModeLine(
220
XF86VidModeModeLine* /* modeline */
223
Status XF86VidModeValidateModeLine(
226
XF86VidModeModeInfo* /* modeline */
229
Bool XF86VidModeSwitchMode(
235
Bool XF86VidModeSwitchToMode(
238
XF86VidModeModeInfo* /* modeline */
241
Bool XF86VidModeLockModeSwitch(
247
Bool XF86VidModeGetMonitor(
250
XF86VidModeMonitor* /* monitor */
253
Bool XF86VidModeGetViewPort(
260
Bool XF86VidModeSetViewPort(
267
Bool XF86VidModeGetDotClocks(
270
int* /* flags return */,
271
int* /* number of clocks return */,
272
int* /* max dot clock return */,
273
int** /* clocks return */
276
Bool XF86VidModeGetGamma(
279
XF86VidModeGamma* /* Gamma */
282
Bool XF86VidModeSetGamma(
285
XF86VidModeGamma* /* Gamma */
288
Bool XF86VidModeSetGammaRamp(
292
unsigned short* /* red array */,
293
unsigned short* /* green array */,
294
unsigned short* /* blue array */
297
Bool XF86VidModeGetGammaRamp(
301
unsigned short* /* red array */,
302
unsigned short* /* green array */,
303
unsigned short* /* blue array */
306
Bool XF86VidModeGetGammaRampSize(
312
Bool XF86VidModeGetPermissions(
315
int* /* permissions */