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
63
#define CLKFLAG_PROGRAMABLE 1
65
#ifdef XF86VIDMODE_EVENTS
66
#define XF86VidModeNotify 0
67
#define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
69
#define XF86VidModeNotifyMask 0x00000001
71
#define XF86VidModeNonEvent 0
72
#define XF86VidModeModeChange 1
74
#define XF86VidModeNumberEvents 0
77
#define XF86VidModeBadClock 0
78
#define XF86VidModeBadHTimings 1
79
#define XF86VidModeBadVTimings 2
80
#define XF86VidModeModeUnsuitable 3
81
#define XF86VidModeExtensionDisabled 4
82
#define XF86VidModeClientNotLocal 5
83
#define XF86VidModeZoomLocked 6
84
#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
86
#ifndef _XF86VIDMODE_SERVER_
89
unsigned short hdisplay;
90
unsigned short hsyncstart;
91
unsigned short hsyncend;
92
unsigned short htotal;
94
unsigned short vdisplay;
95
unsigned short vsyncstart;
96
unsigned short vsyncend;
97
unsigned short vtotal;
100
#if defined(__cplusplus) || defined(c_plusplus)
101
/* private is a C++ reserved word */
106
} XF86VidModeModeLine;
109
unsigned int dotclock;
110
unsigned short hdisplay;
111
unsigned short hsyncstart;
112
unsigned short hsyncend;
113
unsigned short htotal;
114
unsigned short hskew;
115
unsigned short vdisplay;
116
unsigned short vsyncstart;
117
unsigned short vsyncend;
118
unsigned short vtotal;
121
#if defined(__cplusplus) || defined(c_plusplus)
122
/* private is a C++ reserved word */
127
} XF86VidModeModeInfo;
132
} XF86VidModeSyncRange;
138
unsigned char nhsync;
139
XF86VidModeSyncRange* hsync;
140
unsigned char nvsync;
141
XF86VidModeSyncRange* vsync;
142
} XF86VidModeMonitor;
145
int type; /* of event */
146
unsigned long serial; /* # of last request processed by server */
147
Bool send_event; /* true if this came from a SendEvent req */
148
Display *display; /* Display the event was read from */
149
Window root; /* root window of event screen */
150
int state; /* What happened */
151
int kind; /* What happened */
152
Bool forced; /* extents of new region */
153
Time time; /* event timestamp */
154
} XF86VidModeNotifyEvent;
157
float red; /* Red Gamma value */
158
float green; /* Green Gamma value */
159
float blue; /* Blue Gamma value */
163
#define XF86VidModeSelectNextMode(disp, scr) \
164
XF86VidModeSwitchMode(disp, scr, 1)
165
#define XF86VidModeSelectPrevMode(disp, scr) \
166
XF86VidModeSwitchMode(disp, scr, -1)
170
Bool XF86VidModeQueryVersion(
172
int* /* majorVersion */,
173
int* /* minorVersion */
176
Bool XF86VidModeQueryExtension(
178
int* /* event_base */,
179
int* /* error_base */
182
Bool XF86VidModeSetClientVersion(
186
Bool XF86VidModeGetModeLine(
190
XF86VidModeModeLine* /* modeline */
193
Bool XF86VidModeGetAllModeLines(
196
int* /* modecount */,
197
XF86VidModeModeInfo*** /* modelinesPtr */
200
Bool XF86VidModeAddModeLine(
203
XF86VidModeModeInfo* /* new modeline */,
204
XF86VidModeModeInfo* /* after modeline */
207
Bool XF86VidModeDeleteModeLine(
210
XF86VidModeModeInfo* /* modeline */
213
Bool XF86VidModeModModeLine(
216
XF86VidModeModeLine* /* modeline */
219
Status XF86VidModeValidateModeLine(
222
XF86VidModeModeInfo* /* modeline */
225
Bool XF86VidModeSwitchMode(
231
Bool XF86VidModeSwitchToMode(
234
XF86VidModeModeInfo* /* modeline */
237
Bool XF86VidModeLockModeSwitch(
243
Bool XF86VidModeGetMonitor(
246
XF86VidModeMonitor* /* monitor */
249
Bool XF86VidModeGetViewPort(
256
Bool XF86VidModeSetViewPort(
263
Bool XF86VidModeGetDotClocks(
266
int* /* flags return */,
267
int* /* number of clocks return */,
268
int* /* max dot clock return */,
269
int** /* clocks return */
272
Bool XF86VidModeGetGamma(
275
XF86VidModeGamma* /* Gamma */
278
Bool XF86VidModeSetGamma(
281
XF86VidModeGamma* /* Gamma */
284
Bool XF86VidModeSetGammaRamp(
288
unsigned short* /* red array */,
289
unsigned short* /* green array */,
290
unsigned short* /* blue array */
293
Bool XF86VidModeGetGammaRamp(
297
unsigned short* /* red array */,
298
unsigned short* /* green array */,
299
unsigned short* /* blue array */
302
Bool XF86VidModeGetGammaRampSize(