19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL - Simple DirectMedia Layer 39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Copyright (C) 1997-2012 Sam Lantinga 49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This library is free software; you can redistribute it and/or 69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall modify it under the terms of the GNU Lesser General Public 79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall License as published by the Free Software Foundation; either 89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall version 2.1 of the License, or (at your option) any later version. 99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This library is distributed in the hope that it will be useful, 119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall but WITHOUT ANY WARRANTY; without even the implied warranty of 129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Lesser General Public License for more details. 149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall You should have received a copy of the GNU Lesser General Public 169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall License along with this library; if not, write to the Free Software 179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Sam Lantinga 209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall slouken@libsdl.org 219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*/ 229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_config.h" 239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifndef _SDL_sysvideo_h 259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define _SDL_sysvideo_h 269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_mouse.h" 289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define SDL_PROTOTYPES_ONLY 299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_syswm.h" 309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#undef SDL_PROTOTYPES_ONLY 319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* This file prototypes the video driver implementation. 339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This is designed to be easily converted to C++ in the future. 349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_OPENGL 379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_opengl.h" 389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* SDL_VIDEO_OPENGL */ 399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* The SDL video driver */ 419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_VideoDevice SDL_VideoDevice; 429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Define the SDL video driver structure */ 449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define _THIS SDL_VideoDevice *_this 459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifndef _STATUS 469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define _STATUS SDL_status *status 479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_VideoDevice { 499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* The name of this video driver */ 519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall const char *name; 529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Initialization/Query functions */ 559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Initialize the native video subsystem, filling 'vformat' with the 579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall "best" display pixel format, returning 0 or -1 if there's an error. 589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*VideoInit)(_THIS, SDL_PixelFormat *vformat); 609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* List the available video modes for the given pixel format, sorted 629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall from largest to smallest. 639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Rect **(*ListModes)(_THIS, SDL_PixelFormat *format, Uint32 flags); 659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Set the requested video mode, returning a surface which will be 679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall set to the SDL_VideoSurface. The width and height will already 689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall be verified by ListModes(), and the video subsystem is free to 699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall set the mode to a supported bit depth different from the one 709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall specified -- the desired bpp will be emulated with a shadow 719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall surface if necessary. If a new mode is returned, this function 729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall should take care of cleaning up the current mode. 739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Surface *(*SetVideoMode)(_THIS, SDL_Surface *current, 759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int width, int height, int bpp, Uint32 flags); 769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Toggle the fullscreen mode */ 789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*ToggleFullScreen)(_THIS, int on); 799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* This is called after the video mode has been set, to get the 819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall initial mouse state. It should queue events as necessary to 829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall properly represent the current mouse focus and position. 839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*UpdateMouse)(_THIS); 859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Create a YUV video surface (possibly overlay) of the given 879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall format. The hardware should be able to perform at least 2x 889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall scaling on display. 899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Overlay *(*CreateYUVOverlay)(_THIS, int width, int height, 919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint32 format, SDL_Surface *display); 929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Sets the color entries { firstcolor .. (firstcolor+ncolors-1) } 949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall of the physical palette to those in 'colors'. If the device is 959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall using a software palette (SDL_HWPALETTE not set), then the 969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall changes are reflected in the logical palette of the screen 979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall as well. 989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall The return value is 1 if all entries could be set properly 999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall or 0 otherwise. 1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*SetColors)(_THIS, int firstcolor, int ncolors, 1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Color *colors); 1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* This pointer should exist in the native video subsystem and should 1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall point to an appropriate update function for the current video mode 1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*UpdateRects)(_THIS, int numrects, SDL_Rect *rects); 1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Reverse the effects VideoInit() -- called if VideoInit() fails 1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall or if the application is shutting down the video subsystem. 1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*VideoQuit)(_THIS); 1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Hardware acceleration functions */ 1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Information about the video hardware */ 1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_VideoInfo info; 1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* The pixel format used when SDL_CreateRGBSurface creates SDL_HWSURFACEs with alpha */ 1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_PixelFormat* displayformatalphapixel; 1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Allocates a surface in video memory */ 1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*AllocHWSurface)(_THIS, SDL_Surface *surface); 1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Sets the hardware accelerated blit function, if any, based 1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall on the current flags of the surface (colorkey, alpha, etc.) 1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*CheckHWBlit)(_THIS, SDL_Surface *src, SDL_Surface *dst); 1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Fills a surface rectangle with the given color */ 1329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*FillHWRect)(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color); 1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Sets video mem colorkey and accelerated blit function */ 1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*SetHWColorKey)(_THIS, SDL_Surface *surface, Uint32 key); 1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Sets per surface hardware alpha value */ 1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*SetHWAlpha)(_THIS, SDL_Surface *surface, Uint8 value); 1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Returns a readable/writable surface */ 1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*LockHWSurface)(_THIS, SDL_Surface *surface); 1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*UnlockHWSurface)(_THIS, SDL_Surface *surface); 1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Performs hardware flipping */ 1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*FlipHWSurface)(_THIS, SDL_Surface *surface); 1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Frees a previously allocated video surface */ 1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*FreeHWSurface)(_THIS, SDL_Surface *surface); 1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Gamma support */ 1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint16 *gamma; 1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Set the gamma correction directly (emulated with gamma ramps) */ 1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*SetGamma)(_THIS, float red, float green, float blue); 1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Get the gamma correction directly (emulated with gamma ramps) */ 1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*GetGamma)(_THIS, float *red, float *green, float *blue); 1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Set the gamma ramp */ 1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*SetGammaRamp)(_THIS, Uint16 *ramp); 1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Get the gamma ramp */ 1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*GetGammaRamp)(_THIS, Uint16 *ramp); 1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* OpenGL support */ 1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Sets the dll to use for OpenGL and loads it */ 1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*GL_LoadLibrary)(_THIS, const char *path); 1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Retrieves the address of a function in the gl library */ 1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void* (*GL_GetProcAddress)(_THIS, const char *proc); 1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Get attribute information from the windowing system. */ 1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*GL_GetAttribute)(_THIS, SDL_GLattr attrib, int* value); 1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Make the context associated with this driver current */ 1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*GL_MakeCurrent)(_THIS); 1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Swap the current buffers in double buffer mode. */ 1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*GL_SwapBuffers)(_THIS); 1849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* OpenGL functions for SDL_OPENGLBLIT */ 1869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_OPENGL 1879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if !defined(__WIN32__) 1889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define WINAPI 1899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 1909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define SDL_PROC(ret,func,params) ret (WINAPI *func) params; 1919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_glfuncs.h" 1929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#undef SDL_PROC 1939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Texture id */ 1959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall GLuint texture; 1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int is_32bit; 1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Window manager functions */ 2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Set the title and icon text */ 2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*SetCaption)(_THIS, const char *title, const char *icon); 2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Set the window icon image */ 2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*SetIcon)(_THIS, SDL_Surface *icon, Uint8 *mask); 2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Iconify the window. 2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This function returns 1 if there is a window manager and the 2109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall window was actually iconified, it returns 0 otherwise. 2119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 2129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*IconifyWindow)(_THIS); 2139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Grab or ungrab keyboard and mouse input */ 2159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_GrabMode (*GrabInput)(_THIS, SDL_GrabMode mode); 2169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Get some platform dependent window information */ 2189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*GetWMInfo)(_THIS, SDL_SysWMinfo *info); 2199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 220e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall /* set window position */ 221e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall void (*SetWindowPos)(_THIS, int x, int y); 222e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall 223e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall /* get window position */ 224e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall void (*GetWindowPos)(_THIS, int *px, int *py); 225e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall 226e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall /* determine if the window is fully visible on screen */ 227e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall int (*IsWindowVisible)(_THIS, int recenter); 228e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall 229e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall /* get main monitor's resolution */ 230e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall int (*GetMonitorDPI)(_THIS, int *xdpi, int *ydpi); 231e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall 232e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall /* get nearest monitor's rectangle */ 233e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall int (*GetMonitorRect)(_THIS, SDL_Rect* rect); 234e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall 2359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 2369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Cursor manager functions */ 2379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Free a window manager cursor 2399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This function can be NULL if CreateWMCursor is also NULL. 2409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 2419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*FreeWMCursor)(_THIS, WMcursor *cursor); 2429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* If not NULL, create a black/white window manager cursor */ 2449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall WMcursor *(*CreateWMCursor)(_THIS, 2459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y); 2469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Show the specified cursor, or hide if cursor is NULL */ 2489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*ShowWMCursor)(_THIS, WMcursor *cursor); 2499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Warp the window manager cursor to (x,y) 2519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall If NULL, a mouse motion event is posted internally. 2529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 2539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*WarpWMCursor)(_THIS, Uint16 x, Uint16 y); 2549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* If not NULL, this is called when a mouse motion event occurs */ 2569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*MoveWMCursor)(_THIS, int x, int y); 2579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Determine whether the mouse should be in relative mode or not. 2599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This function is called when the input grab state or cursor 2609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall visibility state changes. 2619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall If the cursor is not visible, and the input is grabbed, the 2629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall driver can place the mouse in relative mode, which may result 2639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall in higher accuracy sampling of the pointer motion. 2649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 2659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*CheckMouseMode)(_THIS); 2669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 2689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Event manager functions */ 2699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Initialize keyboard mapping for this driver */ 2719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*InitOSKeymap)(_THIS); 2729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Handle any queued OS events */ 2749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*PumpEvents)(_THIS); 2759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 2779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Data common to all drivers */ 2789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Surface *screen; 2799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Surface *shadow; 2809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Surface *visible; 2819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Palette *physpal; /* physical palette, if != logical palette */ 2829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Color *gammacols; /* gamma-corrected colours, or NULL */ 2839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall char *wm_title; 2849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall char *wm_icon; 2859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int offset_x; 2869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int offset_y; 2879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_GrabMode input_grab; 2889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Driver information flags */ 2909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int handles_any_size; /* Driver handles any size video mode */ 2919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 2929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 2939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Data used by the GL drivers */ 2949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct { 2959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int red_size; 2969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int green_size; 2979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int blue_size; 2989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int alpha_size; 2999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int depth_size; 3009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int buffer_size; 3019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int stencil_size; 3029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int double_buffer; 3039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int accum_red_size; 3049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int accum_green_size; 3059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int accum_blue_size; 3069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int accum_alpha_size; 3079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int stereo; 3089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int multisamplebuffers; 3099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int multisamplesamples; 3109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int accelerated; 3119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int swap_control; 3129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int driver_loaded; 3139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall char driver_path[256]; 3149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void* dll_handle; 3159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } gl_config; 3169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 3189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* Data private to this driver */ 3199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct SDL_PrivateVideoData *hidden; 3209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct SDL_PrivateGLData *gl_data; 3219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* * * */ 3239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* The function used to dispose of this structure */ 3249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*free)(_THIS); 3259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}; 3269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#undef _THIS 3279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct VideoBootStrap { 3299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall const char *name; 3309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall const char *desc; 3319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*available)(void); 3329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_VideoDevice *(*create)(int devindex); 3339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} VideoBootStrap; 3349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_QUARTZ 3369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap QZ_bootstrap; 3379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_X11 3399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap X11_bootstrap; 3409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_DGA 3429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap DGA_bootstrap; 3439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_NANOX 3459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap NX_bootstrap; 3469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_IPOD 3489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap iPod_bootstrap; 3499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_QTOPIA 3519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap Qtopia_bootstrap; 3529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_WSCONS 3549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap WSCONS_bootstrap; 3559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_FBCON 3579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap FBCON_bootstrap; 3589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_DIRECTFB 3609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap DirectFB_bootstrap; 3619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_PS2GS 3639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap PS2GS_bootstrap; 3649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_PS3 3669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap PS3_bootstrap; 3679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_GGI 3699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap GGI_bootstrap; 3709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_VGL 3729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap VGL_bootstrap; 3739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_SVGALIB 3759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap SVGALIB_bootstrap; 3769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_GAPI 3789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap GAPI_bootstrap; 3799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_WINDIB 3819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap WINDIB_bootstrap; 3829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_DDRAW 3849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap DIRECTX_bootstrap; 3859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_BWINDOW 3879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap BWINDOW_bootstrap; 3889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_TOOLBOX 3909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap TOOLBOX_bootstrap; 3919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_DRAWSPROCKET 3939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap DSp_bootstrap; 3949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_PHOTON 3969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap ph_bootstrap; 3979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 3989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_EPOC 3999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap EPOC_bootstrap; 4009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_XBIOS 4029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap XBIOS_bootstrap; 4039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_GEM 4059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap GEM_bootstrap; 4069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_PICOGUI 4089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap PG_bootstrap; 4099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_DC 4119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap DC_bootstrap; 4129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_NDS 4149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap NDS_bootstrap; 4159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_RISCOS 4179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap RISCOS_bootstrap; 4189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_OS2FS 4209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap OS2FSLib_bootstrap; 4219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_AALIB 4239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap AALIB_bootstrap; 4249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_CACA 4269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap CACA_bootstrap; 4279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if SDL_VIDEO_DRIVER_DUMMY 4299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern VideoBootStrap DUMMY_bootstrap; 4309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 4319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* This is the current video device */ 4339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern SDL_VideoDevice *current_video; 4349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define SDL_VideoSurface (current_video->screen) 4369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define SDL_ShadowSurface (current_video->shadow) 4379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define SDL_PublicSurface (current_video->visible) 4389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* _SDL_sysvideo_h */ 440