comparison src/video/SDL_sysvideo.h @ 1361:19418e4422cb

New configure-based build system. Still work in progress, but much improved
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Feb 2006 10:11:48 +0000
parents 450721ad5436
children d910939febfa
comparison
equal deleted inserted replaced
1360:70a9cfb4cf1b 1361:19418e4422cb
32 This is designed to be easily converted to C++ in the future. 32 This is designed to be easily converted to C++ in the future.
33 */ 33 */
34 34
35 /* OpenGL is pretty much available on all Windows systems */ 35 /* OpenGL is pretty much available on all Windows systems */
36 #ifdef WIN32 36 #ifdef WIN32
37 #ifndef _WIN32_WCE
38 #define HAVE_OPENGL
39 #endif
40 #include "SDL_windows.h" 37 #include "SDL_windows.h"
41 #endif 38 #endif
42 39
43 #ifdef HAVE_OPENGL 40 #if SDL_VIDEO_OPENGL
44 #ifdef MACOSX 41 #ifdef MACOSX
45 #include <OpenGL/gl.h> /* OpenGL.framework */ 42 #include <OpenGL/gl.h> /* OpenGL.framework */
46 #else 43 #else
47 #include <GL/gl.h> 44 #include <GL/gl.h>
48 #endif /* MACOSX */ 45 #endif /* MACOSX */
49 #endif /* HAVE_OPENGL */ 46 #endif /* SDL_VIDEO_OPENGL */
50 47
51 /* The SDL video driver */ 48 /* The SDL video driver */
52 typedef struct SDL_VideoDevice SDL_VideoDevice; 49 typedef struct SDL_VideoDevice SDL_VideoDevice;
53 50
54 /* Define the SDL video driver structure */ 51 /* Define the SDL video driver structure */
192 189
193 /* Swap the current buffers in double buffer mode. */ 190 /* Swap the current buffers in double buffer mode. */
194 void (*GL_SwapBuffers)(_THIS); 191 void (*GL_SwapBuffers)(_THIS);
195 192
196 /* OpenGL functions for SDL_OPENGLBLIT */ 193 /* OpenGL functions for SDL_OPENGLBLIT */
197 #ifdef HAVE_OPENGL 194 #if SDL_VIDEO_OPENGL
198 #ifndef WIN32 195 #ifndef WIN32
199 #define WINAPI 196 #define WINAPI
200 #endif 197 #endif
201 #define SDL_PROC(ret,func,params) ret (WINAPI *func) params; 198 #define SDL_PROC(ret,func,params) ret (WINAPI *func) params;
202 #include "SDL_glfuncs.h" 199 #include "SDL_glfuncs.h"
324 const char *desc; 321 const char *desc;
325 int (*available)(void); 322 int (*available)(void);
326 SDL_VideoDevice *(*create)(int devindex); 323 SDL_VideoDevice *(*create)(int devindex);
327 } VideoBootStrap; 324 } VideoBootStrap;
328 325
329 #ifdef ENABLE_X11 326 #if SDL_VIDEO_DRIVER_QUARTZ
327 extern VideoBootStrap QZ_bootstrap;
328 #endif
329 #if SDL_VIDEO_DRIVER_X11
330 extern VideoBootStrap X11_bootstrap; 330 extern VideoBootStrap X11_bootstrap;
331 #endif 331 #endif
332 #ifdef ENABLE_DGA 332 #if SDL_VIDEO_DRIVER_DGA
333 extern VideoBootStrap DGA_bootstrap; 333 extern VideoBootStrap DGA_bootstrap;
334 #endif 334 #endif
335 #ifdef ENABLE_NANOX 335 #if SDL_VIDEO_DRIVER_NANOX
336 extern VideoBootStrap NX_bootstrap; 336 extern VideoBootStrap NX_bootstrap;
337 #endif 337 #endif
338 #ifdef ENABLE_IPOD 338 #if SDL_VIDEO_DRIVER_IPOD
339 extern VideoBootStrap iPod_bootstrap; 339 extern VideoBootStrap iPod_bootstrap;
340 #endif 340 #endif
341 #ifdef ENABLE_FBCON 341 #if SDL_VIDEO_DRIVER_QTOPIA
342 extern VideoBootStrap Qtopia_bootstrap;
343 #endif
344 #if SDL_VIDEO_DRIVER_WSCONS
345 extern VideoBootStrap WSCONS_bootstrap;
346 #endif
347 #if SDL_VIDEO_DRIVER_FBCON
342 extern VideoBootStrap FBCON_bootstrap; 348 extern VideoBootStrap FBCON_bootstrap;
343 #endif 349 #endif
344 #ifdef ENABLE_DIRECTFB 350 #if SDL_VIDEO_DRIVER_DIRECTFB
345 extern VideoBootStrap DirectFB_bootstrap; 351 extern VideoBootStrap DirectFB_bootstrap;
346 #endif 352 #endif
347 #ifdef ENABLE_PS2GS 353 #if SDL_VIDEO_DRIVER_PS2GS
348 extern VideoBootStrap PS2GS_bootstrap; 354 extern VideoBootStrap PS2GS_bootstrap;
349 #endif 355 #endif
350 #ifdef ENABLE_GGI 356 #if SDL_VIDEO_DRIVER_GGI
351 extern VideoBootStrap GGI_bootstrap; 357 extern VideoBootStrap GGI_bootstrap;
352 #endif 358 #endif
353 #ifdef ENABLE_VGL 359 #if SDL_VIDEO_DRIVER_VGL
354 extern VideoBootStrap VGL_bootstrap; 360 extern VideoBootStrap VGL_bootstrap;
355 #endif 361 #endif
356 #ifdef ENABLE_SVGALIB 362 #if SDL_VIDEO_DRIVER_SVGALIB
357 extern VideoBootStrap SVGALIB_bootstrap; 363 extern VideoBootStrap SVGALIB_bootstrap;
358 #endif 364 #endif
359 #ifdef ENABLE_AALIB 365 #if SDL_VIDEO_DRIVER_GAPI
366 extern VideoBootStrap GAPI_bootstrap;
367 #endif
368 #if SDL_VIDEO_DRIVER_WINDIB
369 extern VideoBootStrap WINDIB_bootstrap;
370 #endif
371 #if SDL_VIDEO_DRIVER_DDRAW
372 extern VideoBootStrap DIRECTX_bootstrap;
373 #endif
374 #if SDL_VIDEO_DRIVER_BWINDOW
375 extern VideoBootStrap BWINDOW_bootstrap;
376 #endif
377 #if SDL_VIDEO_DRIVER_TOOLBOX
378 extern VideoBootStrap TOOLBOX_bootstrap;
379 #endif
380 #if SDL_VIDEO_DRIVER_DRAWSPROCKET
381 extern VideoBootStrap DSp_bootstrap;
382 #endif
383 #if SDL_VIDEO_DRIVER_CYBERGRAPHICS
384 extern VideoBootStrap CGX_bootstrap;
385 #endif
386 #if SDL_VIDEO_DRIVER_PHOTON
387 extern VideoBootStrap ph_bootstrap;
388 #endif
389 #if SDL_VIDEO_DRIVER_EPOC
390 extern VideoBootStrap EPOC_bootstrap;
391 #endif
392 #if SDL_VIDEO_DRIVER_XBIOS
393 extern VideoBootStrap XBIOS_bootstrap;
394 #endif
395 #if SDL_VIDEO_DRIVER_GEM
396 extern VideoBootStrap GEM_bootstrap;
397 #endif
398 #if SDL_VIDEO_DRIVER_PICOGUI
399 extern VideoBootStrap PG_bootstrap;
400 #endif
401 #if SDL_VIDEO_DRIVER_DC
402 extern VideoBootStrap DC_bootstrap;
403 #endif
404 #if SDL_VIDEO_DRIVER_RISCOS
405 extern VideoBootStrap RISCOS_bootstrap;
406 #endif
407 #if SDL_VIDEO_DRIVER_OS2FS
408 extern VideoBootStrap OS2FSLib_bootstrap;
409 #endif
410 #if SDL_VIDEO_DRIVER_AALIB
360 extern VideoBootStrap AALIB_bootstrap; 411 extern VideoBootStrap AALIB_bootstrap;
361 #endif 412 #endif
362 #ifdef ENABLE_GAPI 413 #if SDL_VIDEO_DRIVER_DUMMY
363 extern VideoBootStrap GAPI_bootstrap;
364 #endif
365 #ifdef ENABLE_WINDIB
366 extern VideoBootStrap WINDIB_bootstrap;
367 #endif
368 #ifdef ENABLE_DIRECTX
369 extern VideoBootStrap DIRECTX_bootstrap;
370 #endif
371 #ifdef ENABLE_BWINDOW
372 extern VideoBootStrap BWINDOW_bootstrap;
373 #endif
374 /* MacOS X gets the proper defines from configure */
375 #if defined(macintosh) && !defined(MACOSX)
376 #define ENABLE_TOOLBOX
377 #if !TARGET_API_MAC_CARBON
378 #define ENABLE_DRAWSPROCKET
379 #endif
380 #endif
381 #ifdef ENABLE_TOOLBOX
382 extern VideoBootStrap TOOLBOX_bootstrap;
383 #endif
384 #ifdef ENABLE_DRAWSPROCKET
385 extern VideoBootStrap DSp_bootstrap;
386 #endif
387 #ifdef ENABLE_QUARTZ
388 extern VideoBootStrap QZ_bootstrap;
389 #endif
390 #ifdef ENABLE_CYBERGRAPHICS
391 extern VideoBootStrap CGX_bootstrap;
392 #endif
393 #ifdef ENABLE_PHOTON
394 extern VideoBootStrap ph_bootstrap;
395 #endif
396 #ifdef ENABLE_EPOC
397 extern VideoBootStrap EPOC_bootstrap;
398 #endif
399 #ifdef ENABLE_DUMMYVIDEO
400 extern VideoBootStrap DUMMY_bootstrap; 414 extern VideoBootStrap DUMMY_bootstrap;
401 #endif 415 #endif
402 #ifdef ENABLE_XBIOS 416
403 extern VideoBootStrap XBIOS_bootstrap;
404 #endif
405 #ifdef ENABLE_GEM
406 extern VideoBootStrap GEM_bootstrap;
407 #endif
408 #ifdef ENABLE_QTOPIA
409 extern VideoBootStrap Qtopia_bootstrap;
410 #endif
411 #ifdef ENABLE_WSCONS
412 extern VideoBootStrap WSCONS_bootstrap;
413 #endif
414 #ifdef ENABLE_PICOGUI
415 extern VideoBootStrap PG_bootstrap;
416 #endif
417 #ifdef ENABLE_DC
418 extern VideoBootStrap DC_bootstrap;
419 #endif
420 #ifdef ENABLE_RISCOS
421 extern VideoBootStrap RISCOS_bootstrap;
422 #endif
423 #ifdef __OS2__
424 extern VideoBootStrap OS2FSLib_bootstrap;
425 #endif
426 /* This is the current video device */ 417 /* This is the current video device */
427 extern SDL_VideoDevice *current_video; 418 extern SDL_VideoDevice *current_video;
428 419
429 #define SDL_VideoSurface (current_video->screen) 420 #define SDL_VideoSurface (current_video->screen)
430 #define SDL_ShadowSurface (current_video->shadow) 421 #define SDL_ShadowSurface (current_video->shadow)