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>
42 #define X_XF86VidModeQueryVersion 0
43 #define X_XF86VidModeGetModeLine 1
44 #define X_XF86VidModeModModeLine 2
45 #define X_XF86VidModeSwitchMode 3
46 #define X_XF86VidModeGetMonitor 4
47 #define X_XF86VidModeLockModeSwitch 5
48 #define X_XF86VidModeGetAllModeLines 6
49 #define X_XF86VidModeAddModeLine 7
50 #define X_XF86VidModeDeleteModeLine 8
51 #define X_XF86VidModeValidateModeLine 9
52 #define X_XF86VidModeSwitchToMode 10
53 #define X_XF86VidModeGetViewPort 11
54 #define X_XF86VidModeSetViewPort 12
55 /* new for version 2.x of this extension */
56 #define X_XF86VidModeGetDotClocks 13
57 #define X_XF86VidModeSetClientVersion 14
58 #define X_XF86VidModeSetGamma 15
59 #define X_XF86VidModeGetGamma 16
60 #define X_XF86VidModeGetGammaRamp 17
61 #define X_XF86VidModeSetGammaRamp 18
62 #define X_XF86VidModeGetGammaRampSize 19
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 #ifndef _XF86VIDMODE_SERVER_
90 unsigned short hdisplay;
91 unsigned short hsyncstart;
92 unsigned short hsyncend;
93 unsigned short htotal;
95 unsigned short vdisplay;
96 unsigned short vsyncstart;
97 unsigned short vsyncend;
98 unsigned short vtotal;
101 #if defined(__cplusplus) || defined(c_plusplus)
102 /* private is a C++ reserved word */
107 } SDL_NAME(XF86VidModeModeLine);
110 unsigned int dotclock;
111 unsigned short hdisplay;
112 unsigned short hsyncstart;
113 unsigned short hsyncend;
114 unsigned short htotal;
115 unsigned short hskew;
116 unsigned short vdisplay;
117 unsigned short vsyncstart;
118 unsigned short vsyncend;
119 unsigned short vtotal;
122 #if defined(__cplusplus) || defined(c_plusplus)
123 /* private is a C++ reserved word */
128 } SDL_NAME(XF86VidModeModeInfo);
133 } SDL_NAME(XF86VidModeSyncRange);
139 unsigned char nhsync;
140 SDL_NAME(XF86VidModeSyncRange)* hsync;
141 unsigned char nvsync;
142 SDL_NAME(XF86VidModeSyncRange)* vsync;
143 } SDL_NAME(XF86VidModeMonitor);
146 int type; /* of event */
147 unsigned long serial; /* # of last request processed by server */
148 Bool send_event; /* true if this came from a SendEvent req */
149 Display *display; /* Display the event was read from */
150 Window root; /* root window of event screen */
151 int state; /* What happened */
152 int kind; /* What happened */
153 Bool forced; /* extents of new region */
154 Time time; /* event timestamp */
155 } SDL_NAME(XF86VidModeNotifyEvent);
158 float red; /* Red Gamma value */
159 float green; /* Green Gamma value */
160 float blue; /* Blue Gamma value */
161 } SDL_NAME(XF86VidModeGamma);
164 #define SDL_XF86VidModeSelectNextMode(disp, scr) \
165 SDL_NAME(XF86VidModeSwitchMode)(disp, scr, 1)
166 #define SDL_XF86VidModeSelectPrevMode(disp, scr) \
167 SDL_NAME(XF86VidModeSwitchMode)(disp, scr, -1)
171 Bool SDL_NAME(XF86VidModeQueryVersion)(
173 int* /* majorVersion */,
174 int* /* minorVersion */
177 Bool SDL_NAME(XF86VidModeQueryExtension)(
179 int* /* event_base */,
180 int* /* error_base */
183 Bool SDL_NAME(XF86VidModeSetClientVersion)(
187 Bool SDL_NAME(XF86VidModeGetModeLine)(
191 SDL_NAME(XF86VidModeModeLine)* /* modeline */
194 Bool SDL_NAME(XF86VidModeGetAllModeLines)(
197 int* /* modecount */,
198 SDL_NAME(XF86VidModeModeInfo)*** /* modelinesPtr */
201 Bool SDL_NAME(XF86VidModeAddModeLine)(
204 SDL_NAME(XF86VidModeModeInfo)* /* new modeline */,
205 SDL_NAME(XF86VidModeModeInfo)* /* after modeline */
208 Bool SDL_NAME(XF86VidModeDeleteModeLine)(
211 SDL_NAME(XF86VidModeModeInfo)* /* modeline */
214 Bool SDL_NAME(XF86VidModeModModeLine)(
217 SDL_NAME(XF86VidModeModeLine)* /* modeline */
220 Status SDL_NAME(XF86VidModeValidateModeLine)(
223 SDL_NAME(XF86VidModeModeInfo)* /* modeline */
226 Bool SDL_NAME(XF86VidModeSwitchMode)(
232 Bool SDL_NAME(XF86VidModeSwitchToMode)(
235 SDL_NAME(XF86VidModeModeInfo)* /* modeline */
238 Bool SDL_NAME(XF86VidModeLockModeSwitch)(
244 Bool SDL_NAME(XF86VidModeGetMonitor)(
247 SDL_NAME(XF86VidModeMonitor)* /* monitor */
250 Bool SDL_NAME(XF86VidModeGetViewPort)(
257 Bool SDL_NAME(XF86VidModeSetViewPort)(
264 Bool SDL_NAME(XF86VidModeGetDotClocks)(
267 int* /* flags return */,
268 int* /* number of clocks return */,
269 int* /* max dot clock return */,
270 int** /* clocks return */
273 Bool SDL_NAME(XF86VidModeGetGamma)(
276 SDL_NAME(XF86VidModeGamma)* /* Gamma */
279 Bool SDL_NAME(XF86VidModeSetGamma)(
282 SDL_NAME(XF86VidModeGamma)* /* Gamma */
285 Bool SDL_NAME(XF86VidModeSetGammaRamp)(
289 unsigned short* /* red array */,
290 unsigned short* /* green array */,
291 unsigned short* /* blue array */
294 Bool SDL_NAME(XF86VidModeGetGammaRamp)(
298 unsigned short* /* red array */,
299 unsigned short* /* green array */,
300 unsigned short* /* blue array */
303 Bool SDL_NAME(XF86VidModeGetGammaRampSize)(