comparison src/video/Xext/extensions/xf86vmode.h @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents 585a7e1285ae
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
84 #define XF86VidModeZoomLocked 6 84 #define XF86VidModeZoomLocked 6
85 #define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1) 85 #define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
86 86
87 #ifndef _XF86VIDMODE_SERVER_ 87 #ifndef _XF86VIDMODE_SERVER_
88 88
89 typedef struct { 89 typedef struct
90 unsigned short hdisplay; 90 {
91 unsigned short hsyncstart; 91 unsigned short hdisplay;
92 unsigned short hsyncend; 92 unsigned short hsyncstart;
93 unsigned short htotal; 93 unsigned short hsyncend;
94 unsigned short hskew; 94 unsigned short htotal;
95 unsigned short vdisplay; 95 unsigned short hskew;
96 unsigned short vsyncstart; 96 unsigned short vdisplay;
97 unsigned short vsyncend; 97 unsigned short vsyncstart;
98 unsigned short vtotal; 98 unsigned short vsyncend;
99 unsigned int flags; 99 unsigned short vtotal;
100 int privsize; 100 unsigned int flags;
101 int privsize;
101 #if defined(__cplusplus) || defined(c_plusplus) 102 #if defined(__cplusplus) || defined(c_plusplus)
102 /* private is a C++ reserved word */ 103 /* private is a C++ reserved word */
103 INT32 *c_private; 104 INT32 *c_private;
104 #else 105 #else
105 INT32 *private; 106 INT32 *private;
106 #endif 107 #endif
107 } SDL_NAME(XF86VidModeModeLine); 108 } SDL_NAME (XF86VidModeModeLine);
108 109
109 typedef struct { 110 typedef struct
110 unsigned int dotclock; 111 {
111 unsigned short hdisplay; 112 unsigned int dotclock;
112 unsigned short hsyncstart; 113 unsigned short hdisplay;
113 unsigned short hsyncend; 114 unsigned short hsyncstart;
114 unsigned short htotal; 115 unsigned short hsyncend;
115 unsigned short hskew; 116 unsigned short htotal;
116 unsigned short vdisplay; 117 unsigned short hskew;
117 unsigned short vsyncstart; 118 unsigned short vdisplay;
118 unsigned short vsyncend; 119 unsigned short vsyncstart;
119 unsigned short vtotal; 120 unsigned short vsyncend;
120 unsigned int flags; 121 unsigned short vtotal;
121 int privsize; 122 unsigned int flags;
123 int privsize;
122 #if defined(__cplusplus) || defined(c_plusplus) 124 #if defined(__cplusplus) || defined(c_plusplus)
123 /* private is a C++ reserved word */ 125 /* private is a C++ reserved word */
124 INT32 *c_private; 126 INT32 *c_private;
125 #else 127 #else
126 INT32 *private; 128 INT32 *private;
127 #endif 129 #endif
128 } SDL_NAME(XF86VidModeModeInfo); 130 } SDL_NAME (XF86VidModeModeInfo);
129 131
130 typedef struct { 132 typedef struct
131 float hi; 133 {
132 float lo; 134 float hi;
133 } SDL_NAME(XF86VidModeSyncRange); 135 float lo;
134 136 } SDL_NAME (XF86VidModeSyncRange);
135 typedef struct { 137
136 char* vendor; 138 typedef struct
137 char* model; 139 {
138 float EMPTY; 140 char *vendor;
139 unsigned char nhsync; 141 char *model;
140 SDL_NAME(XF86VidModeSyncRange)* hsync; 142 float EMPTY;
141 unsigned char nvsync; 143 unsigned char nhsync;
142 SDL_NAME(XF86VidModeSyncRange)* vsync; 144 SDL_NAME (XF86VidModeSyncRange) * hsync;
143 } SDL_NAME(XF86VidModeMonitor); 145 unsigned char nvsync;
144 146 SDL_NAME (XF86VidModeSyncRange) * vsync;
145 typedef struct { 147 } SDL_NAME (XF86VidModeMonitor);
146 int type; /* of event */ 148
147 unsigned long serial; /* # of last request processed by server */ 149 typedef struct
148 Bool send_event; /* true if this came from a SendEvent req */ 150 {
149 Display *display; /* Display the event was read from */ 151 int type; /* of event */
150 Window root; /* root window of event screen */ 152 unsigned long serial; /* # of last request processed by server */
151 int state; /* What happened */ 153 Bool send_event; /* true if this came from a SendEvent req */
152 int kind; /* What happened */ 154 Display *display; /* Display the event was read from */
153 Bool forced; /* extents of new region */ 155 Window root; /* root window of event screen */
154 Time time; /* event timestamp */ 156 int state; /* What happened */
155 } SDL_NAME(XF86VidModeNotifyEvent); 157 int kind; /* What happened */
156 158 Bool forced; /* extents of new region */
157 typedef struct { 159 Time time; /* event timestamp */
158 float red; /* Red Gamma value */ 160 } SDL_NAME (XF86VidModeNotifyEvent);
159 float green; /* Green Gamma value */ 161
160 float blue; /* Blue Gamma value */ 162 typedef struct
161 } SDL_NAME(XF86VidModeGamma); 163 {
164 float red; /* Red Gamma value */
165 float green; /* Green Gamma value */
166 float blue; /* Blue Gamma value */
167 } SDL_NAME (XF86VidModeGamma);
162 168
163 169
164 #define SDL_XF86VidModeSelectNextMode(disp, scr) \ 170 #define SDL_XF86VidModeSelectNextMode(disp, scr) \
165 SDL_NAME(XF86VidModeSwitchMode)(disp, scr, 1) 171 SDL_NAME(XF86VidModeSwitchMode)(disp, scr, 1)
166 #define SDL_XF86VidModeSelectPrevMode(disp, scr) \ 172 #define SDL_XF86VidModeSelectPrevMode(disp, scr) \
167 SDL_NAME(XF86VidModeSwitchMode)(disp, scr, -1) 173 SDL_NAME(XF86VidModeSwitchMode)(disp, scr, -1)
168 174
169 _XFUNCPROTOBEGIN 175 _XFUNCPROTOBEGIN
170 176 Bool SDL_NAME (XF86VidModeQueryVersion) (Display * /* dpy */ ,
171 Bool SDL_NAME(XF86VidModeQueryVersion)( 177 int * /* majorVersion */ ,
172 Display* /* dpy */, 178 int * /* minorVersion */
173 int* /* majorVersion */, 179 );
174 int* /* minorVersion */ 180
175 ); 181 Bool SDL_NAME (XF86VidModeQueryExtension) (Display * /* dpy */ ,
176 182 int * /* event_base */ ,
177 Bool SDL_NAME(XF86VidModeQueryExtension)( 183 int * /* error_base */
178 Display* /* dpy */, 184 );
179 int* /* event_base */, 185
180 int* /* error_base */ 186 Bool SDL_NAME (XF86VidModeSetClientVersion) (Display * /* dpy */
181 ); 187 );
182 188
183 Bool SDL_NAME(XF86VidModeSetClientVersion)( 189 Bool SDL_NAME (XF86VidModeGetModeLine) (Display * /* dpy */ ,
184 Display* /* dpy */ 190 int /* screen */ ,
185 ); 191 int * /* dotclock */ ,
186 192 SDL_NAME (XF86VidModeModeLine) * /* modeline */
187 Bool SDL_NAME(XF86VidModeGetModeLine)( 193 );
188 Display* /* dpy */, 194
189 int /* screen */, 195 Bool SDL_NAME (XF86VidModeGetAllModeLines) (Display * /* dpy */ ,
190 int* /* dotclock */, 196 int /* screen */ ,
191 SDL_NAME(XF86VidModeModeLine)* /* modeline */ 197 int * /* modecount */ ,
192 ); 198 SDL_NAME (XF86VidModeModeInfo) *** /* modelinesPtr */
193 199 );
194 Bool SDL_NAME(XF86VidModeGetAllModeLines)( 200
195 Display* /* dpy */, 201 Bool SDL_NAME (XF86VidModeAddModeLine) (Display * /* dpy */ ,
196 int /* screen */, 202 int /* screen */ ,
197 int* /* modecount */, 203 SDL_NAME (XF86VidModeModeInfo) *
198 SDL_NAME(XF86VidModeModeInfo)*** /* modelinesPtr */ 204 /* new modeline */ ,
199 ); 205 SDL_NAME (XF86VidModeModeInfo) * /* after modeline */
200 206 );
201 Bool SDL_NAME(XF86VidModeAddModeLine)( 207
202 Display* /* dpy */, 208 Bool SDL_NAME (XF86VidModeDeleteModeLine) (Display * /* dpy */ ,
203 int /* screen */, 209 int /* screen */ ,
204 SDL_NAME(XF86VidModeModeInfo)* /* new modeline */, 210 SDL_NAME (XF86VidModeModeInfo) * /* modeline */
205 SDL_NAME(XF86VidModeModeInfo)* /* after modeline */ 211 );
206 ); 212
207 213 Bool SDL_NAME (XF86VidModeModModeLine) (Display * /* dpy */ ,
208 Bool SDL_NAME(XF86VidModeDeleteModeLine)( 214 int /* screen */ ,
209 Display* /* dpy */, 215 SDL_NAME (XF86VidModeModeLine) * /* modeline */
210 int /* screen */, 216 );
211 SDL_NAME(XF86VidModeModeInfo)* /* modeline */ 217
212 ); 218 Status SDL_NAME (XF86VidModeValidateModeLine) (Display * /* dpy */ ,
213 219 int /* screen */ ,
214 Bool SDL_NAME(XF86VidModeModModeLine)( 220 SDL_NAME (XF86VidModeModeInfo) * /* modeline */
215 Display* /* dpy */, 221 );
216 int /* screen */, 222
217 SDL_NAME(XF86VidModeModeLine)* /* modeline */ 223 Bool SDL_NAME (XF86VidModeSwitchMode) (Display * /* dpy */ ,
218 ); 224 int /* screen */ ,
219 225 int /* zoom */
220 Status SDL_NAME(XF86VidModeValidateModeLine)( 226 );
221 Display* /* dpy */, 227
222 int /* screen */, 228 Bool SDL_NAME (XF86VidModeSwitchToMode) (Display * /* dpy */ ,
223 SDL_NAME(XF86VidModeModeInfo)* /* modeline */ 229 int /* screen */ ,
224 ); 230 SDL_NAME (XF86VidModeModeInfo) * /* modeline */
225 231 );
226 Bool SDL_NAME(XF86VidModeSwitchMode)( 232
227 Display* /* dpy */, 233 Bool SDL_NAME (XF86VidModeLockModeSwitch) (Display * /* dpy */ ,
228 int /* screen */, 234 int /* screen */ ,
229 int /* zoom */ 235 int /* lock */
230 ); 236 );
231 237
232 Bool SDL_NAME(XF86VidModeSwitchToMode)( 238 Bool SDL_NAME (XF86VidModeGetMonitor) (Display * /* dpy */ ,
233 Display* /* dpy */, 239 int /* screen */ ,
234 int /* screen */, 240 SDL_NAME (XF86VidModeMonitor) * /* monitor */
235 SDL_NAME(XF86VidModeModeInfo)* /* modeline */ 241 );
236 ); 242
237 243 Bool SDL_NAME (XF86VidModeGetViewPort) (Display * /* dpy */ ,
238 Bool SDL_NAME(XF86VidModeLockModeSwitch)( 244 int /* screen */ ,
239 Display* /* dpy */, 245 int * /* x return */ ,
240 int /* screen */, 246 int * /* y return */
241 int /* lock */ 247 );
242 ); 248
243 249 Bool SDL_NAME (XF86VidModeSetViewPort) (Display * /* dpy */ ,
244 Bool SDL_NAME(XF86VidModeGetMonitor)( 250 int /* screen */ ,
245 Display* /* dpy */, 251 int /* x */ ,
246 int /* screen */, 252 int /* y */
247 SDL_NAME(XF86VidModeMonitor)* /* monitor */ 253 );
248 ); 254
249 255 Bool SDL_NAME (XF86VidModeGetDotClocks) (Display * /* dpy */ ,
250 Bool SDL_NAME(XF86VidModeGetViewPort)( 256 int /* screen */ ,
251 Display* /* dpy */, 257 int * /* flags return */ ,
252 int /* screen */, 258 int * /* number of clocks return */ ,
253 int* /* x return */, 259 int * /* max dot clock return */ ,
254 int* /* y return */ 260 int ** /* clocks return */
255 ); 261 );
256 262
257 Bool SDL_NAME(XF86VidModeSetViewPort)( 263 Bool SDL_NAME (XF86VidModeGetGamma) (Display * /* dpy */ ,
258 Display* /* dpy */, 264 int /* screen */ ,
259 int /* screen */, 265 SDL_NAME (XF86VidModeGamma) * /* Gamma */
260 int /* x */, 266 );
261 int /* y */ 267
262 ); 268 Bool SDL_NAME (XF86VidModeSetGamma) (Display * /* dpy */ ,
263 269 int /* screen */ ,
264 Bool SDL_NAME(XF86VidModeGetDotClocks)( 270 SDL_NAME (XF86VidModeGamma) * /* Gamma */
265 Display* /* dpy */, 271 );
266 int /* screen */, 272
267 int* /* flags return */, 273 Bool SDL_NAME (XF86VidModeSetGammaRamp) (Display * /* dpy */ ,
268 int* /* number of clocks return */, 274 int /* screen */ ,
269 int* /* max dot clock return */, 275 int /* size */ ,
270 int** /* clocks return */ 276 unsigned short * /* red array */ ,
271 ); 277 unsigned short * /* green array */ ,
272 278 unsigned short * /* blue array */
273 Bool SDL_NAME(XF86VidModeGetGamma)( 279 );
274 Display* /* dpy */, 280
275 int /* screen */, 281 Bool SDL_NAME (XF86VidModeGetGammaRamp) (Display * /* dpy */ ,
276 SDL_NAME(XF86VidModeGamma)* /* Gamma */ 282 int /* screen */ ,
277 ); 283 int /* size */ ,
278 284 unsigned short * /* red array */ ,
279 Bool SDL_NAME(XF86VidModeSetGamma)( 285 unsigned short * /* green array */ ,
280 Display* /* dpy */, 286 unsigned short * /* blue array */
281 int /* screen */, 287 );
282 SDL_NAME(XF86VidModeGamma)* /* Gamma */ 288
283 ); 289 Bool SDL_NAME (XF86VidModeGetGammaRampSize) (Display * /* dpy */ ,
284 290 int /* screen */ ,
285 Bool SDL_NAME(XF86VidModeSetGammaRamp)( 291 int * /* size */
286 Display* /* dpy */, 292 );
287 int /* screen */,
288 int /* size */,
289 unsigned short* /* red array */,
290 unsigned short* /* green array */,
291 unsigned short* /* blue array */
292 );
293
294 Bool SDL_NAME(XF86VidModeGetGammaRamp)(
295 Display* /* dpy */,
296 int /* screen */,
297 int /* size */,
298 unsigned short* /* red array */,
299 unsigned short* /* green array */,
300 unsigned short* /* blue array */
301 );
302
303 Bool SDL_NAME(XF86VidModeGetGammaRampSize)(
304 Display* /* dpy */,
305 int /* screen */,
306 int* /* size */
307 );
308 293
309 294
310 _XFUNCPROTOEND 295 _XFUNCPROTOEND
311 296 #endif
312 #endif 297 #endif
313 298 /* vi: set ts=4 sw=4 expandtab: */
314 #endif