3 Copyright 1995 Kaleb S. KEITHLEY
5 Permission is hereby granted, free of charge, to any person obtaining
6 a copy of this software and associated documentation files (the
7 "Software"), to deal in the Software without restriction, including
8 without limitation the rights to use, copy, modify, merge, publish,
9 distribute, sublicense, and/or sell copies of the Software, and to
10 permit persons to whom the Software is furnished to do so, subject to
11 the following conditions:
13 The above copyright notice and this permission notice shall be
14 included in all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
20 OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 OTHER DEALINGS IN THE SOFTWARE.
24 Except as contained in this notice, the name of Kaleb S. KEITHLEY
25 shall not be used in advertising or otherwise to promote the sale, use
26 or other dealings in this Software without prior written authorization
27 from Kaleb S. KEITHLEY
31 /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
33 #ifndef _XF86VIDMODE_H_
34 #define _XF86VIDMODE_H_
36 #include <X11/Xfuncproto.h>
38 #include <X11/extensions/xf86vm.h>
40 #define CLKFLAG_PROGRAMABLE 1
42 #ifdef XF86VIDMODE_EVENTS
43 #define XF86VidModeNotify 0
44 #define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
46 #define XF86VidModeNotifyMask 0x00000001
48 #define XF86VidModeNonEvent 0
49 #define XF86VidModeModeChange 1
51 #define XF86VidModeNumberEvents 0
54 #define XF86VidModeBadClock 0
55 #define XF86VidModeBadHTimings 1
56 #define XF86VidModeBadVTimings 2
57 #define XF86VidModeModeUnsuitable 3
58 #define XF86VidModeExtensionDisabled 4
59 #define XF86VidModeClientNotLocal 5
60 #define XF86VidModeZoomLocked 6
61 #define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
63 #define XF86VM_READ_PERMISSION 1
64 #define XF86VM_WRITE_PERMISSION 2
66 #ifndef _XF86VIDMODE_SERVER_
69 unsigned short hdisplay;
70 unsigned short hsyncstart;
71 unsigned short hsyncend;
72 unsigned short htotal;
74 unsigned short vdisplay;
75 unsigned short vsyncstart;
76 unsigned short vsyncend;
77 unsigned short vtotal;
80 #if defined(__cplusplus) || defined(c_plusplus)
81 /* private is a C++ reserved word */
86 } XF86VidModeModeLine;
89 unsigned int dotclock;
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 } XF86VidModeModeInfo;
112 } XF86VidModeSyncRange;
118 unsigned char nhsync;
119 XF86VidModeSyncRange* hsync;
120 unsigned char nvsync;
121 XF86VidModeSyncRange* vsync;
122 } XF86VidModeMonitor;
125 int type; /* of event */
126 unsigned long serial; /* # of last request processed by server */
127 Bool send_event; /* true if this came from a SendEvent req */
128 Display *display; /* Display the event was read from */
129 Window root; /* root window of event screen */
130 int state; /* What happened */
131 int kind; /* What happened */
132 Bool forced; /* extents of new region */
133 Time time; /* event timestamp */
134 } XF86VidModeNotifyEvent;
137 float red; /* Red Gamma value */
138 float green; /* Green Gamma value */
139 float blue; /* Blue Gamma value */
143 #define XF86VidModeSelectNextMode(disp, scr) \
144 XF86VidModeSwitchMode(disp, scr, 1)
145 #define XF86VidModeSelectPrevMode(disp, scr) \
146 XF86VidModeSwitchMode(disp, scr, -1)
150 Bool XF86VidModeQueryVersion(
152 int* /* majorVersion */,
153 int* /* minorVersion */
156 Bool XF86VidModeQueryExtension(
158 int* /* event_base */,
159 int* /* error_base */
162 Bool XF86VidModeSetClientVersion(
166 Bool XF86VidModeGetModeLine(
170 XF86VidModeModeLine* /* modeline */
173 Bool XF86VidModeGetAllModeLines(
176 int* /* modecount */,
177 XF86VidModeModeInfo*** /* modelinesPtr */
180 Bool XF86VidModeAddModeLine(
183 XF86VidModeModeInfo* /* new modeline */,
184 XF86VidModeModeInfo* /* after modeline */
187 Bool XF86VidModeDeleteModeLine(
190 XF86VidModeModeInfo* /* modeline */
193 Bool XF86VidModeModModeLine(
196 XF86VidModeModeLine* /* modeline */
199 Status XF86VidModeValidateModeLine(
202 XF86VidModeModeInfo* /* modeline */
205 Bool XF86VidModeSwitchMode(
211 Bool XF86VidModeSwitchToMode(
214 XF86VidModeModeInfo* /* modeline */
217 Bool XF86VidModeLockModeSwitch(
223 Bool XF86VidModeGetMonitor(
226 XF86VidModeMonitor* /* monitor */
229 Bool XF86VidModeGetViewPort(
236 Bool XF86VidModeSetViewPort(
243 Bool XF86VidModeGetDotClocks(
246 int* /* flags return */,
247 int* /* number of clocks return */,
248 int* /* max dot clock return */,
249 int** /* clocks return */
252 Bool XF86VidModeGetGamma(
255 XF86VidModeGamma* /* Gamma */
258 Bool XF86VidModeSetGamma(
261 XF86VidModeGamma* /* Gamma */
264 Bool XF86VidModeSetGammaRamp(
268 unsigned short* /* red array */,
269 unsigned short* /* green array */,
270 unsigned short* /* blue array */
273 Bool XF86VidModeGetGammaRamp(
277 unsigned short* /* red array */,
278 unsigned short* /* green array */,
279 unsigned short* /* blue array */
282 Bool XF86VidModeGetGammaRampSize(
288 Bool XF86VidModeGetPermissions(
291 int* /* permissions */