include/SDL_video.h
changeset 5466 006883d5fa51
parent 5403 424f036f7c68
child 5504 469da3d31cbd
     1.1 --- a/include/SDL_video.h	Thu Mar 10 01:03:43 2011 -0800
     1.2 +++ b/include/SDL_video.h	Fri Mar 11 08:49:20 2011 -0800
     1.3 @@ -605,6 +605,66 @@
     1.4  extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
     1.5  
     1.6  /**
     1.7 + *  \brief Set the brightness (gamma correction) for a window.
     1.8 + *  
     1.9 + *  \return 0 on success, or -1 if setting the brightness isn't supported.
    1.10 + *  
    1.11 + *  \sa SDL_GetWindowBrightness()
    1.12 + *  \sa SDL_SetWindowGammaRamp()
    1.13 + */
    1.14 +extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
    1.15 +
    1.16 +/**
    1.17 + *  \brief Get the brightness (gamma correction) for a window.
    1.18 + *  
    1.19 + *  \return The last brightness value passed to SDL_SetWindowBrightness()
    1.20 + *  
    1.21 + *  \sa SDL_SetWindowBrightness()
    1.22 + */
    1.23 +extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
    1.24 +
    1.25 +/**
    1.26 + *  \brief Set the gamma ramp for a window.
    1.27 + *  
    1.28 + *  \param red The translation table for the red channel, or NULL.
    1.29 + *  \param green The translation table for the green channel, or NULL.
    1.30 + *  \param blue The translation table for the blue channel, or NULL.
    1.31 + *  
    1.32 + *  \return 0 on success, or -1 if gamma ramps are unsupported.
    1.33 + *  
    1.34 + *  Set the gamma translation table for the red, green, and blue channels
    1.35 + *  of the video hardware.  Each table is an array of 256 16-bit quantities,
    1.36 + *  representing a mapping between the input and output for that channel.
    1.37 + *  The input is the index into the array, and the output is the 16-bit
    1.38 + *  gamma value at that index, scaled to the output color precision.
    1.39 + *
    1.40 + *  \sa SDL_SetWindowGammaRamp()
    1.41 + */
    1.42 +extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
    1.43 +                                                   const Uint16 * red,
    1.44 +                                                   const Uint16 * green,
    1.45 +                                                   const Uint16 * blue);
    1.46 +
    1.47 +/**
    1.48 + *  \brief Get the gamma ramp for a window.
    1.49 + *  
    1.50 + *  \param red   A pointer to a 256 element array of 16-bit quantities to hold 
    1.51 + *               the translation table for the red channel, or NULL.
    1.52 + *  \param green A pointer to a 256 element array of 16-bit quantities to hold 
    1.53 + *               the translation table for the green channel, or NULL.
    1.54 + *  \param blue  A pointer to a 256 element array of 16-bit quantities to hold 
    1.55 + *               the translation table for the blue channel, or NULL.
    1.56 + *   
    1.57 + *  \return 0 on success, or -1 if gamma ramps are unsupported.
    1.58 + *  
    1.59 + *  \sa SDL_SetWindowGammaRamp()
    1.60 + */
    1.61 +extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
    1.62 +                                                   Uint16 * red,
    1.63 +                                                   Uint16 * green,
    1.64 +                                                   Uint16 * blue);
    1.65 +
    1.66 +/**
    1.67   *  \brief Destroy a window.
    1.68   */
    1.69  extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);