1 | /* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */
|
---|
2 | /*
|
---|
3 |
|
---|
4 | Copyright 1995 Kaleb S. KEITHLEY
|
---|
5 |
|
---|
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:
|
---|
13 |
|
---|
14 | The above copyright notice and this permission notice shall be
|
---|
15 | included in all copies or substantial portions of the Software.
|
---|
16 |
|
---|
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.
|
---|
24 |
|
---|
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
|
---|
29 |
|
---|
30 | */
|
---|
31 | /* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */
|
---|
32 |
|
---|
33 | /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
|
---|
34 |
|
---|
35 | #ifndef _XF86VIDMODE_H_
|
---|
36 | #define _XF86VIDMODE_H_
|
---|
37 |
|
---|
38 | #include <X11/Xfuncproto.h>
|
---|
39 | #include <X11/Xmd.h>
|
---|
40 |
|
---|
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 |
|
---|
63 | #define CLKFLAG_PROGRAMABLE 1
|
---|
64 |
|
---|
65 | #ifdef XF86VIDMODE_EVENTS
|
---|
66 | #define XF86VidModeNotify 0
|
---|
67 | #define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
|
---|
68 |
|
---|
69 | #define XF86VidModeNotifyMask 0x00000001
|
---|
70 |
|
---|
71 | #define XF86VidModeNonEvent 0
|
---|
72 | #define XF86VidModeModeChange 1
|
---|
73 | #else
|
---|
74 | #define XF86VidModeNumberEvents 0
|
---|
75 | #endif
|
---|
76 |
|
---|
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)
|
---|
85 |
|
---|
86 | #ifndef _XF86VIDMODE_SERVER_
|
---|
87 |
|
---|
88 | typedef struct {
|
---|
89 | unsigned short hdisplay;
|
---|
90 | unsigned short hsyncstart;
|
---|
91 | unsigned short hsyncend;
|
---|
92 | unsigned short htotal;
|
---|
93 | unsigned short hskew;
|
---|
94 | unsigned short vdisplay;
|
---|
95 | unsigned short vsyncstart;
|
---|
96 | unsigned short vsyncend;
|
---|
97 | unsigned short vtotal;
|
---|
98 | unsigned int flags;
|
---|
99 | int privsize;
|
---|
100 | #if defined(__cplusplus) || defined(c_plusplus)
|
---|
101 | /* private is a C++ reserved word */
|
---|
102 | INT32 *c_private;
|
---|
103 | #else
|
---|
104 | INT32 *private;
|
---|
105 | #endif
|
---|
106 | } XF86VidModeModeLine;
|
---|
107 |
|
---|
108 | typedef struct {
|
---|
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;
|
---|
119 | unsigned int flags;
|
---|
120 | int privsize;
|
---|
121 | #if defined(__cplusplus) || defined(c_plusplus)
|
---|
122 | /* private is a C++ reserved word */
|
---|
123 | INT32 *c_private;
|
---|
124 | #else
|
---|
125 | INT32 *private;
|
---|
126 | #endif
|
---|
127 | } XF86VidModeModeInfo;
|
---|
128 |
|
---|
129 | typedef struct {
|
---|
130 | float hi;
|
---|
131 | float lo;
|
---|
132 | } XF86VidModeSyncRange;
|
---|
133 |
|
---|
134 | typedef struct {
|
---|
135 | char* vendor;
|
---|
136 | char* model;
|
---|
137 | float EMPTY;
|
---|
138 | unsigned char nhsync;
|
---|
139 | XF86VidModeSyncRange* hsync;
|
---|
140 | unsigned char nvsync;
|
---|
141 | XF86VidModeSyncRange* vsync;
|
---|
142 | } XF86VidModeMonitor;
|
---|
143 |
|
---|
144 | typedef struct {
|
---|
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;
|
---|
155 |
|
---|
156 | typedef struct {
|
---|
157 | float red; /* Red Gamma value */
|
---|
158 | float green; /* Green Gamma value */
|
---|
159 | float blue; /* Blue Gamma value */
|
---|
160 | } XF86VidModeGamma;
|
---|
161 |
|
---|
162 |
|
---|
163 | #define XF86VidModeSelectNextMode(disp, scr) \
|
---|
164 | XF86VidModeSwitchMode(disp, scr, 1)
|
---|
165 | #define XF86VidModeSelectPrevMode(disp, scr) \
|
---|
166 | XF86VidModeSwitchMode(disp, scr, -1)
|
---|
167 |
|
---|
168 | _XFUNCPROTOBEGIN
|
---|
169 |
|
---|
170 | Bool XF86VidModeQueryVersion(
|
---|
171 | Display* /* dpy */,
|
---|
172 | int* /* majorVersion */,
|
---|
173 | int* /* minorVersion */
|
---|
174 | );
|
---|
175 |
|
---|
176 | Bool XF86VidModeQueryExtension(
|
---|
177 | Display* /* dpy */,
|
---|
178 | int* /* event_base */,
|
---|
179 | int* /* error_base */
|
---|
180 | );
|
---|
181 |
|
---|
182 | Bool XF86VidModeSetClientVersion(
|
---|
183 | Display* /* dpy */
|
---|
184 | );
|
---|
185 |
|
---|
186 | Bool XF86VidModeGetModeLine(
|
---|
187 | Display* /* dpy */,
|
---|
188 | int /* screen */,
|
---|
189 | int* /* dotclock */,
|
---|
190 | XF86VidModeModeLine* /* modeline */
|
---|
191 | );
|
---|
192 |
|
---|
193 | Bool XF86VidModeGetAllModeLines(
|
---|
194 | Display* /* dpy */,
|
---|
195 | int /* screen */,
|
---|
196 | int* /* modecount */,
|
---|
197 | XF86VidModeModeInfo*** /* modelinesPtr */
|
---|
198 | );
|
---|
199 |
|
---|
200 | Bool XF86VidModeAddModeLine(
|
---|
201 | Display* /* dpy */,
|
---|
202 | int /* screen */,
|
---|
203 | XF86VidModeModeInfo* /* new modeline */,
|
---|
204 | XF86VidModeModeInfo* /* after modeline */
|
---|
205 | );
|
---|
206 |
|
---|
207 | Bool XF86VidModeDeleteModeLine(
|
---|
208 | Display* /* dpy */,
|
---|
209 | int /* screen */,
|
---|
210 | XF86VidModeModeInfo* /* modeline */
|
---|
211 | );
|
---|
212 |
|
---|
213 | Bool XF86VidModeModModeLine(
|
---|
214 | Display* /* dpy */,
|
---|
215 | int /* screen */,
|
---|
216 | XF86VidModeModeLine* /* modeline */
|
---|
217 | );
|
---|
218 |
|
---|
219 | Status XF86VidModeValidateModeLine(
|
---|
220 | Display* /* dpy */,
|
---|
221 | int /* screen */,
|
---|
222 | XF86VidModeModeInfo* /* modeline */
|
---|
223 | );
|
---|
224 |
|
---|
225 | Bool XF86VidModeSwitchMode(
|
---|
226 | Display* /* dpy */,
|
---|
227 | int /* screen */,
|
---|
228 | int /* zoom */
|
---|
229 | );
|
---|
230 |
|
---|
231 | Bool XF86VidModeSwitchToMode(
|
---|
232 | Display* /* dpy */,
|
---|
233 | int /* screen */,
|
---|
234 | XF86VidModeModeInfo* /* modeline */
|
---|
235 | );
|
---|
236 |
|
---|
237 | Bool XF86VidModeLockModeSwitch(
|
---|
238 | Display* /* dpy */,
|
---|
239 | int /* screen */,
|
---|
240 | int /* lock */
|
---|
241 | );
|
---|
242 |
|
---|
243 | Bool XF86VidModeGetMonitor(
|
---|
244 | Display* /* dpy */,
|
---|
245 | int /* screen */,
|
---|
246 | XF86VidModeMonitor* /* monitor */
|
---|
247 | );
|
---|
248 |
|
---|
249 | Bool XF86VidModeGetViewPort(
|
---|
250 | Display* /* dpy */,
|
---|
251 | int /* screen */,
|
---|
252 | int* /* x return */,
|
---|
253 | int* /* y return */
|
---|
254 | );
|
---|
255 |
|
---|
256 | Bool XF86VidModeSetViewPort(
|
---|
257 | Display* /* dpy */,
|
---|
258 | int /* screen */,
|
---|
259 | int /* x */,
|
---|
260 | int /* y */
|
---|
261 | );
|
---|
262 |
|
---|
263 | Bool XF86VidModeGetDotClocks(
|
---|
264 | Display* /* dpy */,
|
---|
265 | int /* screen */,
|
---|
266 | int* /* flags return */,
|
---|
267 | int* /* number of clocks return */,
|
---|
268 | int* /* max dot clock return */,
|
---|
269 | int** /* clocks return */
|
---|
270 | );
|
---|
271 |
|
---|
272 | Bool XF86VidModeGetGamma(
|
---|
273 | Display* /* dpy */,
|
---|
274 | int /* screen */,
|
---|
275 | XF86VidModeGamma* /* Gamma */
|
---|
276 | );
|
---|
277 |
|
---|
278 | Bool XF86VidModeSetGamma(
|
---|
279 | Display* /* dpy */,
|
---|
280 | int /* screen */,
|
---|
281 | XF86VidModeGamma* /* Gamma */
|
---|
282 | );
|
---|
283 |
|
---|
284 | Bool XF86VidModeSetGammaRamp(
|
---|
285 | Display* /* dpy */,
|
---|
286 | int /* screen */,
|
---|
287 | int /* size */,
|
---|
288 | unsigned short* /* red array */,
|
---|
289 | unsigned short* /* green array */,
|
---|
290 | unsigned short* /* blue array */
|
---|
291 | );
|
---|
292 |
|
---|
293 | Bool XF86VidModeGetGammaRamp(
|
---|
294 | Display* /* dpy */,
|
---|
295 | int /* screen */,
|
---|
296 | int /* size */,
|
---|
297 | unsigned short* /* red array */,
|
---|
298 | unsigned short* /* green array */,
|
---|
299 | unsigned short* /* blue array */
|
---|
300 | );
|
---|
301 |
|
---|
302 | Bool XF86VidModeGetGammaRampSize(
|
---|
303 | Display* /* dpy */,
|
---|
304 | int /* screen */,
|
---|
305 | int* /* size */
|
---|
306 | );
|
---|
307 |
|
---|
308 |
|
---|
309 | _XFUNCPROTOEND
|
---|
310 |
|
---|
311 | #endif
|
---|
312 |
|
---|
313 | #endif
|
---|