include/SDL_video.h
changeset 2275 12ea0fdc0df2
parent 2267 c785543d1843
child 2365 478fa831910f
child 2747 47519ce71def
     1.1 --- a/include/SDL_video.h	Mon Sep 10 12:11:40 2007 +0000
     1.2 +++ b/include/SDL_video.h	Mon Sep 10 12:20:02 2007 +0000
     1.3 @@ -23,16 +23,16 @@
     1.4  /**
     1.5   * \file SDL_video.h
     1.6   *
     1.7 - * Header file for access to the SDL raw framebuffer window
     1.8 + * Header file for SDL video functions.
     1.9   */
    1.10  
    1.11  #ifndef _SDL_video_h
    1.12  #define _SDL_video_h
    1.13  
    1.14  #include "SDL_stdinc.h"
    1.15 -#include "SDL_error.h"
    1.16  #include "SDL_pixels.h"
    1.17 -#include "SDL_rwops.h"
    1.18 +#include "SDL_rect.h"
    1.19 +#include "SDL_surface.h"
    1.20  
    1.21  #include "begin_code.h"
    1.22  /* Set up for C function definitions, even when using C++ */
    1.23 @@ -42,21 +42,6 @@
    1.24  /* *INDENT-ON* */
    1.25  #endif
    1.26  
    1.27 -/* Transparency definitions: These define alpha as the opacity of a surface */
    1.28 -#define SDL_ALPHA_OPAQUE 255
    1.29 -#define SDL_ALPHA_TRANSPARENT 0
    1.30 -
    1.31 -/**
    1.32 - * \struct SDL_Rect
    1.33 - *
    1.34 - * \brief A rectangle, with the origin at the upper left.
    1.35 - */
    1.36 -typedef struct SDL_Rect
    1.37 -{
    1.38 -    int x, y;
    1.39 -    int w, h;
    1.40 -} SDL_Rect;
    1.41 -
    1.42  /**
    1.43   * \struct SDL_DisplayMode
    1.44   *
    1.45 @@ -261,51 +246,6 @@
    1.46   */
    1.47  typedef void *SDL_GLContext;
    1.48  
    1.49 -
    1.50 -/* These are the currently supported flags for the SDL_surface */
    1.51 -/* Used internally (read-only) */
    1.52 -#define SDL_PREALLOC        0x00000001  /* Surface uses preallocated memory */
    1.53 -#define SDL_RLEACCEL        0x00000002  /* Surface is RLE encoded */
    1.54 -
    1.55 -/* Evaluates to true if the surface needs to be locked before access */
    1.56 -#define SDL_MUSTLOCK(S)	(((S)->flags & SDL_RLEACCEL) != 0)
    1.57 -
    1.58 -/* This structure should be treated as read-only, except for 'pixels',
    1.59 -   which, if not NULL, contains the raw pixel data for the surface.
    1.60 -*/
    1.61 -typedef struct SDL_Surface
    1.62 -{
    1.63 -    Uint32 flags;               /* Read-only */
    1.64 -    SDL_PixelFormat *format;    /* Read-only */
    1.65 -    int w, h;                   /* Read-only */
    1.66 -    int pitch;                  /* Read-only */
    1.67 -    void *pixels;               /* Read-write */
    1.68 -
    1.69 -    /* Application data associated with the surfade */
    1.70 -    void *userdata;             /* Read-write */
    1.71 -
    1.72 -    /* information needed for surfaces requiring locks */
    1.73 -    int locked;                 /* Read-only */
    1.74 -    void *lock_data;            /* Read-only */
    1.75 -
    1.76 -    /* clipping information */
    1.77 -    SDL_Rect clip_rect;         /* Read-only */
    1.78 -
    1.79 -    /* info for fast blit mapping to other surfaces */
    1.80 -    struct SDL_BlitMap *map;    /* Private */
    1.81 -
    1.82 -    /* format version, bumped at every change to invalidate blit maps */
    1.83 -    unsigned int format_version;        /* Private */
    1.84 -
    1.85 -    /* Reference count -- used when freeing surface */
    1.86 -    int refcount;               /* Read-mostly */
    1.87 -} SDL_Surface;
    1.88 -
    1.89 -/* typedef for private surface blitting functions */
    1.90 -typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
    1.91 -                         struct SDL_Surface * dst, SDL_Rect * dstrect);
    1.92 -
    1.93 -
    1.94  /**
    1.95   * \enum SDL_GLattr
    1.96   *
    1.97 @@ -1290,413 +1230,6 @@
    1.98   */
    1.99  extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_WindowID windowID);
   1.100  
   1.101 -/*
   1.102 - * Maps an RGB triple to an opaque pixel value for a given pixel format
   1.103 - */
   1.104 -extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat *
   1.105 -                                          const format, const Uint8 r,
   1.106 -                                          const Uint8 g, const Uint8 b);
   1.107 -
   1.108 -/*
   1.109 - * Maps an RGBA quadruple to a pixel value for a given pixel format
   1.110 - */
   1.111 -extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * const fmt,
   1.112 -                                           const Uint8 r, const Uint8 g,
   1.113 -                                           const Uint8 b, const Uint8 a);
   1.114 -
   1.115 -/*
   1.116 - * Maps a pixel value into the RGB components for a given pixel format
   1.117 - */
   1.118 -extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, SDL_PixelFormat * fmt,
   1.119 -                                        Uint8 * r, Uint8 * g, Uint8 * b);
   1.120 -
   1.121 -/*
   1.122 - * Maps a pixel value into the RGBA components for a given pixel format
   1.123 - */
   1.124 -extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat * fmt,
   1.125 -                                         Uint8 * r, Uint8 * g, Uint8 * b,
   1.126 -                                         Uint8 * a);
   1.127 -
   1.128 -/*
   1.129 - * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
   1.130 - * If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
   1.131 - * If the depth is greater than 8 bits, the pixel format is set using the
   1.132 - * flags '[RGB]mask'.
   1.133 - * If the function runs out of memory, it will return NULL.
   1.134 - *
   1.135 - * The 'flags' tell what kind of surface to create.
   1.136 - * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits.
   1.137 - * SDL_SRCALPHA means that the surface will be used for alpha blits.
   1.138 - */
   1.139 -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
   1.140 -    (Uint32 flags, int width, int height, int depth,
   1.141 -     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
   1.142 -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
   1.143 -                                                              int width,
   1.144 -                                                              int height,
   1.145 -                                                              int depth,
   1.146 -                                                              int pitch,
   1.147 -                                                              Uint32 Rmask,
   1.148 -                                                              Uint32 Gmask,
   1.149 -                                                              Uint32 Bmask,
   1.150 -                                                              Uint32 Amask);
   1.151 -extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
   1.152 -
   1.153 -/**
   1.154 - * \fn int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
   1.155 - *
   1.156 - * \brief Set the palette used by a surface.
   1.157 - *
   1.158 - * \return 0, or -1 if the surface format doesn't use a palette.
   1.159 - *
   1.160 - * \note A single palette can be shared with many surfaces.
   1.161 - */
   1.162 -extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
   1.163 -                                                  SDL_Palette * palette);
   1.164 -
   1.165 -/*
   1.166 - * SDL_LockSurface() sets up a surface for directly accessing the pixels.
   1.167 - * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write
   1.168 - * to and read from 'surface->pixels', using the pixel format stored in 
   1.169 - * 'surface->format'.  Once you are done accessing the surface, you should 
   1.170 - * use SDL_UnlockSurface() to release it.
   1.171 - *
   1.172 - * Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
   1.173 - * to 0, then you can read and write to the surface at any time, and the
   1.174 - * pixel format of the surface will not change.
   1.175 - * 
   1.176 - * No operating system or library calls should be made between lock/unlock
   1.177 - * pairs, as critical system locks may be held during this time.
   1.178 - *
   1.179 - * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
   1.180 - */
   1.181 -extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
   1.182 -extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
   1.183 -
   1.184 -/*
   1.185 - * Load a surface from a seekable SDL data source (memory or file.)
   1.186 - * If 'freesrc' is non-zero, the source will be closed after being read.
   1.187 - * Returns the new surface, or NULL if there was an error.
   1.188 - * The new surface should be freed with SDL_FreeSurface().
   1.189 - */
   1.190 -extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
   1.191 -                                                    int freesrc);
   1.192 -
   1.193 -/* Convenience macro -- load a surface from a file */
   1.194 -#define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
   1.195 -
   1.196 -/*
   1.197 - * Save a surface to a seekable SDL data source (memory or file.)
   1.198 - * If 'freedst' is non-zero, the source will be closed after being written.
   1.199 - * Returns 0 if successful or -1 if there was an error.
   1.200 - */
   1.201 -extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
   1.202 -    (SDL_Surface * surface, SDL_RWops * dst, int freedst);
   1.203 -
   1.204 -/* Convenience macro -- save a surface to a file */
   1.205 -#define SDL_SaveBMP(surface, file) \
   1.206 -		SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
   1.207 -
   1.208 -/*
   1.209 - * \fn int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
   1.210 - *
   1.211 - * \brief Sets the RLE acceleration hint for a surface.
   1.212 - *
   1.213 - * \return 0 on success, or -1 if the surface is not valid
   1.214 - *
   1.215 - * \note If RLE is enabled, colorkey and alpha blending blits are much faster,
   1.216 - *       but the surface must be locked before directly accessing the pixels.
   1.217 - */
   1.218 -extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
   1.219 -                                              int flag);
   1.220 -
   1.221 -/*
   1.222 - * \fn int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key)
   1.223 - *
   1.224 - * \brief Sets the color key (transparent pixel) in a blittable surface.
   1.225 - *
   1.226 - * \param surface The surface to update
   1.227 - * \param flag Non-zero to enable colorkey and 0 to disable colorkey 
   1.228 - * \param key The transparent pixel in the native surface format
   1.229 - *
   1.230 - * \return 0 on success, or -1 if the surface is not valid
   1.231 - */
   1.232 -extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
   1.233 -                                            Uint32 flag, Uint32 key);
   1.234 -
   1.235 -/**
   1.236 - * \fn int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
   1.237 - *
   1.238 - * \brief Set an additional color value used in blit operations
   1.239 - *
   1.240 - * \param surface The surface to update
   1.241 - * \param r The red source color value multiplied into blit operations
   1.242 - * \param g The green source color value multiplied into blit operations
   1.243 - * \param b The blue source color value multiplied into blit operations
   1.244 - *
   1.245 - * \return 0 on success, or -1 if the surface is not valid
   1.246 - *
   1.247 - * \sa SDL_GetSurfaceColorMod()
   1.248 - */
   1.249 -extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
   1.250 -                                                   Uint8 r, Uint8 g, Uint8 b);
   1.251 -
   1.252 -
   1.253 -/**
   1.254 - * \fn int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
   1.255 - *
   1.256 - * \brief Get the additional color value used in blit operations
   1.257 - *
   1.258 - * \param surface The surface to query
   1.259 - * \param r A pointer filled in with the source red color value
   1.260 - * \param g A pointer filled in with the source green color value
   1.261 - * \param b A pointer filled in with the source blue color value
   1.262 - *
   1.263 - * \return 0 on success, or -1 if the surface is not valid
   1.264 - *
   1.265 - * \sa SDL_SetSurfaceColorMod()
   1.266 - */
   1.267 -extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
   1.268 -                                                   Uint8 * r, Uint8 * g,
   1.269 -                                                   Uint8 * b);
   1.270 -
   1.271 -/**
   1.272 - * \fn int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
   1.273 - *
   1.274 - * \brief Set an additional alpha value used in blit operations
   1.275 - *
   1.276 - * \param surface The surface to update
   1.277 - * \param alpha The source alpha value multiplied into blit operations.
   1.278 - *
   1.279 - * \return 0 on success, or -1 if the surface is not valid
   1.280 - *
   1.281 - * \sa SDL_GetSurfaceAlphaMod()
   1.282 - */
   1.283 -extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
   1.284 -                                                   Uint8 alpha);
   1.285 -
   1.286 -/**
   1.287 - * \fn int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
   1.288 - *
   1.289 - * \brief Get the additional alpha value used in blit operations
   1.290 - *
   1.291 - * \param surface The surface to query
   1.292 - * \param alpha A pointer filled in with the source alpha value
   1.293 - *
   1.294 - * \return 0 on success, or -1 if the surface is not valid
   1.295 - *
   1.296 - * \sa SDL_SetSurfaceAlphaMod()
   1.297 - */
   1.298 -extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
   1.299 -                                                   Uint8 * alpha);
   1.300 -
   1.301 -/**
   1.302 - * \fn int SDL_SetSurfaceBlendMode(SDL_Surface *surface, int blendMode)
   1.303 - *
   1.304 - * \brief Set the blend mode used for blit operations
   1.305 - *
   1.306 - * \param surface The surface to update
   1.307 - * \param blendMode SDL_TextureBlendMode to use for blit blending
   1.308 - *
   1.309 - * \return 0 on success, or -1 if the parameters are not valid
   1.310 - *
   1.311 - * \sa SDL_GetSurfaceBlendMode()
   1.312 - */
   1.313 -extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
   1.314 -                                                    int blendMode);
   1.315 -
   1.316 -/**
   1.317 - * \fn int SDL_GetSurfaceBlendMode(SDL_Surface *surface, int *blendMode)
   1.318 - *
   1.319 - * \brief Get the blend mode used for blit operations
   1.320 - *
   1.321 - * \param surface The surface to query
   1.322 - * \param blendMode A pointer filled in with the current blend mode
   1.323 - *
   1.324 - * \return 0 on success, or -1 if the surface is not valid
   1.325 - *
   1.326 - * \sa SDL_SetSurfaceBlendMode()
   1.327 - */
   1.328 -extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
   1.329 -                                                    int *blendMode);
   1.330 -
   1.331 -/**
   1.332 - * \fn int SDL_SetSurfaceScaleMode(SDL_Surface *surface, int scaleMode)
   1.333 - *
   1.334 - * \brief Set the scale mode used for blit operations
   1.335 - *
   1.336 - * \param surface The surface to update
   1.337 - * \param scaleMode SDL_TextureScaleMode to use for blit scaling
   1.338 - *
   1.339 - * \return 0 on success, or -1 if the surface is not valid or the scale mode is not supported
   1.340 - *
   1.341 - * \note If the scale mode is not supported, the closest supported mode is chosen.  Currently only SDL_TEXTURESCALEMODE_FAST is supported on surfaces.
   1.342 - *
   1.343 - * \sa SDL_GetSurfaceScaleMode()
   1.344 - */
   1.345 -extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface,
   1.346 -                                                    int scaleMode);
   1.347 -
   1.348 -/**
   1.349 - * \fn int SDL_GetSurfaceScaleMode(SDL_Surface *surface, int *scaleMode)
   1.350 - *
   1.351 - * \brief Get the scale mode used for blit operations
   1.352 - *
   1.353 - * \param surface The surface to query
   1.354 - * \param scaleMode A pointer filled in with the current scale mode
   1.355 - *
   1.356 - * \return 0 on success, or -1 if the surface is not valid
   1.357 - *
   1.358 - * \sa SDL_SetSurfaceScaleMode()
   1.359 - */
   1.360 -extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface,
   1.361 -                                                    int *scaleMode);
   1.362 -
   1.363 -/*
   1.364 - * Sets the clipping rectangle for the destination surface in a blit.
   1.365 - *
   1.366 - * If the clip rectangle is NULL, clipping will be disabled.
   1.367 - * If the clip rectangle doesn't intersect the surface, the function will
   1.368 - * return SDL_FALSE and blits will be completely clipped.  Otherwise the
   1.369 - * function returns SDL_TRUE and blits to the surface will be clipped to
   1.370 - * the intersection of the surface area and the clipping rectangle.
   1.371 - *
   1.372 - * Note that blits are automatically clipped to the edges of the source
   1.373 - * and destination surfaces.
   1.374 - */
   1.375 -extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
   1.376 -                                                 const SDL_Rect * rect);
   1.377 -
   1.378 -/*
   1.379 - * Gets the clipping rectangle for the destination surface in a blit.
   1.380 - * 'rect' must be a pointer to a valid rectangle which will be filled
   1.381 - * with the correct values.
   1.382 - */
   1.383 -extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
   1.384 -                                             SDL_Rect * rect);
   1.385 -
   1.386 -/*
   1.387 - * Creates a new surface of the specified format, and then copies and maps 
   1.388 - * the given surface to it so the blit of the converted surface will be as 
   1.389 - * fast as possible.  If this function fails, it returns NULL.
   1.390 - *
   1.391 - * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those 
   1.392 - * semantics.  You can also pass SDL_RLEACCEL in the flags parameter and
   1.393 - * SDL will try to RLE accelerate colorkey and alpha blits in the resulting
   1.394 - * surface.
   1.395 - *
   1.396 - * This function is used internally by SDL_DisplayFormat().
   1.397 - */
   1.398 -extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
   1.399 -    (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
   1.400 -
   1.401 -/*
   1.402 - * This function performs a fast fill of the given rectangle with 'color'
   1.403 - * The given rectangle is clipped to the destination surface clip area
   1.404 - * and the final fill rectangle is saved in the passed in pointer.
   1.405 - * If 'dstrect' is NULL, the whole surface will be filled with 'color'
   1.406 - * The color should be a pixel of the format used by the surface, and 
   1.407 - * can be generated by the SDL_MapRGB() function.
   1.408 - * This function returns 0 on success, or -1 on error.
   1.409 - */
   1.410 -extern DECLSPEC int SDLCALL SDL_FillRect
   1.411 -    (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
   1.412 -
   1.413 -/*
   1.414 - * This performs a fast blit from the source surface to the destination
   1.415 - * surface.  It assumes that the source and destination rectangles are
   1.416 - * the same size.  If either 'srcrect' or 'dstrect' are NULL, the entire
   1.417 - * surface (src or dst) is copied.  The final blit rectangles are saved
   1.418 - * in 'srcrect' and 'dstrect' after all clipping is performed.
   1.419 - * If the blit is successful, it returns 0, otherwise it returns -1.
   1.420 - *
   1.421 - * The blit function should not be called on a locked surface.
   1.422 - *
   1.423 - * The blit semantics for surfaces with and without alpha and colorkey
   1.424 - * are defined as follows:
   1.425 - *
   1.426 - * RGBA->RGB:
   1.427 - *     SDL_SRCALPHA set:
   1.428 - * 	alpha-blend (using alpha-channel).
   1.429 - * 	SDL_SRCCOLORKEY ignored.
   1.430 - *     SDL_SRCALPHA not set:
   1.431 - * 	copy RGB.
   1.432 - * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.433 - * 	RGB values of the source colour key, ignoring alpha in the
   1.434 - * 	comparison.
   1.435 - * 
   1.436 - * RGB->RGBA:
   1.437 - *     SDL_SRCALPHA set:
   1.438 - * 	alpha-blend (using the source per-surface alpha value);
   1.439 - * 	set destination alpha to opaque.
   1.440 - *     SDL_SRCALPHA not set:
   1.441 - * 	copy RGB, set destination alpha to source per-surface alpha value.
   1.442 - *     both:
   1.443 - * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.444 - * 	source colour key.
   1.445 - * 
   1.446 - * RGBA->RGBA:
   1.447 - *     SDL_SRCALPHA set:
   1.448 - * 	alpha-blend (using the source alpha channel) the RGB values;
   1.449 - * 	leave destination alpha untouched. [Note: is this correct?]
   1.450 - * 	SDL_SRCCOLORKEY ignored.
   1.451 - *     SDL_SRCALPHA not set:
   1.452 - * 	copy all of RGBA to the destination.
   1.453 - * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.454 - * 	RGB values of the source colour key, ignoring alpha in the
   1.455 - * 	comparison.
   1.456 - * 
   1.457 - * RGB->RGB: 
   1.458 - *     SDL_SRCALPHA set:
   1.459 - * 	alpha-blend (using the source per-surface alpha value).
   1.460 - *     SDL_SRCALPHA not set:
   1.461 - * 	copy RGB.
   1.462 - *     both:
   1.463 - * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.464 - * 	source colour key.
   1.465 - *
   1.466 - * If either of the surfaces were in video memory, and the blit returns -2,
   1.467 - * the video memory was lost, so it should be reloaded with artwork and 
   1.468 - * re-blitted:
   1.469 -	while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
   1.470 -		while ( SDL_LockSurface(image) < 0 )
   1.471 -			Sleep(10);
   1.472 -		-- Write image pixels to image->pixels --
   1.473 -		SDL_UnlockSurface(image);
   1.474 -	}
   1.475 - * This happens under DirectX 5.0 when the system switches away from your
   1.476 - * fullscreen application.  The lock will also fail until you have access
   1.477 - * to the video memory again.
   1.478 - */
   1.479 -/* You should call SDL_BlitSurface() unless you know exactly how SDL
   1.480 -   blitting works internally and how to use the other blit functions.
   1.481 -*/
   1.482 -#define SDL_BlitSurface SDL_UpperBlit
   1.483 -
   1.484 -/* This is the public blit function, SDL_BlitSurface(), and it performs
   1.485 -   rectangle validation and clipping before passing it to SDL_LowerBlit()
   1.486 -*/
   1.487 -extern DECLSPEC int SDLCALL SDL_UpperBlit
   1.488 -    (SDL_Surface * src, SDL_Rect * srcrect,
   1.489 -     SDL_Surface * dst, SDL_Rect * dstrect);
   1.490 -/* This is a semi-private blit function and it performs low-level surface
   1.491 -   blitting only.
   1.492 -*/
   1.493 -extern DECLSPEC int SDLCALL SDL_LowerBlit
   1.494 -    (SDL_Surface * src, SDL_Rect * srcrect,
   1.495 -     SDL_Surface * dst, SDL_Rect * dstrect);
   1.496 -
   1.497 -/**
   1.498 - * \fn int SDL_SoftStretch(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
   1.499 - *
   1.500 - * \brief Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.
   1.501 - *
   1.502 - * \note This function uses a static buffer, and is not thread-safe.
   1.503 - */
   1.504 -extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
   1.505 -                                            SDL_Rect * srcrect,
   1.506 -                                            SDL_Surface * dst,
   1.507 -                                            SDL_Rect * dstrect);
   1.508  
   1.509  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   1.510  /* OpenGL support functions.                                                 */
   1.511 @@ -1811,50 +1344,6 @@
   1.512   */
   1.513  extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
   1.514  
   1.515 -/**
   1.516 - * \def SDL_RectEmpty()
   1.517 - *
   1.518 - * \brief Returns true if the rectangle has no area.
   1.519 - */
   1.520 -#define SDL_RectEmpty(X)    (((X)->w <= 0) || ((X)->h <= 0))
   1.521 -
   1.522 -/**
   1.523 - * \def SDL_RectEquals()
   1.524 - *
   1.525 - * \brief Returns true if the two rectangles are equal.
   1.526 - */
   1.527 -#define SDL_RectEquals(A, B)   (((A)->x == (B)->x) && ((A)->y == (B)->y) && \
   1.528 -                                ((A)->w == (B)->w) && ((A)->h == (B)->h))
   1.529 -
   1.530 -/**
   1.531 - * \fn SDL_bool SDL_HasIntersection(const SDL_Rect * A, const SDL_Rect * B);
   1.532 - *
   1.533 - * \brief Determine whether two rectangles intersect.
   1.534 - *
   1.535 - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
   1.536 - */
   1.537 -extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,
   1.538 -                                                     const SDL_Rect * B);
   1.539 -
   1.540 -/**
   1.541 - * \fn SDL_bool SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
   1.542 - *
   1.543 - * \brief Calculate the intersection of two rectangles.
   1.544 - *
   1.545 - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
   1.546 - */
   1.547 -extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,
   1.548 -                                                   const SDL_Rect * B,
   1.549 -                                                   SDL_Rect * result);
   1.550 -
   1.551 -/**
   1.552 - * \fn void SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
   1.553 - *
   1.554 - * \brief Calculate the union of two rectangles
   1.555 - */
   1.556 -extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,
   1.557 -                                           const SDL_Rect * B,
   1.558 -                                           SDL_Rect * result);
   1.559  
   1.560  /* Ends C function definitions when using C++ */
   1.561  #ifdef __cplusplus