include/SDL_video.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 06 Aug 2006 00:09:04 +0000
changeset 1969 5d3724f64f2b
parent 1968 9f589a1f74a5
child 1985 8055185ae4ed
permissions -rw-r--r--
Clarified the difference between render drivers and render contexts
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2006 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 
    23 /**
    24  * \file SDL_video.h
    25  *
    26  * Header file for access to the SDL raw framebuffer window
    27  */
    28 
    29 #ifndef _SDL_video_h
    30 #define _SDL_video_h
    31 
    32 #include "SDL_stdinc.h"
    33 #include "SDL_error.h"
    34 #include "SDL_pixels.h"
    35 #include "SDL_rwops.h"
    36 
    37 #include "begin_code.h"
    38 /* Set up for C function definitions, even when using C++ */
    39 #ifdef __cplusplus
    40 /* *INDENT-OFF* */
    41 extern "C" {
    42 /* *INDENT-ON* */
    43 #endif
    44 
    45 /* Transparency definitions: These define alpha as the opacity of a surface */
    46 #define SDL_ALPHA_OPAQUE 255
    47 #define SDL_ALPHA_TRANSPARENT 0
    48 
    49 /**
    50  * \struct SDL_Rect
    51  *
    52  * \brief A rectangle, with the origin at the upper left.
    53  */
    54 typedef struct SDL_Rect
    55 {
    56     int x, y;
    57     int w, h;
    58 } SDL_Rect;
    59 
    60 /**
    61  * \struct SDL_DisplayMode
    62  *
    63  * \brief  The structure that defines a display mode
    64  *
    65  * \sa SDL_GetNumDisplayModes()
    66  * \sa SDL_GetDisplayMode()
    67  * \sa SDL_GetDesktopDisplayMode()
    68  * \sa SDL_GetCurrentDisplayMode()
    69  * \sa SDL_GetClosestDisplayMode()
    70  * \sa SDL_SetDisplayMode()
    71  */
    72 typedef struct
    73 {
    74     Uint32 format;              /**< pixel format */
    75     int w;                      /**< width */
    76     int h;                      /**< height */
    77     int refresh_rate;           /**< refresh rate (or zero for unspecified) */
    78     void *driverdata;           /**< driver-specific data, initialize to 0 */
    79 } SDL_DisplayMode;
    80 
    81 /**
    82  * \typedef SDL_WindowID
    83  *
    84  * \brief The type used to identify a window
    85  *
    86  * \sa SDL_CreateWindow()
    87  * \sa SDL_CreateWindowFrom()
    88  * \sa SDL_DestroyWindow()
    89  * \sa SDL_GetWindowData()
    90  * \sa SDL_GetWindowFlags()
    91  * \sa SDL_GetWindowGrab()
    92  * \sa SDL_GetWindowPosition()
    93  * \sa SDL_GetWindowSize()
    94  * \sa SDL_GetWindowTitle()
    95  * \sa SDL_HideWindow()
    96  * \sa SDL_MaximizeWindow()
    97  * \sa SDL_MinimizeWindow()
    98  * \sa SDL_RaiseWindow()
    99  * \sa SDL_RestoreWindow()
   100  * \sa SDL_SetWindowData()
   101  * \sa SDL_SetWindowFullscreen()
   102  * \sa SDL_SetWindowGrab()
   103  * \sa SDL_SetWindowIcon()
   104  * \sa SDL_SetWindowPosition()
   105  * \sa SDL_SetWindowSize()
   106  * \sa SDL_SetWindowTitle()
   107  * \sa SDL_ShowWindow()
   108  */
   109 typedef Uint32 SDL_WindowID;
   110 
   111 /**
   112  * \enum SDL_WindowFlags
   113  *
   114  * \brief The flags on a window
   115  *
   116  * \sa SDL_GetWindowFlags()
   117  */
   118 typedef enum
   119 {
   120     SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window, implies borderless */
   121     SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
   122     SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
   123     SDL_WINDOW_BORDERLESS = 0x00000008,         /**< no window decoration */
   124     SDL_WINDOW_RESIZABLE = 0x00000010,          /**< window can be resized */
   125     SDL_WINDOW_MINIMIZED = 0x00000020,          /**< minimized */
   126     SDL_WINDOW_MAXIMIZED = 0x00000040,          /**< maximized */
   127     SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
   128     SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
   129     SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
   130 } SDL_WindowFlags;
   131 
   132 /**
   133  * \def SDL_WINDOWPOS_UNDEFINED
   134  * \brief Used to indicate that you don't care what the window position is.
   135  */
   136 #define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF
   137 /**
   138  * \def SDL_WINDOWPOS_CENTERED
   139  * \brief Used to indicate that the window position should be centered.
   140  */
   141 #define SDL_WINDOWPOS_CENTERED  0x7FFFFFE
   142 
   143 /**
   144  * \enum SDL_WindowEventID
   145  *
   146  * \brief Event subtype for window events
   147  */
   148 typedef enum
   149 {
   150     SDL_WINDOWEVENT_NONE,               /**< Never used */
   151     SDL_WINDOWEVENT_SHOWN,              /**< Window has been shown */
   152     SDL_WINDOWEVENT_HIDDEN,             /**< Window has been hidden */
   153     SDL_WINDOWEVENT_EXPOSED,            /**< Window has been exposed and should be redrawn */
   154     SDL_WINDOWEVENT_MOVED,              /**< Window has been moved to data1,data2 */
   155     SDL_WINDOWEVENT_RESIZED,            /**< Window size changed to data1xdata2 */
   156     SDL_WINDOWEVENT_MINIMIZED,          /**< Window has been minimized */
   157     SDL_WINDOWEVENT_MAXIMIZED,          /**< Window has been maximized */
   158     SDL_WINDOWEVENT_RESTORED,           /**< Window has been restored to normal size and position */
   159     SDL_WINDOWEVENT_ENTER,              /**< The window has gained mouse focus */
   160     SDL_WINDOWEVENT_LEAVE,              /**< The window has lost mouse focus */
   161     SDL_WINDOWEVENT_FOCUS_GAINED,       /**< The window has gained keyboard focus */
   162     SDL_WINDOWEVENT_FOCUS_LOST,         /**< The window has lost keyboard focus */
   163     SDL_WINDOWEVENT_CLOSE,                              /**< The window manager requests that the window be closed */
   164 } SDL_WindowEventID;
   165 
   166 /**
   167  * \enum SDL_RendererFlags
   168  *
   169  * \brief Flags used when creating a rendering context
   170  */
   171 typedef enum
   172 {
   173     SDL_RENDERER_SINGLEBUFFER = 0x00000001,     /**< Render directly to the window, if possible */
   174     SDL_RENDERER_PRESENTCOPY = 0x00000002,      /**< Present uses a copy from back buffer to the front buffer */
   175     SDL_RENDERER_PRESENTFLIP2 = 0x00000004,     /**< Present uses a flip, swapping back buffer and front buffer */
   176     SDL_RENDERER_PRESENTFLIP3 = 0x00000008,     /**< Present uses a flip, rotating between two back buffers and a front buffer */
   177     SDL_RENDERER_PRESENTDISCARD = 0x00000010,   /**< Present leaves the contents of the backbuffer undefined */
   178     SDL_RENDERER_PRESENTVSYNC = 0x00000020,     /**< Present is synchronized with the refresh rate */
   179     SDL_RENDERER_ACCELERATED = 0x00000040,      /**< The renderer uses hardware acceleration */
   180 } SDL_RendererFlags;
   181 
   182 /**
   183  * \struct SDL_RendererInfo
   184  *
   185  * \brief Information on the capabilities of a render driver or context
   186  */
   187 typedef struct SDL_RendererInfo
   188 {
   189     const char *name;           /**< The name of the renderer */
   190     Uint32 flags;               /**< Supported SDL_RendererFlags */
   191     Uint32 blend_modes;         /**< A mask of supported blend modes */
   192     Uint32 scale_modes;         /**< A mask of supported scale modes */
   193     Uint32 num_texture_formats; /**< The number of available texture formats */
   194     Uint32 texture_formats[20]; /**< The available texture formats */
   195     int max_texture_width;      /**< The maximimum texture width */
   196     int max_texture_height;     /**< The maximimum texture height */
   197 } SDL_RendererInfo;
   198 
   199 /**
   200  * \enum SDL_TextureAccess
   201  *
   202  * \brief The access pattern allowed for a texture
   203  */
   204 typedef enum
   205 {
   206     SDL_TEXTUREACCESS_LOCAL,    /**< Lockable system memory */
   207     SDL_TEXTUREACCESS_REMOTE,   /**< Unlockable video memory */
   208 } SDL_TextureAccess;
   209 
   210 /**
   211  * \enum SDL_TextureBlendMode
   212  *
   213  * \brief The blend mode used in SDL_RenderCopy()
   214  */
   215 typedef enum
   216 {
   217     SDL_TEXTUREBLENDMODE_NONE = 0x00000000,     /**< No blending */
   218     SDL_TEXTUREBLENDMODE_MASK = 0x00000001,     /**< dst = A ? src : dst (alpha is mask) */
   219     SDL_TEXTUREBLENDMODE_BLEND = 0x00000002,    /**< dst = (src * A) + (dst * (1-A)) */
   220     SDL_TEXTUREBLENDMODE_ADD = 0x00000004,      /**< dst = (src * A) + dst */
   221     SDL_TEXTUREBLENDMODE_MOD = 0x00000008,      /**< dst = src * dst */
   222 } SDL_TextureBlendMode;
   223 
   224 /**
   225  * \enum SDL_TextureScaleMode
   226  *
   227  * \brief The scale mode used in SDL_RenderCopy()
   228  */
   229 typedef enum
   230 {
   231     SDL_TEXTURESCALEMODE_NONE = 0x00000000,     /**< No scaling, rectangles must match dimensions */
   232     SDL_TEXTURESCALEMODE_FAST = 0x00000001,     /**< Point sampling or equivalent algorithm */
   233     SDL_TEXTURESCALEMODE_SLOW = 0x00000002,     /**< Linear filtering or equivalent algorithm */
   234     SDL_TEXTURESCALEMODE_BEST = 0x00000004,     /**< Bicubic filtering or equivalent algorithm */
   235 } SDL_TextureScaleMode;
   236 
   237 /**
   238  * \typedef SDL_TextureID
   239  *
   240  * \brief An efficient driver-specific representation of pixel data
   241  */
   242 typedef Uint32 SDL_TextureID;
   243 
   244 /**
   245  * \typedef SDL_GLContext
   246  *
   247  * \brief An opaque handle to an OpenGL context.
   248  */
   249 typedef void *SDL_GLContext;
   250 
   251 
   252 /* These are the currently supported flags for the SDL_surface */
   253 /* Used internally (read-only) */
   254 #define SDL_HWSURFACE       0x00000001  /* Surface represents a texture */
   255 #define SDL_PREALLOC        0x00000002  /* Surface uses preallocated memory */
   256 #define SDL_SRCALPHA        0x00000004  /* Blit uses source alpha blending */
   257 #define SDL_SRCCOLORKEY     0x00000008  /* Blit uses a source color key */
   258 #define SDL_RLEACCELOK      0x00000010  /* Private flag */
   259 #define SDL_RLEACCEL        0x00000020  /* Surface is RLE encoded */
   260 
   261 /* Evaluates to true if the surface needs to be locked before access */
   262 #define SDL_MUSTLOCK(S)	(((S)->flags & (SDL_HWSURFACE|SDL_RLEACCEL)) != 0)
   263 
   264 /* This structure should be treated as read-only, except for 'pixels',
   265    which, if not NULL, contains the raw pixel data for the surface.
   266 */
   267 typedef struct SDL_Surface
   268 {
   269     Uint32 flags;               /* Read-only */
   270     SDL_PixelFormat *format;    /* Read-only */
   271     int w, h;                   /* Read-only */
   272     int pitch;                  /* Read-only */
   273     void *pixels;               /* Read-write */
   274 
   275     /* texture associated with the surface, if any */
   276     SDL_TextureID textureID;
   277 
   278     /* information needed for surfaces requiring locks */
   279     int locked;
   280     void *lock_data;
   281 
   282     /* clipping information */
   283     SDL_Rect clip_rect;         /* Read-only */
   284 
   285     /* info for fast blit mapping to other surfaces */
   286     struct SDL_BlitMap *map;    /* Private */
   287 
   288     /* format version, bumped at every change to invalidate blit maps */
   289     unsigned int format_version;        /* Private */
   290 
   291     /* Reference count -- used when freeing surface */
   292     int refcount;               /* Read-mostly */
   293 } SDL_Surface;
   294 
   295 /* typedef for private surface blitting functions */
   296 typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
   297                          struct SDL_Surface * dst, SDL_Rect * dstrect);
   298 
   299 
   300 /**
   301  * \enum SDL_GLattr
   302  *
   303  * \brief OpenGL configuration attributes
   304  */
   305 typedef enum
   306 {
   307     SDL_GL_RED_SIZE,
   308     SDL_GL_GREEN_SIZE,
   309     SDL_GL_BLUE_SIZE,
   310     SDL_GL_ALPHA_SIZE,
   311     SDL_GL_BUFFER_SIZE,
   312     SDL_GL_DOUBLEBUFFER,
   313     SDL_GL_DEPTH_SIZE,
   314     SDL_GL_STENCIL_SIZE,
   315     SDL_GL_ACCUM_RED_SIZE,
   316     SDL_GL_ACCUM_GREEN_SIZE,
   317     SDL_GL_ACCUM_BLUE_SIZE,
   318     SDL_GL_ACCUM_ALPHA_SIZE,
   319     SDL_GL_STEREO,
   320     SDL_GL_MULTISAMPLEBUFFERS,
   321     SDL_GL_MULTISAMPLESAMPLES,
   322     SDL_GL_ACCELERATED_VISUAL
   323 } SDL_GLattr;
   324 
   325 
   326 /* Function prototypes */
   327 
   328 /**
   329  * \fn int SDL_GetNumVideoDrivers(void)
   330  *
   331  * \brief Get the number of video drivers compiled into SDL
   332  *
   333  * \sa SDL_GetVideoDriver()
   334  */
   335 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
   336 
   337 /**
   338  * \fn const char *SDL_GetVideoDriver(int index)
   339  *
   340  * \brief Get the name of a built in video driver.
   341  *
   342  * \note The video drivers are presented in the order in which they are
   343  * normally checked during initialization.
   344  *
   345  * \sa SDL_GetNumVideoDrivers()
   346  */
   347 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
   348 
   349 /**
   350  * \fn int SDL_VideoInit(const char *driver_name, Uint32 flags)
   351  *
   352  * \brief Initialize the video subsystem, optionally specifying a video driver.
   353  *
   354  * \param driver_name Initialize a specific driver by name, or NULL for the default video driver.
   355  * \param flags FIXME: Still needed?
   356  *
   357  * \return 0 on success, -1 on error
   358  *
   359  * This function initializes the video subsystem; setting up a connection
   360  * to the window manager, etc, and determines the available display modes
   361  * and pixel formats, but does not initialize a window or graphics mode.
   362  *
   363  * \sa SDL_VideoQuit()
   364  */
   365 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name,
   366                                           Uint32 flags);
   367 
   368 /**
   369  * \fn void SDL_VideoQuit(void)
   370  *
   371  * \brief Shuts down the video subsystem.
   372  *
   373  * This function closes all windows, and restores the original video mode.
   374  *
   375  * \sa SDL_VideoInit()
   376  */
   377 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
   378 
   379 /**
   380  * \fn const char *SDL_GetCurrentVideoDriver(void)
   381  *
   382  * \brief Returns the name of the currently initialized video driver.
   383  *
   384  * \return The name of the current video driver or NULL if no driver
   385  *         has been initialized
   386  *
   387  * \sa SDL_GetNumVideoDrivers()
   388  * \sa SDL_GetVideoDriver()
   389  */
   390 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
   391 
   392 /**
   393  * \fn int SDL_GetNumVideoDisplays(void)
   394  *
   395  * \brief Returns the number of available video displays.
   396  *
   397  * \sa SDL_SelectVideoDisplay()
   398  */
   399 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
   400 
   401 /**
   402  * \fn int SDL_SelectVideoDisplay(int index)
   403  *
   404  * \brief Set the index of the currently selected display.
   405  *
   406  * \return 0 on success, or -1 if the index is out of range.
   407  *
   408  * \sa SDL_GetNumVideoDisplays()
   409  * \sa SDL_GetCurrentVideoDisplay()
   410  */
   411 extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index);
   412 
   413 /**
   414  * \fn int SDL_GetCurrentVideoDisplay(void)
   415  *
   416  * \brief Get the index of the currently selected display.
   417  *
   418  * \return The index of the currently selected display.
   419  *
   420  * \sa SDL_GetNumVideoDisplays()
   421  * \sa SDL_SelectVideoDisplay()
   422  */
   423 extern DECLSPEC int SDLCALL SDL_GetCurrentVideoDisplay(void);
   424 
   425 /**
   426  * \fn int SDL_GetNumDisplayModes(void)
   427  *
   428  * \brief Returns the number of available display modes for the current display.
   429  *
   430  * \sa SDL_GetDisplayMode()
   431  */
   432 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
   433 
   434 /**
   435  * \fn int SDL_GetDisplayMode(int index, SDL_DisplayMode *mode)
   436  *
   437  * \brief Fill in information about a specific display mode.
   438  *
   439  * \note The display modes are sorted in this priority:
   440  *       \li bits per pixel -> more colors to fewer colors
   441  *       \li width -> largest to smallest
   442  *       \li height -> largest to smallest
   443  *       \li refresh rate -> highest to lowest
   444  *
   445  * \sa SDL_GetNumDisplayModes()
   446  */
   447 extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int index,
   448                                                SDL_DisplayMode * mode);
   449 
   450 /**
   451  * \fn int SDL_GetDesktopDisplayMode(SDL_DisplayMode *mode)
   452  *
   453  * \brief Fill in information about the desktop display mode for the current display.
   454  */
   455 extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode);
   456 
   457 /**
   458  * \fn int SDL_GetCurrentDisplayMode(SDL_DisplayMode *mode)
   459  *
   460  * \brief Fill in information about the current display mode.
   461  */
   462 extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
   463 
   464 /**
   465  * \fn SDL_DisplayMode *SDL_GetClosestDisplayMode(const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
   466  *
   467  * \brief Get the closest match to the requested display mode.
   468  *
   469  * \param mode The desired display mode
   470  * \param closest A pointer to a display mode to be filled in with the closest match of the available display modes.
   471  *
   472  * \return The passed in value 'closest', or NULL if no matching video mode was available.
   473  *
   474  * The available display modes are scanned, and 'closest' is filled in with the closest mode matching the requested mode and returned.  The mode format and refresh_rate default to the desktop mode if they are 0.  The modes are scanned with size being first priority, format being second priority, and finally checking the refresh_rate.  If all the available modes are too small, then NULL is returned.
   475  *
   476  * \sa SDL_GetNumDisplayModes()
   477  * \sa SDL_GetDisplayMode()
   478  */
   479 extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
   480                                                                    SDL_DisplayMode
   481                                                                    * mode,
   482                                                                    SDL_DisplayMode
   483                                                                    * closest);
   484 
   485 /**
   486  * \fn int SDL_SetFullscreenDisplayMode(const SDL_DisplayMode *mode)
   487  *
   488  * \brief Set the display mode used when a fullscreen window is visible
   489  *        on the currently selected display.
   490  *
   491  * \param mode The mode to use, or NULL for the desktop mode.
   492  *
   493  * \return 0 on success, or -1 if setting the display mode failed.
   494  *
   495  * \sa SDL_SetWindowFullscreen()
   496  */
   497 extern DECLSPEC int SDLCALL SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
   498                                                          * mode);
   499 
   500 /**
   501  * \fn int SDL_GetFullscreenDisplayMode(SDL_DisplayMode *mode)
   502  *
   503  * \brief Fill in information about the display mode used when a fullscreen
   504  *        window is visible on the currently selected display.
   505  */
   506 extern DECLSPEC int SDLCALL SDL_GetFullscreenDisplayMode(SDL_DisplayMode *
   507                                                          mode);
   508 
   509 /**
   510  * \fn int SDL_SetDisplayPalette(const SDL_Color *colors, int firstcolor, int ncolors)
   511  *
   512  * \brief Set the palette entries for indexed display modes.
   513  *
   514  * \return 0 on success, or -1 if the display mode isn't palettized or the colors couldn't be set.
   515  */
   516 extern DECLSPEC int SDLCALL SDL_SetDisplayPalette(const SDL_Color * colors,
   517                                                   int firstcolor,
   518                                                   int ncolors);
   519 
   520 /**
   521  * \fn int SDL_GetDisplayPalette(SDL_Color *colors, int firstcolor, int ncolors)
   522  *
   523  * \brief Gets the palette entries for indexed display modes.
   524  *
   525  * \return 0 on success, or -1 if the display mode isn't palettized
   526  */
   527 extern DECLSPEC int SDLCALL SDL_GetDisplayPalette(SDL_Color * colors,
   528                                                   int firstcolor,
   529                                                   int ncolors);
   530 
   531 /**
   532  * \fn int SDL_SetGamma(float red, float green, float blue)
   533  *
   534  * \brief Set the gamma correction for each of the color channels on the currently selected display.
   535  *
   536  * \return 0 on success, or -1 if setting the gamma isn't supported.
   537  *
   538  * \sa SDL_SetGammaRamp()
   539  */
   540 extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
   541 
   542 /**
   543  * \fn int SDL_SetGammaRamp(const Uint16 * red, const Uint16 * green, const Uint16 * blue)
   544  *
   545  * \brief Set the gamma ramp for the currently selected display.
   546  *
   547  * \param red The translation table for the red channel, or NULL
   548  * \param green The translation table for the green channel, or NULL
   549  * \param blue The translation table for the blue channel, or NULL
   550  *
   551  * \return 0 on success, or -1 if gamma ramps are unsupported.
   552  *
   553  * Set the gamma translation table for the red, green, and blue channels
   554  * of the video hardware.  Each table is an array of 256 16-bit quantities,
   555  * representing a mapping between the input and output for that channel.
   556  * The input is the index into the array, and the output is the 16-bit
   557  * gamma value at that index, scaled to the output color precision.
   558  * 
   559  * \sa SDL_GetGammaRamp()
   560  */
   561 extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
   562                                              const Uint16 * green,
   563                                              const Uint16 * blue);
   564 
   565 /**
   566  * \fn int SDL_GetGammaRamp(Uint16 * red, Uint16 * green, Uint16 * blue)
   567  *
   568  * \brief Get the gamma ramp for the currently selected display.
   569  *
   570  * \param red A pointer to a 256 element array of 16-bit quantities to hold the translation table for the red channel, or NULL.
   571  * \param green A pointer to a 256 element array of 16-bit quantities to hold the translation table for the green channel, or NULL.
   572  * \param blue A pointer to a 256 element array of 16-bit quantities to hold the translation table for the blue channel, or NULL.
   573  * 
   574  * \return 0 on success, or -1 if gamma ramps are unsupported.
   575  *
   576  * \sa SDL_SetGammaRamp()
   577  */
   578 extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
   579                                              Uint16 * blue);
   580 
   581 
   582 /**
   583  * \fn SDL_WindowID SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
   584  *
   585  * \brief Create a window with the specified position, dimensions, and flags.
   586  *
   587  * \param title The title of the window, in UTF-8 encoding
   588  * \param x The x position of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED
   589  * \param y The y position of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED
   590  * \param w The width of the window
   591  * \param h The height of the window
   592  * \param flags The flags for the window, a mask of any of the following: SDL_WINDOW_FULLSCREEN, SDL_WINDOW_OPENGL, SDL_WINDOW_SHOWN, SDL_WINDOW_BORDERLESS, SDL_WINDOW_RESIZABLE, SDL_WINDOW_MAXIMIZED, SDL_WINDOW_MINIMIZED, SDL_WINDOW_INPUT_GRABBED
   593  *
   594  * \return The id of the window created, or zero if window creation failed.
   595  *
   596  * \sa SDL_DestroyWindow()
   597  */
   598 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow(const char *title,
   599                                                       int x, int y, int w,
   600                                                       int h, Uint32 flags);
   601 
   602 /**
   603  * \fn SDL_WindowID SDL_CreateWindowFrom(void *data)
   604  *
   605  * \brief Create an SDL window struct from an existing native window.
   606  *
   607  * \param data A pointer to driver-dependent window creation data
   608  *
   609  * \return The id of the window created, or zero if window creation failed.
   610  *
   611  * \warning This function is NOT SUPPORTED, use at your own risk!
   612  *
   613  * \sa SDL_DestroyWindow()
   614  */
   615 extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom(const void *data);
   616 
   617 /**
   618  * \fn Uint32 SDL_GetWindowFlags(SDL_WindowID windowID)
   619  *
   620  * \brief Get the window flags.
   621  */
   622 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_WindowID windowID);
   623 
   624 /**
   625  * \fn void SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
   626  *
   627  * \brief Set the title of the window, in UTF-8 format.
   628  *
   629  * \sa SDL_GetWindowTitle()
   630  */
   631 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_WindowID windowID,
   632                                                 const char *title);
   633 
   634 /**
   635  * \fn const char *SDL_GetWindowTitle(SDL_WindowID windowID)
   636  *
   637  * \brief Get the title of the window, in UTF-8 format.
   638  *
   639  * \sa SDL_SetWindowTitle()
   640  */
   641 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_WindowID windowID);
   642 
   643 /**
   644  * \fn void SDL_SetWindowIcon(SDL_Surface *icon)
   645  *
   646  * \brief Set the icon of the window.
   647  *
   648  * \param icon The icon for the window
   649  *
   650  * FIXME: The icon needs to be set before the window is first shown.  Should some icon representation be part of the window creation data?
   651  */
   652 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Surface * icon);
   653 
   654 /**
   655  * \fn void SDL_SetWindowData(SDL_WindowID windowID, void *userdata)
   656  *
   657  * \brief Associate an arbitrary pointer with the window.
   658  *
   659  * \sa SDL_GetWindowData()
   660  */
   661 extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_WindowID windowID,
   662                                                void *userdata);
   663 
   664 /**
   665  * \fn void *SDL_GetWindowData(SDL_WindowID windowID)
   666  *
   667  * \brief Retrieve the data pointer associated with the window.
   668  *
   669  * \sa SDL_SetWindowData()
   670  */
   671 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_WindowID windowID);
   672 
   673 /**
   674  * \fn void SDL_SetWindowPosition(SDL_WindowID windowID, int x, int y)
   675  *
   676  * \brief Set the position of the window.
   677  *
   678  * \param windowID The window to reposition
   679  * \param x The x coordinate of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED
   680  * \param y The y coordinate of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED
   681  *
   682  * \note The window coordinate origin is the upper left of the display.
   683  *
   684  * \sa SDL_GetWindowPosition()
   685  */
   686 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_WindowID windowID,
   687                                                    int x, int y);
   688 
   689 /**
   690  * \fn void SDL_GetWindowPosition(SDL_WindowID windowID, int *x, int *y)
   691  *
   692  * \brief Get the position of the window.
   693  *
   694  * \sa SDL_SetWindowPosition()
   695  */
   696 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_WindowID windowID,
   697                                                    int *x, int *y);
   698 
   699 /**
   700  * \fn void SDL_SetWindowSize(SDL_WindowID windowID, int w, int w)
   701  *
   702  * \brief Set the size of the window's client area.
   703  *
   704  * \note You can't change the size of a fullscreen window, it automatically
   705  * matches the size of the display mode.
   706  *
   707  * \sa SDL_GetWindowSize()
   708  */
   709 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_WindowID windowID, int w,
   710                                                int h);
   711 
   712 /**
   713  * \fn void SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *w)
   714  *
   715  * \brief Get the size of the window's client area.
   716  *
   717  * \sa SDL_SetWindowSize()
   718  */
   719 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_WindowID windowID, int *w,
   720                                                int *h);
   721 
   722 /**
   723  * \fn void SDL_ShowWindow(SDL_WindowID windowID)
   724  *
   725  * \brief Show the window
   726  *
   727  * \sa SDL_HideWindow()
   728  */
   729 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_WindowID windowID);
   730 
   731 /**
   732  * \fn void SDL_HideWindow(SDL_WindowID windowID)
   733  *
   734  * \brief Hide the window
   735  *
   736  * \sa SDL_ShowWindow()
   737  */
   738 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_WindowID windowID);
   739 
   740 /**
   741  * \fn void SDL_RaiseWindow(SDL_WindowID windowID)
   742  *
   743  * \brief Raise the window above other windows and set the input focus.
   744  */
   745 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_WindowID windowID);
   746 
   747 /**
   748  * \fn void SDL_MaximizeWindow(SDL_WindowID windowID)
   749  *
   750  * \brief Make the window as large as possible.
   751  *
   752  * \sa SDL_RestoreWindow()
   753  */
   754 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_WindowID windowID);
   755 
   756 /**
   757  * \fn void SDL_MinimizeWindow(SDL_WindowID windowID)
   758  *
   759  * \brief Minimize the window to an iconic representation.
   760  *
   761  * \sa SDL_RestoreWindow()
   762  */
   763 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_WindowID windowID);
   764 
   765 /**
   766  * \fn void SDL_RestoreWindow(SDL_WindowID windowID)
   767  *
   768  * \brief Restore the size and position of a minimized or maximized window.
   769  *
   770  * \sa SDL_MaximizeWindow()
   771  * \sa SDL_MinimizeWindow()
   772  */
   773 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_WindowID windowID);
   774 
   775 /**
   776  * \fn int SDL_SetWindowFullscreen(SDL_WindowID windowID, int fullscreen)
   777  *
   778  * \brief Set the window's fullscreen state.
   779  *
   780  * \return 0 on success, or -1 if setting the display mode failed.
   781  *
   782  * \sa SDL_SetFullscreenDisplayMode()
   783  */
   784 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_WindowID windowID,
   785                                                     int fullscreen);
   786 
   787 /**
   788  * \fn void SDL_SetWindowGrab(SDL_WindowID windowID, int mode)
   789  *
   790  * \brief Set the window's input grab mode.
   791  *
   792  * \param mode This is 1 to grab input, and 0 to release input.
   793  *
   794  * \sa SDL_GetWindowGrab()
   795  */
   796 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID,
   797                                                int mode);
   798 
   799 /**
   800  * \fn int SDL_GetWindowGrab(SDL_WindowID windowID)
   801  *
   802  * \brief Get the window's input grab mode.
   803  *
   804  * \return This returns 1 if input is grabbed, and 0 otherwise.
   805  *
   806  * \sa SDL_SetWindowGrab()
   807  */
   808 extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_WindowID windowID);
   809 
   810 /**
   811  * \fn SDL_bool SDL_GetWindowWMInfo(SDL_WindowID windowID, struct SDL_SysWMinfo * info)
   812  *
   813  * \brief Get driver specific information about a window.
   814  *
   815  * \note Include SDL_syswm.h for the declaration of SDL_SysWMinfo.
   816  */
   817 struct SDL_SysWMinfo;
   818 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_WindowID windowID,
   819                                                      struct SDL_SysWMinfo
   820                                                      *info);
   821 
   822 /**
   823  * \fn void SDL_DestroyWindow(SDL_WindowID windowID)
   824  *
   825  * \brief Destroy a window.
   826  */
   827 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_WindowID windowID);
   828 
   829 /**
   830  * \fn int SDL_GetNumRenderDrivers(void)
   831  *
   832  * \brief Get the number of 2D rendering drivers available for the current display.
   833  *
   834  * A render driver is a set of code that handles rendering and texture
   835  * management on a particular display.  Normally there is only one, but
   836  * some drivers may have several available with different capabilities.
   837  *
   838  * \sa SDL_GetRenderDriverInfo()
   839  * \sa SDL_CreateRenderer()
   840  */
   841 extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
   842 
   843 /**
   844  * \fn int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo *info)
   845  *
   846  * \brief Get information about a specific 2D rendering driver for the current display.
   847  *
   848  * \param index The index of the driver to query information about.
   849  * \param info A pointer to an SDL_RendererInfo struct to be filled with information on the rendering driver.
   850  *
   851  * \return 0 on success, -1 if the index was out of range
   852  *
   853  * \sa SDL_CreateRenderer()
   854  */
   855 extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
   856                                                     SDL_RendererInfo * info);
   857 
   858 /**
   859  * \fn int SDL_CreateRenderer(SDL_WindowID window, int index, Uint32 flags)
   860  *
   861  * \brief Create and make active a 2D rendering context for a window.
   862  *
   863  * \param windowID The window used for rendering
   864  * \param index The index of the rendering driver to initialize, or -1 to initialize the first one supporting the requested flags.
   865  * \param flags SDL_RendererFlags
   866  *
   867  * \return 0 on success, -1 if the flags were not supported, or -2 if
   868  *         there isn't enough memory to support the requested flags
   869  *
   870  * \sa SDL_SelectRenderer()
   871  * \sa SDL_GetRendererInfo()
   872  * \sa SDL_DestroyRenderer()
   873  */
   874 extern DECLSPEC int SDLCALL SDL_CreateRenderer(SDL_WindowID windowID,
   875                                                int index, Uint32 flags);
   876 
   877 /**
   878  * \fn int SDL_SelectRenderer(SDL_WindowID windowID)
   879  *
   880  * \brief Select the rendering context for a particular window.
   881  *
   882  * \return 0 on success, -1 if the selected window doesn't have a
   883  *         rendering context.
   884  */
   885 extern DECLSPEC int SDLCALL SDL_SelectRenderer(SDL_WindowID windowID);
   886 
   887 /**
   888  * \fn int SDL_GetRendererInfo(SDL_RendererInfo *info)
   889  *
   890  * \brief Get information about the current rendering context.
   891  */
   892 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_RendererInfo * info);
   893 
   894 /**
   895  * \fn SDL_TextureID SDL_CreateTexture(Uint32 format, int access, int w, int h)
   896  *
   897  * \brief Create a texture for the current rendering context.
   898  *
   899  * \param format The format of the texture
   900  * \param access One of the enumerated values in SDL_TextureAccess
   901  * \param w The width of the texture in pixels
   902  * \param h The height of the texture in pixels
   903  *
   904  * \return The created texture is returned, or 0 if no rendering context was active,  the format was unsupported, or the width or height were out of range.
   905  *
   906  * \sa SDL_QueryTexture()
   907  * \sa SDL_DestroyTexture()
   908  */
   909 extern DECLSPEC SDL_TextureID SDLCALL SDL_CreateTexture(Uint32 format,
   910                                                         int access, int w,
   911                                                         int h);
   912 
   913 /**
   914  * \fn SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format, int access, SDL_Surface *surface)
   915  *
   916  * \brief Create a texture from an existing surface.
   917  *
   918  * \param format The format of the texture, or 0 to pick an appropriate format
   919  * \param access One of the enumerated values in SDL_TextureAccess
   920  * \param surface The surface containing pixel data used to fill the texture
   921  *
   922  * \return The created texture is returned, or 0 if no rendering context was active,  the format was unsupported, or the surface width or height were out of range.
   923  *
   924  * \note The surface is not modified or freed by this function.
   925  *
   926  * \sa SDL_QueryTexture()
   927  * \sa SDL_DestroyTexture()
   928  */
   929 extern DECLSPEC SDL_TextureID SDLCALL SDL_CreateTextureFromSurface(Uint32
   930                                                                    format,
   931                                                                    int access,
   932                                                                    SDL_Surface
   933                                                                    * surface);
   934 
   935 /**
   936  * \fn int SDL_QueryTexture(SDL_TextureID textureID, Uint32 *format, int *access, int *w, int *h)
   937  *
   938  * \brief Query the attributes of a texture
   939  *
   940  * \param texture A texture to be queried
   941  * \param format A pointer filled in with the raw format of the texture.  The actual format may differ, but pixel transfers will use this format.
   942  * \param access A pointer filled in with the actual access to the texture.
   943  * \param w A pointer filled in with the width of the texture in pixels
   944  * \param h A pointer filled in with the height of the texture in pixels
   945  *
   946  * \return 0 on success, or -1 if the texture is not valid
   947  */
   948 extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_TextureID textureID,
   949                                              Uint32 * format, int *access,
   950                                              int *w, int *h);
   951 
   952 /**
   953  * \fn int SDL_QueryTexturePixels(SDL_TextureID textureID, void **pixels, int pitch)
   954  *
   955  * \brief Query the pixels of a texture, if the texture does not need to be locked for pixel access.
   956  *
   957  * \param texture A texture to be queried, which was created with SDL_TEXTUREACCESS_LOCAL
   958  * \param pixels A pointer filled with a pointer to the pixels for the texture 
   959  * \param pitch A pointer filled in with the pitch of the pixel data
   960  *
   961  * \return 0 on success, or -1 if the texture is not valid, or must be locked for pixel access.
   962  */
   963 extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_TextureID textureID,
   964                                                    void **pixels, int *pitch);
   965 
   966 /**
   967  * \fn int SDL_SetTexturePalette(SDL_TextureID textureID, const SDL_Color * colors, int firstcolor, int ncolors)
   968  *
   969  * \brief Update an indexed texture with a color palette
   970  *
   971  * \param texture The texture to update
   972  * \param colors The array of RGB color data
   973  * \param firstcolor The first index to update
   974  * \param ncolors The number of palette entries to fill with the color data
   975  *
   976  * \return 0 on success, or -1 if the texture is not valid or not an indexed texture
   977  */
   978 extern DECLSPEC int SDLCALL SDL_SetTexturePalette(SDL_TextureID textureID,
   979                                                   const SDL_Color * colors,
   980                                                   int firstcolor,
   981                                                   int ncolors);
   982 
   983 /**
   984  * \fn int SDL_GetTexturePalette(SDL_TextureID textureID, SDL_Color * colors, int firstcolor, int ncolors)
   985  *
   986  * \brief Update an indexed texture with a color palette
   987  *
   988  * \param texture The texture to update
   989  * \param colors The array to fill with RGB color data
   990  * \param firstcolor The first index to retrieve
   991  * \param ncolors The number of palette entries to retrieve
   992  *
   993  * \return 0 on success, or -1 if the texture is not valid or not an indexed texture
   994  */
   995 extern DECLSPEC int SDLCALL SDL_GetTexturePalette(SDL_TextureID textureID,
   996                                                   SDL_Color * colors,
   997                                                   int firstcolor,
   998                                                   int ncolors);
   999 
  1000 /**
  1001  * \fn int SDL_UpdateTexture(SDL_TextureID textureID, const SDL_Rect *rect, const void *pixels, int pitch)
  1002  *
  1003  * \brief Update the given texture rectangle with new pixel data.
  1004  *
  1005  * \param texture The texture to update
  1006  * \param rect A pointer to the rectangle of pixels to update, or NULL to update the entire texture.
  1007  * \param pixels The raw pixel data
  1008  * \param pitch The number of bytes between rows of pixel data
  1009  *
  1010  * \return 0 on success, or -1 if the texture is not valid
  1011  *
  1012  * \note This is a very slow function for textures not created with SDL_TEXTUREACCESS_LOCAL.
  1013  */
  1014 extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_TextureID textureID,
  1015                                               const SDL_Rect * rect,
  1016                                               const void *pixels, int pitch);
  1017 
  1018 /**
  1019  * \fn void SDL_LockTexture(SDL_TextureID textureID, const SDL_Rect *rect, int markDirty, void **pixels, int *pitch)
  1020  *
  1021  * \brief Lock a portion of the texture for pixel access.
  1022  *
  1023  * \param texture The texture to lock for access, which must have been created with SDL_TEXTUREACCESS_LOCAL.
  1024  * \param rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked.
  1025  * \param markDirty If this is nonzero, the locked area will be marked dirty when the texture is unlocked.
  1026  * \param pixels This is filled in with a pointer to the locked pixels, appropriately offset by the locked area.
  1027  * \param pitch This is filled in with the pitch of the locked pixels.
  1028  *
  1029  * \return 0 on success, or -1 if the texture is not valid or was created with SDL_TEXTUREACCESS_REMOTe
  1030  *
  1031  * \sa SDL_DirtyTexture()
  1032  * \sa SDL_UnlockTexture()
  1033  */
  1034 extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_TextureID textureID,
  1035                                             const SDL_Rect * rect,
  1036                                             int markDirty, void **pixels,
  1037                                             int *pitch);
  1038 
  1039 /**
  1040  * \fn void SDL_UnlockTexture(SDL_TextureID textureID)
  1041  *
  1042  * \brief Unlock a texture, uploading the changes to video memory, if needed.
  1043  *
  1044  * \sa SDL_LockTexture()
  1045  * \sa SDL_DirtyTexture()
  1046  */
  1047 extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_TextureID textureID);
  1048 
  1049 /**
  1050  * \fn void SDL_DirtyTexture(SDL_TextureID textureID, int numrects, const SDL_Rect * rects)
  1051  *
  1052  * \brief Mark the specified rectangles of the texture as dirty.
  1053  *
  1054  * \note The texture must have been created with SDL_TEXTUREACCESS_LOCAL.
  1055  *
  1056  * \sa SDL_LockTexture()
  1057  * \sa SDL_UnlockTexture()
  1058  */
  1059 extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_TextureID textureID,
  1060                                               int numrects,
  1061                                               const SDL_Rect * rects);
  1062 
  1063 /**
  1064  * \fn void SDL_RenderFill(const SDL_Rect *rect, Uint32 color)
  1065  *
  1066  * \brief Fill the current rendering target with the specified color.
  1067  *
  1068  * \param rect A pointer to the destination rectangle, or NULL for the entire rendering target.
  1069  * \param color An ARGB color value.
  1070  *
  1071  * \return 0 on success, or -1 if there is no rendering context current
  1072  */
  1073 extern DECLSPEC int SDLCALL SDL_RenderFill(const SDL_Rect * rect,
  1074                                            Uint32 color);
  1075 
  1076 /**
  1077  * \fn int SDL_RenderCopy(SDL_TextureID textureID, const SDL_Rect *srcrect, const SDL_Rect *dstrect, Uint32 blendMode, Uint32 scaleMode)
  1078  *
  1079  * \brief Copy a portion of the texture to the current rendering target.
  1080  *
  1081  * \param texture The source texture.
  1082  * \param srcrect A pointer to the source rectangle, or NULL for the entire texture.
  1083  * \param dstrect A pointer to the destination rectangle, or NULL for the entire rendering target.
  1084  * \param blendMode SDL_TextureBlendMode to be used if the source texture has an alpha channel.
  1085  * \param scaleMode SDL_TextureScaleMode to be used if the source and destination rectangles don't have the same width and height.
  1086  *
  1087  * \return 0 on success, or -1 if there is no rendering context current, or the driver doesn't support the requested operation.
  1088  *
  1089  * \note You can check the video driver info to see what operations are supported.
  1090  */
  1091 extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_TextureID textureID,
  1092                                            const SDL_Rect * srcrect,
  1093                                            const SDL_Rect * dstrect,
  1094                                            int blendMode, int scaleMode);
  1095 
  1096 /**
  1097  * \fn int SDL_RenderReadPixels(const SDL_Rect *rect, void *pixels, int pitch)
  1098  *
  1099  * \brief Read pixels from the current rendering target.
  1100  *
  1101  * \param rect A pointer to the rectangle to read, or NULL for the entire render target
  1102  * \param pixels A pointer to be filled in with the pixel data
  1103  * \param pitch The pitch of the pixels parameter
  1104  *
  1105  * \return 0 on success, or -1 if pixel reading is not supported.
  1106  *
  1107  * \warning This is a very slow operation, and should not be used frequently.
  1108  */
  1109 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
  1110                                                  void *pixels, int pitch);
  1111 
  1112 /**
  1113  * \fn int SDL_RenderWritePixels(const SDL_Rect *rect, const void *pixels, int pitch)
  1114  *
  1115  * \brief Write pixels to the current rendering target.
  1116  *
  1117  * \param rect A pointer to the rectangle to write, or NULL for the entire render target
  1118  * \param pixels A pointer to the pixel data to write
  1119  * \param pitch The pitch of the pixels parameter
  1120  *
  1121  * \return 0 on success, or -1 if pixel writing is not supported.
  1122  *
  1123  * \warning This is a very slow operation, and should not be used frequently.
  1124  */
  1125 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect,
  1126                                                   const void *pixels,
  1127                                                   int pitch);
  1128 
  1129 /**
  1130  * \fn void SDL_RenderPresent(void)
  1131  *
  1132  * \brief Update the screen with rendering performed.
  1133  */
  1134 extern DECLSPEC void SDLCALL SDL_RenderPresent(void);
  1135 
  1136 /**
  1137  * \fn void SDL_DestroyTexture(SDL_TextureID textureID);
  1138  *
  1139  * \brief Destroy the specified texture.
  1140  *
  1141  * \sa SDL_CreateTexture()
  1142  * \sa SDL_CreateTextureFromSurface()
  1143  */
  1144 extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_TextureID textureID);
  1145 
  1146 /**
  1147  * \fn void SDL_DestroyRenderer(SDL_WindowID windowID);
  1148  *
  1149  * \brief Destroy the rendering context for a window and free associated
  1150  *        textures.
  1151  *
  1152  * \sa SDL_CreateRenderer()
  1153  */
  1154 extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_WindowID windowID);
  1155 
  1156 /*
  1157  * Maps an RGB triple to an opaque pixel value for a given pixel format
  1158  */
  1159 extern DECLSPEC Uint32 SDLCALL SDL_MapRGB
  1160     (SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b);
  1161 
  1162 /*
  1163  * Maps an RGBA quadruple to a pixel value for a given pixel format
  1164  */
  1165 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat * format,
  1166                                            Uint8 r, Uint8 g, Uint8 b,
  1167                                            Uint8 a);
  1168 
  1169 /*
  1170  * Maps a pixel value into the RGB components for a given pixel format
  1171  */
  1172 extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, SDL_PixelFormat * fmt,
  1173                                         Uint8 * r, Uint8 * g, Uint8 * b);
  1174 
  1175 /*
  1176  * Maps a pixel value into the RGBA components for a given pixel format
  1177  */
  1178 extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat * fmt,
  1179                                          Uint8 * r, Uint8 * g, Uint8 * b,
  1180                                          Uint8 * a);
  1181 
  1182 /*
  1183  * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
  1184  * If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
  1185  * If the depth is greater than 8 bits, the pixel format is set using the
  1186  * flags '[RGB]mask'.
  1187  * If the function runs out of memory, it will return NULL.
  1188  *
  1189  * The 'flags' tell what kind of surface to create.
  1190  * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits.
  1191  * SDL_SRCALPHA means that the surface will be used for alpha blits.
  1192  */
  1193 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
  1194     (Uint32 flags, int width, int height, int depth,
  1195      Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
  1196 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
  1197                                                               int width,
  1198                                                               int height,
  1199                                                               int depth,
  1200                                                               int pitch,
  1201                                                               Uint32 Rmask,
  1202                                                               Uint32 Gmask,
  1203                                                               Uint32 Bmask,
  1204                                                               Uint32 Amask);
  1205 extern DECLSPEC SDL_Surface *SDLCALL
  1206 SDL_CreateRGBSurfaceFromTexture(SDL_TextureID textureID);
  1207 extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
  1208 
  1209 /**
  1210  * \fn int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
  1211  *
  1212  * \brief Set the palette used by a surface.
  1213  *
  1214  * \return 0, or -1 if the surface format doesn't use a palette.
  1215  *
  1216  * \note A single palette can be shared with many surfaces.
  1217  */
  1218 extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
  1219                                                   SDL_Palette * palette);
  1220 
  1221 /*
  1222  * SDL_LockSurface() sets up a surface for directly accessing the pixels.
  1223  * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write
  1224  * to and read from 'surface->pixels', using the pixel format stored in 
  1225  * 'surface->format'.  Once you are done accessing the surface, you should 
  1226  * use SDL_UnlockSurface() to release it.
  1227  *
  1228  * Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
  1229  * to 0, then you can read and write to the surface at any time, and the
  1230  * pixel format of the surface will not change.
  1231  * 
  1232  * No operating system or library calls should be made between lock/unlock
  1233  * pairs, as critical system locks may be held during this time.
  1234  *
  1235  * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
  1236  */
  1237 extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
  1238 extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
  1239 
  1240 /*
  1241  * Load a surface from a seekable SDL data source (memory or file.)
  1242  * If 'freesrc' is non-zero, the source will be closed after being read.
  1243  * Returns the new surface, or NULL if there was an error.
  1244  * The new surface should be freed with SDL_FreeSurface().
  1245  */
  1246 extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
  1247                                                     int freesrc);
  1248 
  1249 /* Convenience macro -- load a surface from a file */
  1250 #define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
  1251 
  1252 /*
  1253  * Save a surface to a seekable SDL data source (memory or file.)
  1254  * If 'freedst' is non-zero, the source will be closed after being written.
  1255  * Returns 0 if successful or -1 if there was an error.
  1256  */
  1257 extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
  1258     (SDL_Surface * surface, SDL_RWops * dst, int freedst);
  1259 
  1260 /* Convenience macro -- save a surface to a file */
  1261 #define SDL_SaveBMP(surface, file) \
  1262 		SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
  1263 
  1264 /*
  1265  * Sets the color key (transparent pixel) in a blittable surface.
  1266  * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL), 
  1267  * 'key' will be the transparent pixel in the source image of a blit.
  1268  * SDL_RLEACCEL requests RLE acceleration for the surface if present,
  1269  * and removes RLE acceleration if absent.
  1270  * If 'flag' is 0, this function clears any current color key.
  1271  * This function returns 0, or -1 if there was an error.
  1272  */
  1273 extern DECLSPEC int SDLCALL SDL_SetColorKey
  1274     (SDL_Surface * surface, Uint32 flag, Uint32 key);
  1275 
  1276 /*
  1277  * This function sets the alpha value for the entire surface, as opposed to
  1278  * using the alpha component of each pixel. This value measures the range
  1279  * of transparency of the surface, 0 being completely transparent to 255
  1280  * being completely opaque. An 'alpha' value of 255 causes blits to be
  1281  * opaque, the source pixels copied to the destination (the default). Note
  1282  * that per-surface alpha can be combined with colorkey transparency.
  1283  *
  1284  * If 'flag' is 0, alpha blending is disabled for the surface.
  1285  * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface.
  1286  * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the
  1287  * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed.
  1288  *
  1289  * The 'alpha' parameter is ignored for surfaces that have an alpha channel.
  1290  */
  1291 extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface * surface, Uint32 flag,
  1292                                          Uint8 alpha);
  1293 
  1294 /*
  1295  * Sets the clipping rectangle for the destination surface in a blit.
  1296  *
  1297  * If the clip rectangle is NULL, clipping will be disabled.
  1298  * If the clip rectangle doesn't intersect the surface, the function will
  1299  * return SDL_FALSE and blits will be completely clipped.  Otherwise the
  1300  * function returns SDL_TRUE and blits to the surface will be clipped to
  1301  * the intersection of the surface area and the clipping rectangle.
  1302  *
  1303  * Note that blits are automatically clipped to the edges of the source
  1304  * and destination surfaces.
  1305  */
  1306 extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
  1307                                                  const SDL_Rect * rect);
  1308 
  1309 /*
  1310  * Gets the clipping rectangle for the destination surface in a blit.
  1311  * 'rect' must be a pointer to a valid rectangle which will be filled
  1312  * with the correct values.
  1313  */
  1314 extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
  1315                                              SDL_Rect * rect);
  1316 
  1317 /*
  1318  * Creates a new surface of the specified format, and then copies and maps 
  1319  * the given surface to it so the blit of the converted surface will be as 
  1320  * fast as possible.  If this function fails, it returns NULL.
  1321  *
  1322  * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those 
  1323  * semantics.  You can also pass SDL_RLEACCEL in the flags parameter and
  1324  * SDL will try to RLE accelerate colorkey and alpha blits in the resulting
  1325  * surface.
  1326  *
  1327  * This function is used internally by SDL_DisplayFormat().
  1328  */
  1329 extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
  1330     (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
  1331 
  1332 /*
  1333  * This function performs a fast fill of the given rectangle with 'color'
  1334  * The given rectangle is clipped to the destination surface clip area
  1335  * and the final fill rectangle is saved in the passed in pointer.
  1336  * If 'dstrect' is NULL, the whole surface will be filled with 'color'
  1337  * The color should be a pixel of the format used by the surface, and 
  1338  * can be generated by the SDL_MapRGB() function.
  1339  * This function returns 0 on success, or -1 on error.
  1340  */
  1341 extern DECLSPEC int SDLCALL SDL_FillRect
  1342     (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
  1343 
  1344 /*
  1345  * This performs a fast blit from the source surface to the destination
  1346  * surface.  It assumes that the source and destination rectangles are
  1347  * the same size.  If either 'srcrect' or 'dstrect' are NULL, the entire
  1348  * surface (src or dst) is copied.  The final blit rectangles are saved
  1349  * in 'srcrect' and 'dstrect' after all clipping is performed.
  1350  * If the blit is successful, it returns 0, otherwise it returns -1.
  1351  *
  1352  * The blit function should not be called on a locked surface.
  1353  *
  1354  * The blit semantics for surfaces with and without alpha and colorkey
  1355  * are defined as follows:
  1356  *
  1357  * RGBA->RGB:
  1358  *     SDL_SRCALPHA set:
  1359  * 	alpha-blend (using alpha-channel).
  1360  * 	SDL_SRCCOLORKEY ignored.
  1361  *     SDL_SRCALPHA not set:
  1362  * 	copy RGB.
  1363  * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
  1364  * 	RGB values of the source colour key, ignoring alpha in the
  1365  * 	comparison.
  1366  * 
  1367  * RGB->RGBA:
  1368  *     SDL_SRCALPHA set:
  1369  * 	alpha-blend (using the source per-surface alpha value);
  1370  * 	set destination alpha to opaque.
  1371  *     SDL_SRCALPHA not set:
  1372  * 	copy RGB, set destination alpha to source per-surface alpha value.
  1373  *     both:
  1374  * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
  1375  * 	source colour key.
  1376  * 
  1377  * RGBA->RGBA:
  1378  *     SDL_SRCALPHA set:
  1379  * 	alpha-blend (using the source alpha channel) the RGB values;
  1380  * 	leave destination alpha untouched. [Note: is this correct?]
  1381  * 	SDL_SRCCOLORKEY ignored.
  1382  *     SDL_SRCALPHA not set:
  1383  * 	copy all of RGBA to the destination.
  1384  * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
  1385  * 	RGB values of the source colour key, ignoring alpha in the
  1386  * 	comparison.
  1387  * 
  1388  * RGB->RGB: 
  1389  *     SDL_SRCALPHA set:
  1390  * 	alpha-blend (using the source per-surface alpha value).
  1391  *     SDL_SRCALPHA not set:
  1392  * 	copy RGB.
  1393  *     both:
  1394  * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
  1395  * 	source colour key.
  1396  *
  1397  * If either of the surfaces were in video memory, and the blit returns -2,
  1398  * the video memory was lost, so it should be reloaded with artwork and 
  1399  * re-blitted:
  1400 	while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
  1401 		while ( SDL_LockSurface(image) < 0 )
  1402 			Sleep(10);
  1403 		-- Write image pixels to image->pixels --
  1404 		SDL_UnlockSurface(image);
  1405 	}
  1406  * This happens under DirectX 5.0 when the system switches away from your
  1407  * fullscreen application.  The lock will also fail until you have access
  1408  * to the video memory again.
  1409  */
  1410 /* You should call SDL_BlitSurface() unless you know exactly how SDL
  1411    blitting works internally and how to use the other blit functions.
  1412 */
  1413 #define SDL_BlitSurface SDL_UpperBlit
  1414 
  1415 /* This is the public blit function, SDL_BlitSurface(), and it performs
  1416    rectangle validation and clipping before passing it to SDL_LowerBlit()
  1417 */
  1418 extern DECLSPEC int SDLCALL SDL_UpperBlit
  1419     (SDL_Surface * src, SDL_Rect * srcrect,
  1420      SDL_Surface * dst, SDL_Rect * dstrect);
  1421 /* This is a semi-private blit function and it performs low-level surface
  1422    blitting only.
  1423 */
  1424 extern DECLSPEC int SDLCALL SDL_LowerBlit
  1425     (SDL_Surface * src, SDL_Rect * srcrect,
  1426      SDL_Surface * dst, SDL_Rect * dstrect);
  1427 
  1428 /**
  1429  * \fn int SDL_SoftStretch(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
  1430  *
  1431  * \brief Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.
  1432  *
  1433  * \note This function uses a static buffer, and is not thread-safe.
  1434  */
  1435 extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
  1436                                             SDL_Rect * srcrect,
  1437                                             SDL_Surface * dst,
  1438                                             SDL_Rect * dstrect);
  1439 
  1440 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1441 /* OpenGL support functions.                                                 */
  1442 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  1443 
  1444 /**
  1445  * \fn int SDL_GL_LoadLibrary(const char *path)
  1446  *
  1447  * \brief Dynamically load an OpenGL library.
  1448  *
  1449  * \param path The platform dependent OpenGL library name, or NULL to open the default OpenGL library
  1450  *
  1451  * \return 0 on success, or -1 if the library couldn't be loaded
  1452  *
  1453  * This should be done after initializing the video driver, but before
  1454  * creating any OpenGL windows.  If no OpenGL library is loaded, the default
  1455  * library will be loaded upon creation of the first OpenGL window.
  1456  *
  1457  * \note If you do this, you need to retrieve all of the GL functions used in
  1458  *       your program from the dynamic library using SDL_GL_GetProcAddress().
  1459  *
  1460  * \sa SDL_GL_GetProcAddress()
  1461  */
  1462 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
  1463 
  1464 /**
  1465  * \fn void *SDL_GL_GetProcAddress(const char *proc)
  1466  *
  1467  * \brief Get the address of an OpenGL function.
  1468  */
  1469 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
  1470 
  1471 /**
  1472  * \fn SDL_bool SDL_GL_ExtensionSupported(const char *extension)
  1473  *
  1474  * \brief Return true if an OpenGL extension is supported for the current context.
  1475  */
  1476 extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
  1477                                                            *extension);
  1478 
  1479 /**
  1480  * \fn int SDL_GL_SetAttribute(SDL_GLattr attr, int value)
  1481  *
  1482  * \brief Set an OpenGL window attribute before window creation.
  1483  */
  1484 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
  1485 
  1486 /**
  1487  * \fn int SDL_GL_GetWindowAttribute(SDL_WindowID windowID, SDL_GLattr attr, int *value)
  1488  *
  1489  * \brief Get the actual value for an attribute from the current context.
  1490  */
  1491 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
  1492 
  1493 /**
  1494  * \fn SDL_GLContext SDL_GL_CreateContext(SDL_WindowID windowID)
  1495  *
  1496  * \brief Create an OpenGL context for use with an OpenGL window, and make it current.
  1497  *
  1498  * \sa SDL_GL_DeleteContext()
  1499  */
  1500 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_WindowID
  1501                                                            windowID);
  1502 
  1503 /**
  1504  * \fn int SDL_GL_MakeCurrent(SDL_WindowID windowID, SDL_GLContext context)
  1505  *
  1506  * \brief Set up an OpenGL context for rendering into an OpenGL window.
  1507  *
  1508  * \note The context must have been created with a compatible window.
  1509  */
  1510 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_WindowID windowID,
  1511                                                SDL_GLContext context);
  1512 
  1513 /**
  1514  * \fn int SDL_GL_SetSwapInterval(int interval)
  1515  *
  1516  * \brief Set the swap interval for the current OpenGL context.
  1517  *
  1518  * \param interval 0 for immediate updates, 1 for updates synchronized with the vertical retrace
  1519  *
  1520  * \return 0 on success, or -1 if setting the swap interval is not supported.
  1521  *
  1522  * \sa SDL_GL_GetSwapInterval()
  1523  */
  1524 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
  1525 
  1526 /**
  1527  * \fn int SDL_GL_GetSwapInterval(void)
  1528  *
  1529  * \brief Get the swap interval for the current OpenGL context.
  1530  *
  1531  * \return 0 if there is no vertical retrace synchronization, 1 if the buffer swap is synchronized with the vertical retrace, and -1 if getting the swap interval is not supported.
  1532  *
  1533  * \sa SDL_GL_SetSwapInterval()
  1534  */
  1535 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
  1536 
  1537 /**
  1538  * \fn void SDL_GL_SwapWindow(SDL_WindowID windowID)
  1539  *
  1540  * \brief Swap the OpenGL buffers for the window, if double-buffering is supported.
  1541  */
  1542 extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_WindowID windowID);
  1543 
  1544 /**
  1545  * \fn void SDL_GL_DeleteContext(SDL_GLContext context)
  1546  *
  1547  * \brief Delete an OpenGL context.
  1548  *
  1549  * \sa SDL_GL_CreateContext()
  1550  */
  1551 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
  1552 
  1553 /**
  1554  * \def SDL_RectEmpty()
  1555  *
  1556  * \brief Returns true if the rectangle has no area.
  1557  */
  1558 #define SDL_RectEmpty(X)    (((X)->w <= 0) || ((X)->h <= 0))
  1559 
  1560 /**
  1561  * \def SDL_RectEquals()
  1562  *
  1563  * \brief Returns true if the two rectangles are equal.
  1564  */
  1565 #define SDL_RectEquals(A, B)   (((A)->x == (B)->x) && ((A)->y == (B)->y) && \
  1566                                 ((A)->w == (B)->w) && ((A)->h == (B)->h))
  1567 
  1568 /**
  1569  * \fn SDL_bool SDL_HasIntersection(const SDL_Rect * A, const SDL_Rect * B);
  1570  *
  1571  * \brief Determine whether two rectangles intersect.
  1572  *
  1573  * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
  1574  */
  1575 extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
  1576                                                      const SDL_Rect * B);
  1577 
  1578 /**
  1579  * \fn SDL_bool SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
  1580  *
  1581  * \brief Calculate the intersection of two rectangles.
  1582  *
  1583  * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
  1584  */
  1585 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
  1586                                                    const SDL_Rect * B,
  1587                                                    SDL_Rect * result);
  1588 
  1589 /**
  1590  * \fn void SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
  1591  *
  1592  * \brief Calculate the union of two rectangles
  1593  */
  1594 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
  1595                                            const SDL_Rect * B,
  1596                                            SDL_Rect * result);
  1597 
  1598 /* Ends C function definitions when using C++ */
  1599 #ifdef __cplusplus
  1600 /* *INDENT-OFF* */
  1601 }
  1602 /* *INDENT-ON* */
  1603 #endif
  1604 #include "close_code.h"
  1605 
  1606 #endif /* _SDL_video_h */
  1607 
  1608 /* vi: set ts=4 sw=4 expandtab: */