include/SDL_video.h
branchSDL-1.3
changeset 1733 0b1070f2f94d
parent 1729 0ef52d56e8bb
child 1734 f7c667ded87d
     1.1 --- a/include/SDL_video.h	Sat Jul 08 20:55:39 2006 +0000
     1.2 +++ b/include/SDL_video.h	Sun Jul 09 09:02:26 2006 +0000
     1.3 @@ -98,6 +98,7 @@
     1.4   * \sa SDL_RaiseWindow()
     1.5   * \sa SDL_RestoreWindow()
     1.6   * \sa SDL_SetWindowData()
     1.7 + * \sa SDL_SetWindowFullscreen()
     1.8   * \sa SDL_SetWindowGrab()
     1.9   * \sa SDL_SetWindowIcon()
    1.10   * \sa SDL_SetWindowPosition()
    1.11 @@ -474,15 +475,28 @@
    1.12                                                                     * closest);
    1.13  
    1.14  /**
    1.15 - * \fn int SDL_SetDisplayMode(const SDL_DisplayMode *mode)
    1.16 + * \fn int SDL_SetFullscreenDisplayMode(const SDL_DisplayMode *mode)
    1.17   *
    1.18 - * \brief Set up the closest available mode on the current display.
    1.19 + * \brief Set the display mode used when a fullscreen window is visible
    1.20 + *        on the currently selected display.
    1.21   *
    1.22 - * \param mode The desired display mode, or NULL to set the desktop mode.
    1.23 + * \param mode The mode to use, or NULL for the desktop mode.
    1.24   *
    1.25   * \return 0 on success, or -1 if setting the display mode failed.
    1.26 + *
    1.27 + * \sa SDL_SetWindowFullscreen()
    1.28   */
    1.29 -extern DECLSPEC int SDLCALL SDL_SetDisplayMode(const SDL_DisplayMode * mode);
    1.30 +extern DECLSPEC int SDLCALL SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
    1.31 +                                                         * mode);
    1.32 +
    1.33 +/**
    1.34 + * \fn const SDL_DisplayMode *SDL_GetFullscreenDisplayMode(void)
    1.35 + *
    1.36 + * \brief Query the display mode used when a fullscreen window is visible
    1.37 + *        on the currently selected display.
    1.38 + */
    1.39 +extern DECLSPEC const SDL_DisplayMode *SDLCALL
    1.40 +SDL_GetFullscreenDisplayMode(void);
    1.41  
    1.42  /**
    1.43   * \fn int SDL_SetDisplayPalette(const SDL_Color *colors, int firstcolor, int ncolors)
    1.44 @@ -507,6 +521,57 @@
    1.45                                                    int ncolors);
    1.46  
    1.47  /**
    1.48 + * \fn int SDL_SetGamma(float red, float green, float blue)
    1.49 + *
    1.50 + * \brief Set the gamma correction for each of the color channels on the currently selected display.
    1.51 + *
    1.52 + * \return 0 on success, or -1 if setting the gamma isn't supported.
    1.53 + *
    1.54 + * \sa SDL_SetGammaRamp()
    1.55 + */
    1.56 +extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
    1.57 +
    1.58 +/**
    1.59 + * \fn int SDL_SetGammaRamp(const Uint16 * red, const Uint16 * green, const Uint16 * blue)
    1.60 + *
    1.61 + * \brief Set the gamma ramp for the currently selected display.
    1.62 + *
    1.63 + * \param red The translation table for the red channel, or NULL
    1.64 + * \param green The translation table for the green channel, or NULL
    1.65 + * \param blue The translation table for the blue channel, or NULL
    1.66 + *
    1.67 + * \return 0 on success, or -1 if gamma ramps are unsupported.
    1.68 + *
    1.69 + * Set the gamma translation table for the red, green, and blue channels
    1.70 + * of the video hardware.  Each table is an array of 256 16-bit quantities,
    1.71 + * representing a mapping between the input and output for that channel.
    1.72 + * The input is the index into the array, and the output is the 16-bit
    1.73 + * gamma value at that index, scaled to the output color precision.
    1.74 + * 
    1.75 + * \sa SDL_GetGammaRamp()
    1.76 + */
    1.77 +extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
    1.78 +                                             const Uint16 * green,
    1.79 +                                             const Uint16 * blue);
    1.80 +
    1.81 +/**
    1.82 + * \fn int SDL_GetGammaRamp(Uint16 * red, Uint16 * green, Uint16 * blue)
    1.83 + *
    1.84 + * \brief Get the gamma ramp for the currently selected display.
    1.85 + *
    1.86 + * \param red A pointer to a 256 element array of 16-bit quantities to hold the translation table for the red channel, or NULL.
    1.87 + * \param green A pointer to a 256 element array of 16-bit quantities to hold the translation table for the green channel, or NULL.
    1.88 + * \param blue A pointer to a 256 element array of 16-bit quantities to hold the translation table for the blue channel, or NULL.
    1.89 + * 
    1.90 + * \return 0 on success, or -1 if gamma ramps are unsupported.
    1.91 + *
    1.92 + * \sa SDL_SetGammaRamp()
    1.93 + */
    1.94 +extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
    1.95 +                                             Uint16 * blue);
    1.96 +
    1.97 +
    1.98 +/**
    1.99   * \fn SDL_WindowID SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
   1.100   *
   1.101   * \brief Create a window with the specified position, dimensions, and flags.
   1.102 @@ -516,7 +581,7 @@
   1.103   * \param y The y position of the window
   1.104   * \param w The width of the window
   1.105   * \param h The height of the window
   1.106 - * \param flags The flags for the window
   1.107 + * \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
   1.108   *
   1.109   * \return The id of the window created, or zero if window creation failed.
   1.110   *
   1.111 @@ -702,13 +767,24 @@
   1.112  extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_WindowID windowID);
   1.113  
   1.114  /**
   1.115 + * \fn int SDL_SetWindowFullscreen(SDL_WindowID windowID, int fullscreen)
   1.116 + *
   1.117 + * \brief Set the window's fullscreen state.
   1.118 + *
   1.119 + * \return 0 on success, or -1 if setting the display mode failed.
   1.120 + *
   1.121 + * \sa SDL_SetFullscreenDisplayMode()
   1.122 + */
   1.123 +extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_WindowID windowID,
   1.124 +                                                    int fullscreen);
   1.125 +
   1.126 +/**
   1.127   * \fn void SDL_SetWindowGrab(SDL_WindowID windowID, int mode)
   1.128   *
   1.129   * \brief Set the window's input grab mode.
   1.130   *
   1.131   * \param mode This is 1 to grab input, and 0 to release input.
   1.132   *
   1.133 - * \sa SDL_GrabMode
   1.134   * \sa SDL_GetWindowGrab()
   1.135   */
   1.136  extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID,
   1.137 @@ -721,7 +797,6 @@
   1.138   *
   1.139   * \return This returns 1 if input is grabbed, and 0 otherwise.
   1.140   *
   1.141 - * \sa SDL_GrabMode
   1.142   * \sa SDL_SetWindowGrab()
   1.143   */
   1.144  extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_WindowID windowID);
   1.145 @@ -1070,44 +1145,6 @@
   1.146  extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_WindowID windowID);
   1.147  
   1.148  /*
   1.149 - * Set the gamma correction for each of the color channels.
   1.150 - * The gamma values range (approximately) between 0.1 and 10.0
   1.151 - * 
   1.152 - * If this function isn't supported directly by the hardware, it will
   1.153 - * be emulated using gamma ramps, if available.  If successful, this
   1.154 - * function returns 0, otherwise it returns -1.
   1.155 - */
   1.156 -extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
   1.157 -
   1.158 -/*
   1.159 - * Set the gamma translation table for the red, green, and blue channels
   1.160 - * of the video hardware.  Each table is an array of 256 16-bit quantities,
   1.161 - * representing a mapping between the input and output for that channel.
   1.162 - * The input is the index into the array, and the output is the 16-bit
   1.163 - * gamma value at that index, scaled to the output color precision.
   1.164 - * 
   1.165 - * You may pass NULL for any of the channels to leave it unchanged.
   1.166 - * If the call succeeds, it will return 0.  If the display driver or
   1.167 - * hardware does not support gamma translation, or otherwise fails,
   1.168 - * this function will return -1.
   1.169 - */
   1.170 -extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
   1.171 -                                             const Uint16 * green,
   1.172 -                                             const Uint16 * blue);
   1.173 -
   1.174 -/*
   1.175 - * Retrieve the current values of the gamma translation tables.
   1.176 - * 
   1.177 - * You must pass in valid pointers to arrays of 256 16-bit quantities.
   1.178 - * Any of the pointers may be NULL to ignore that channel.
   1.179 - * If the call succeeds, it will return 0.  If the display driver or
   1.180 - * hardware does not support gamma translation, or otherwise fails,
   1.181 - * this function will return -1.
   1.182 - */
   1.183 -extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
   1.184 -                                             Uint16 * blue);
   1.185 -
   1.186 -/*
   1.187   * Maps an RGB triple to an opaque pixel value for a given pixel format
   1.188   */
   1.189  extern DECLSPEC Uint32 SDLCALL SDL_MapRGB