1 /* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi 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: xf86vmstr.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 _XF86VIDMODESTR_H_
36 #define _XF86VIDMODESTR_H_
38 #include "xf86vmode.h"
40 #define XF86VIDMODENAME "XFree86-VidModeExtension"
42 #define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */
43 #define XF86VIDMODE_MINOR_VERSION 1
45 * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm.
46 * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune
48 * major version 2 == uses new protocol version in XFree86 4.0.
51 typedef struct _XF86VidModeQueryVersion {
52 CARD8 reqType; /* always XF86VidModeReqCode */
53 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeQueryVersion */
55 } xXF86VidModeQueryVersionReq;
56 #define sz_xXF86VidModeQueryVersionReq 4
59 BYTE type; /* X_Reply */
61 CARD16 sequenceNumber B16;
63 CARD16 majorVersion B16; /* major version of XF86VidMode */
64 CARD16 minorVersion B16; /* minor version of XF86VidMode */
70 } xXF86VidModeQueryVersionReply;
71 #define sz_xXF86VidModeQueryVersionReply 32
73 typedef struct _XF86VidModeGetModeLine {
74 CARD8 reqType; /* always XF86VidModeReqCode */
75 CARD8 xf86vidmodeReqType;
79 } xXF86VidModeGetModeLineReq,
80 xXF86VidModeGetAllModeLinesReq,
81 xXF86VidModeGetMonitorReq,
82 xXF86VidModeGetViewPortReq,
83 xXF86VidModeGetDotClocksReq;
84 #define sz_xXF86VidModeGetModeLineReq 8
85 #define sz_xXF86VidModeGetAllModeLinesReq 8
86 #define sz_xXF86VidModeGetMonitorReq 8
87 #define sz_xXF86VidModeGetViewPortReq 8
88 #define sz_xXF86VidModeGetDotClocksReq 8
91 BYTE type; /* X_Reply */
93 CARD16 sequenceNumber B16;
97 CARD16 hsyncstart B16;
102 CARD16 vsyncstart B16;
107 CARD32 reserved1 B32;
108 CARD32 reserved2 B32;
109 CARD32 reserved3 B32;
111 } xXF86VidModeGetModeLineReply;
112 #define sz_xXF86VidModeGetModeLineReply 52
116 BYTE type; /* X_Reply */
118 CARD16 sequenceNumber B16;
122 CARD16 hsyncstart B16;
126 CARD16 vsyncstart B16;
131 } xXF86OldVidModeGetModeLineReply;
132 #define sz_xXF86OldVidModeGetModeLineReply 36
137 CARD16 hsyncstart B16;
142 CARD16 vsyncstart B16;
147 CARD32 reserved1 B32;
148 CARD32 reserved2 B32;
149 CARD32 reserved3 B32;
151 } xXF86VidModeModeInfo;
157 CARD16 hsyncstart B16;
161 CARD16 vsyncstart B16;
166 } xXF86OldVidModeModeInfo;
169 BYTE type; /* X_Reply */
171 CARD16 sequenceNumber B16;
173 CARD32 modecount B32;
179 } xXF86VidModeGetAllModeLinesReply;
180 #define sz_xXF86VidModeGetAllModeLinesReply 32
182 typedef struct _XF86VidModeAddModeLine {
183 CARD8 reqType; /* always XF86VidModeReqCode */
184 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */
186 CARD32 screen B32; /* could be CARD16 but need the pad */
189 CARD16 hsyncstart B16;
194 CARD16 vsyncstart B16;
199 CARD32 reserved1 B32;
200 CARD32 reserved2 B32;
201 CARD32 reserved3 B32;
203 CARD32 after_dotclock B32;
204 CARD16 after_hdisplay B16;
205 CARD16 after_hsyncstart B16;
206 CARD16 after_hsyncend B16;
207 CARD16 after_htotal B16;
208 CARD16 after_hskew B16;
209 CARD16 after_vdisplay B16;
210 CARD16 after_vsyncstart B16;
211 CARD16 after_vsyncend B16;
212 CARD16 after_vtotal B16;
214 CARD32 after_flags B32;
215 CARD32 reserved4 B32;
216 CARD32 reserved5 B32;
217 CARD32 reserved6 B32;
218 } xXF86VidModeAddModeLineReq;
219 #define sz_xXF86VidModeAddModeLineReq 92
222 typedef struct _XF86OldVidModeAddModeLine {
223 CARD8 reqType; /* always XF86VidModeReqCode */
224 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */
226 CARD32 screen B32; /* could be CARD16 but need the pad */
229 CARD16 hsyncstart B16;
233 CARD16 vsyncstart B16;
238 CARD32 after_dotclock B32;
239 CARD16 after_hdisplay B16;
240 CARD16 after_hsyncstart B16;
241 CARD16 after_hsyncend B16;
242 CARD16 after_htotal B16;
243 CARD16 after_vdisplay B16;
244 CARD16 after_vsyncstart B16;
245 CARD16 after_vsyncend B16;
246 CARD16 after_vtotal B16;
247 CARD32 after_flags B32;
248 } xXF86OldVidModeAddModeLineReq;
249 #define sz_xXF86OldVidModeAddModeLineReq 60
251 typedef struct _XF86VidModeModModeLine {
252 CARD8 reqType; /* always XF86VidModeReqCode */
253 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeModModeLine */
255 CARD32 screen B32; /* could be CARD16 but need the pad */
257 CARD16 hsyncstart B16;
262 CARD16 vsyncstart B16;
267 CARD32 reserved1 B32;
268 CARD32 reserved2 B32;
269 CARD32 reserved3 B32;
271 } xXF86VidModeModModeLineReq;
272 #define sz_xXF86VidModeModModeLineReq 48
275 typedef struct _XF86OldVidModeModModeLine {
276 CARD8 reqType; /* always XF86OldVidModeReqCode */
277 CARD8 xf86vidmodeReqType; /* always X_XF86OldVidModeModModeLine */
279 CARD32 screen B32; /* could be CARD16 but need the pad */
281 CARD16 hsyncstart B16;
285 CARD16 vsyncstart B16;
290 } xXF86OldVidModeModModeLineReq;
291 #define sz_xXF86OldVidModeModModeLineReq 32
293 typedef struct _XF86VidModeValidateModeLine {
294 CARD8 reqType; /* always XF86VidModeReqCode */
295 CARD8 xf86vidmodeReqType;
297 CARD32 screen B32; /* could be CARD16 but need the pad */
300 CARD16 hsyncstart B16;
305 CARD16 vsyncstart B16;
310 CARD32 reserved1 B32;
311 CARD32 reserved2 B32;
312 CARD32 reserved3 B32;
314 } xXF86VidModeDeleteModeLineReq,
315 xXF86VidModeValidateModeLineReq,
316 xXF86VidModeSwitchToModeReq;
317 #define sz_xXF86VidModeDeleteModeLineReq 52
318 #define sz_xXF86VidModeValidateModeLineReq 52
319 #define sz_xXF86VidModeSwitchToModeReq 52
322 typedef struct _XF86OldVidModeValidateModeLine {
323 CARD8 reqType; /* always XF86OldVidModeReqCode */
324 CARD8 xf86vidmodeReqType;
326 CARD32 screen B32; /* could be CARD16 but need the pad */
329 CARD16 hsyncstart B16;
333 CARD16 vsyncstart B16;
338 } xXF86OldVidModeDeleteModeLineReq,
339 xXF86OldVidModeValidateModeLineReq,
340 xXF86OldVidModeSwitchToModeReq;
341 #define sz_xXF86OldVidModeDeleteModeLineReq 36
342 #define sz_xXF86OldVidModeValidateModeLineReq 36
343 #define sz_xXF86OldVidModeSwitchToModeReq 36
345 typedef struct _XF86VidModeSwitchMode {
346 CARD8 reqType; /* always XF86VidModeReqCode */
347 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSwitchMode */
351 } xXF86VidModeSwitchModeReq;
352 #define sz_xXF86VidModeSwitchModeReq 8
354 typedef struct _XF86VidModeLockModeSwitch {
355 CARD8 reqType; /* always XF86VidModeReqCode */
356 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeLockModeSwitch */
360 } xXF86VidModeLockModeSwitchReq;
361 #define sz_xXF86VidModeLockModeSwitchReq 8
364 BYTE type; /* X_Reply */
366 CARD16 sequenceNumber B16;
374 } xXF86VidModeValidateModeLineReply;
375 #define sz_xXF86VidModeValidateModeLineReply 32
378 BYTE type; /* X_Reply */
380 CARD16 sequenceNumber B16;
391 } xXF86VidModeGetMonitorReply;
392 #define sz_xXF86VidModeGetMonitorReply 32
397 CARD16 sequenceNumber B16;
405 } xXF86VidModeGetViewPortReply;
406 #define sz_xXF86VidModeGetViewPortReply 32
408 typedef struct _XF86VidModeSetViewPort {
409 CARD8 reqType; /* always VidModeReqCode */
410 CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSetViewPort */
416 } xXF86VidModeSetViewPortReq;
417 #define sz_xXF86VidModeSetViewPortReq 16
422 CARD16 sequenceNumber B16;
426 CARD32 maxclocks B32;
430 } xXF86VidModeGetDotClocksReply;
431 #define sz_xXF86VidModeGetDotClocksReply 32
433 typedef struct _XF86VidModeSetClientVersion {
434 CARD8 reqType; /* always XF86VidModeReqCode */
435 CARD8 xf86vidmodeReqType;
439 } xXF86VidModeSetClientVersionReq;
440 #define sz_xXF86VidModeSetClientVersionReq 8
442 typedef struct _XF86VidModeGetGamma {
443 CARD8 reqType; /* always XF86VidModeReqCode */
444 CARD8 xf86vidmodeReqType;
454 } xXF86VidModeGetGammaReq;
455 #define sz_xXF86VidModeGetGammaReq 32
460 CARD16 sequenceNumber B16;
468 } xXF86VidModeGetGammaReply;
469 #define sz_xXF86VidModeGetGammaReply 32
471 typedef struct _XF86VidModeSetGamma {
472 CARD8 reqType; /* always XF86VidModeReqCode */
473 CARD8 xf86vidmodeReqType;
483 } xXF86VidModeSetGammaReq;
484 #define sz_xXF86VidModeSetGammaReq 32
487 typedef struct _XF86VidModeSetGammaRamp {
488 CARD8 reqType; /* always XF86VidModeReqCode */
489 CARD8 xf86vidmodeReqType;
493 } xXF86VidModeSetGammaRampReq;
494 #define sz_xXF86VidModeSetGammaRampReq 8
496 typedef struct _XF86VidModeGetGammaRamp {
497 CARD8 reqType; /* always XF86VidModeReqCode */
498 CARD8 xf86vidmodeReqType;
502 } xXF86VidModeGetGammaRampReq;
503 #define sz_xXF86VidModeGetGammaRampReq 8
508 CARD16 sequenceNumber B16;
517 } xXF86VidModeGetGammaRampReply;
518 #define sz_xXF86VidModeGetGammaRampReply 32
520 typedef struct _XF86VidModeGetGammaRampSize {
521 CARD8 reqType; /* always XF86VidModeReqCode */
522 CARD8 xf86vidmodeReqType;
526 } xXF86VidModeGetGammaRampSizeReq;
527 #define sz_xXF86VidModeGetGammaRampSizeReq 8
532 CARD16 sequenceNumber B16;
541 } xXF86VidModeGetGammaRampSizeReply;
542 #define sz_xXF86VidModeGetGammaRampSizeReply 32
545 #endif /* _XF86VIDMODESTR_H_ */