include/SDL_video.h
changeset 4929 aa8888658021
parent 4887 0a77d2fc95ad
child 4971 158bb5752974
     1.1 --- a/include/SDL_video.h	Thu Dec 02 11:56:23 2010 -0800
     1.2 +++ b/include/SDL_video.h	Sun Dec 12 15:19:05 2010 -0800
     1.3 @@ -32,6 +32,8 @@
     1.4  #include "SDL_stdinc.h"
     1.5  #include "SDL_pixels.h"
     1.6  #include "SDL_rect.h"
     1.7 +#include "SDL_blendmode.h"
     1.8 +#include "SDL_scalemode.h"
     1.9  #include "SDL_surface.h"
    1.10  
    1.11  #include "begin_code.h"
    1.12 @@ -214,38 +216,6 @@
    1.13  } SDL_TextureModulate;
    1.14  
    1.15  /**
    1.16 - *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
    1.17 - */
    1.18 -typedef enum
    1.19 -{
    1.20 -    SDL_BLENDMODE_NONE = 0x00000000,     /**< No blending */
    1.21 -    SDL_BLENDMODE_MASK = 0x00000001,     /**< dst = A ? src : dst 
    1.22 -                                              (alpha is mask) */
    1.23 -    
    1.24 -    SDL_BLENDMODE_BLEND = 0x00000002,    /**< dst = (src * A) + (dst * (1-A)) */
    1.25 -    SDL_BLENDMODE_ADD = 0x00000004,      /**< dst = (src * A) + dst */
    1.26 -    SDL_BLENDMODE_MOD = 0x00000008       /**< dst = src * dst */
    1.27 -} SDL_BlendMode;
    1.28 -
    1.29 -/**
    1.30 - *  \brief The texture scale mode used in SDL_RenderCopy().
    1.31 - */
    1.32 -typedef enum
    1.33 -{
    1.34 -    SDL_TEXTURESCALEMODE_NONE = 0x00000000,     /**< No scaling, rectangles must
    1.35 -                                                     match dimensions */
    1.36 -    
    1.37 -    SDL_TEXTURESCALEMODE_FAST = 0x00000001,     /**< Point sampling or 
    1.38 -                                                     equivalent algorithm */
    1.39 -    
    1.40 -    SDL_TEXTURESCALEMODE_SLOW = 0x00000002,     /**< Linear filtering or 
    1.41 -                                                     equivalent algorithm */
    1.42 -    
    1.43 -    SDL_TEXTURESCALEMODE_BEST = 0x00000004      /**< Bicubic filtering or 
    1.44 -                                                     equivalent algorithm */
    1.45 -} SDL_TextureScaleMode;
    1.46 -
    1.47 -/**
    1.48   *  \brief An efficient driver-specific representation of pixel data
    1.49   */
    1.50  struct SDL_Texture;
    1.51 @@ -986,7 +956,7 @@
    1.52   *  \sa SDL_GetTextureBlendMode()
    1.53   */
    1.54  extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
    1.55 -                                                    int blendMode);
    1.56 +                                                    SDL_BlendMode blendMode);
    1.57  
    1.58  /**
    1.59   *  \brief Get the blend mode used for texture copy operations.
    1.60 @@ -999,13 +969,13 @@
    1.61   *  \sa SDL_SetTextureBlendMode()
    1.62   */
    1.63  extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
    1.64 -                                                    int *blendMode);
    1.65 +                                                    SDL_BlendMode *blendMode);
    1.66  
    1.67  /**
    1.68   *  \brief Set the scale mode used for texture copy operations.
    1.69   *  
    1.70   *  \param texture The texture to update.
    1.71 - *  \param scaleMode ::SDL_TextureScaleMode to use for texture scaling.
    1.72 + *  \param scaleMode ::SDL_ScaleMode to use for texture scaling.
    1.73   *  
    1.74   *  \return 0 on success, or -1 if the texture is not valid or the scale mode is
    1.75   *          not supported.
    1.76 @@ -1016,7 +986,7 @@
    1.77   *  \sa SDL_GetTextureScaleMode()
    1.78   */
    1.79  extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
    1.80 -                                                    int scaleMode);
    1.81 +                                                    SDL_ScaleMode scaleMode);
    1.82  
    1.83  /**
    1.84   *  \brief Get the scale mode used for texture copy operations.
    1.85 @@ -1029,7 +999,7 @@
    1.86   *  \sa SDL_SetTextureScaleMode()
    1.87   */
    1.88  extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
    1.89 -                                                    int *scaleMode);
    1.90 +                                                    SDL_ScaleMode *scaleMode);
    1.91  
    1.92  /**
    1.93   *  \brief Update the given texture rectangle with new pixel data.
    1.94 @@ -1135,7 +1105,7 @@
    1.95   *  
    1.96   *  \sa SDL_GetRenderDrawBlendMode()
    1.97   */
    1.98 -extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(int blendMode);
    1.99 +extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode);
   1.100  
   1.101  /**
   1.102   *  \brief Get the blend mode used for drawing operations.
   1.103 @@ -1146,7 +1116,7 @@
   1.104   *  
   1.105   *  \sa SDL_SetRenderDrawBlendMode()
   1.106   */
   1.107 -extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode);
   1.108 +extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_BlendMode *blendMode);
   1.109  
   1.110  /**
   1.111   *  \brief Clear the current rendering target with the drawing color