1 /* $XFree86: xc/include/extensions/xf86vmode.h,v 3.20.2.1 1997/07/13 14:44:57 dawes Exp $ */
4 Copyright (c) 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 /* $XConsortium: xf86vmode.h /main/9 1996/10/26 21:38:11 kaleb $ */
33 /* THIS IS NOT AN X CONSORTIUM STANDARD */
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
55 #ifdef XF86VIDMODE_EVENTS
56 #define XF86VidModeNotify 0
57 #define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
59 #define XF86VidModeNotifyMask 0x00000001
61 #define XF86VidModeNonEvent 0
62 #define XF86VidModeModeChange 1
64 #define XF86VidModeNumberEvents 0
67 #define XF86VidModeBadClock 0
68 #define XF86VidModeBadHTimings 1
69 #define XF86VidModeBadVTimings 2
70 #define XF86VidModeModeUnsuitable 3
71 #define XF86VidModeExtensionDisabled 4
72 #define XF86VidModeClientNotLocal 5
73 #define XF86VidModeZoomLocked 6
74 #define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
76 #ifndef _XF86VIDMODE_SERVER_
79 unsigned short hdisplay;
80 unsigned short hsyncstart;
81 unsigned short hsyncend;
82 unsigned short htotal;
83 unsigned short vdisplay;
84 unsigned short vsyncstart;
85 unsigned short vsyncend;
86 unsigned short vtotal;
89 #if defined(__cplusplus) || defined(c_plusplus)
90 /* private is a C++ reserved word */
95 } XF86VidModeModeLine;
98 unsigned int dotclock;
99 unsigned short hdisplay;
100 unsigned short hsyncstart;
101 unsigned short hsyncend;
102 unsigned short htotal;
103 unsigned short vdisplay;
104 unsigned short vsyncstart;
105 unsigned short vsyncend;
106 unsigned short vtotal;
109 #if defined(__cplusplus) || defined(c_plusplus)
110 /* private is a C++ reserved word */
115 } XF86VidModeModeInfo;
120 } XF86VidModeSyncRange;
126 unsigned char nhsync;
127 XF86VidModeSyncRange* hsync;
128 unsigned char nvsync;
129 XF86VidModeSyncRange* vsync;
130 } XF86VidModeMonitor;
133 int type; /* of event */
134 unsigned long serial; /* # of last request processed by server */
135 Bool send_event; /* true if this came from a SendEvent req */
136 Display *display; /* Display the event was read from */
137 Window root; /* root window of event screen */
138 int state; /* What happened */
139 int kind; /* What happened */
140 Bool forced; /* extents of new region */
141 Time time; /* event timestamp */
142 } XF86VidModeNotifyEvent;
144 #define XF86VidModeSelectNextMode(disp, scr) \
145 XF86VidModeSwitchMode(disp, scr, 1)
146 #define XF86VidModeSelectPrevMode(disp, scr) \
147 XF86VidModeSwitchMode(disp, scr, -1)
151 Bool XF86VidModeQueryVersion(
152 #if NeedFunctionPrototypes
154 int* /* majorVersion */,
155 int* /* minorVersion */
159 Bool XF86VidModeQueryExtension(
160 #if NeedFunctionPrototypes
162 int* /* event_base */,
163 int* /* error_base */
167 Bool XF86VidModeGetModeLine(
168 #if NeedFunctionPrototypes
172 XF86VidModeModeLine* /* modeline */
176 Bool XF86VidModeGetAllModeLines(
177 #if NeedFunctionPrototypes
180 int* /* modecount */,
181 XF86VidModeModeInfo*** /* modelinesPtr */
185 Bool XF86VidModeAddModeLine(
186 #if NeedFunctionPrototypes
189 XF86VidModeModeInfo* /* new modeline */,
190 XF86VidModeModeInfo* /* after modeline */
194 Bool XF86VidModeDeleteModeLine(
195 #if NeedFunctionPrototypes
198 XF86VidModeModeInfo* /* modeline */
202 Bool XF86VidModeModModeLine(
203 #if NeedFunctionPrototypes
206 XF86VidModeModeLine* /* modeline */
210 Status XF86VidModeValidateModeLine(
211 #if NeedFunctionPrototypes
214 XF86VidModeModeInfo* /* modeline */
218 Bool XF86VidModeSwitchMode(
219 #if NeedFunctionPrototypes
226 Bool XF86VidModeSwitchToMode(
227 #if NeedFunctionPrototypes
230 XF86VidModeModeInfo* /* modeline */
234 Bool XF86VidModeLockModeSwitch(
235 #if NeedFunctionPrototypes
242 Bool XF86VidModeGetMonitor(
243 #if NeedFunctionPrototypes
246 XF86VidModeMonitor* /* monitor */
250 Bool XF86VidModeGetViewPort(
251 #if NeedFunctionPrototypes
259 Bool XF86VidModeSetViewPort(
260 #if NeedFunctionPrototypes