include/SDL_shape.h
changeset 4781 fc4c775b468a
parent 4780 4f915a47b995
child 4782 b6930aefd008
     1.1 --- a/include/SDL_shape.h	Sat Jun 19 23:10:57 2010 -0400
     1.2 +++ b/include/SDL_shape.h	Mon Jun 21 23:08:10 2010 -0400
     1.3 @@ -39,11 +39,11 @@
     1.4  
     1.5  /** \file SDL_shape.h
     1.6   *
     1.7 - * Header file for shaped windows.
     1.8 + * Header file for the shaped window API.
     1.9   */
    1.10  
    1.11  /**
    1.12 - *  \brief Create a shaped window with the specified position, dimensions, and flags.
    1.13 + *  \brief Create a window that can be shaped with the specified position, dimensions, and flags.
    1.14   *  
    1.15   *  \param title The title of the window, in UTF-8 encoding.
    1.16   *  \param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or 
    1.17 @@ -69,13 +69,18 @@
    1.18   *
    1.19   * \param window The window to query for being shaped.
    1.20   *
    1.21 - * \return SDL_TRUE if the window is a shaped window and SDL_FALSE otherwise.
    1.22 + * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.
    1.23   * \sa SDL_CreateShapedWindow
    1.24   */
    1.25 -extern DECLSPEC SDL_bool SDLCALL SDL_WindowIsShaped(const SDL_Window *window);
    1.26 +extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
    1.27  
    1.28  /** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
    1.29 -typedef enum {ShapeModeDefault, ShapeModeBinarizeAlpha} WindowShapeMode;
    1.30 +typedef enum {
    1.31 +	/** \brief The default mode, a binarized alpha cutoff of 1. */
    1.32 +	ShapeModeDefault,
    1.33 +	/** \brief A binarized alpha cutoff with a given integer value. */
    1.34 +	ShapeModeBinarizeAlpha
    1.35 +} WindowShapeMode;
    1.36  /** \brief A union containing parameters for shaped windows. */
    1.37  typedef union {
    1.38  	/** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */
    1.39 @@ -94,29 +99,30 @@
    1.40   * \brief Set the shape and parameters of a shaped window.
    1.41   *
    1.42   * \param window The shaped window whose parameters should be set.
    1.43 - * \param shape A surface encoding the desired shape for the window as a bitmap mask.
    1.44 - * \param parameters The parameters to set for the shaped window.
    1.45 + * \param shape A surface encoding the desired shape for the window.
    1.46 + * \param shapeMode The parameters to set for the shaped window.
    1.47   *
    1.48   * \return 0 on success, -1 on invalid an invalid shape argument, or -2 if the SDL_Window* given does not reference
    1.49   *         a valid shaped window.
    1.50   *
    1.51   * \sa SDL_WindowShapeMode
    1.52 - * \sa SDL_GetShapeParameters.
    1.53 + * \sa SDL_GetShapedWindowMode.
    1.54   */
    1.55 -extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode parameters);
    1.56 +extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode);
    1.57  
    1.58  /**
    1.59 - * \brief Set the shape parameters of a shaped window.
    1.60 + * \brief Get the shape parameters of a shaped window.
    1.61   *
    1.62   * \param window The shaped window whose parameters should be retrieved.
    1.63   * \param shapeMode An empty shape-parameters structure to fill.
    1.64   *
    1.65 - * \return 0 on success, -1 on a null shapeMode, or -2 if the SDL_Window given is not a shaped window.
    1.66 + * \return 0 on success, -1 on a null shapeMode, or -2 if the SDL_Window given is not a shaped window, or -3 if the
    1.67 + *         SDL_Window given is a window that can be shaped but isn't.
    1.68   *
    1.69   * \sa SDL_WindowShapeMode
    1.70 - * \sa SDL_SetShapeParameters
    1.71 + * \sa SDL_SetWindowShape
    1.72   */
    1.73 -extern DECLSPEC int SDLCALL SDL_GetShapeParameters(SDL_Window *window,SDL_WindowShapeMode *shapeMode);
    1.74 +extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shapeMode);
    1.75  
    1.76  /* Ends C function definitions when using C++ */
    1.77  #ifdef __cplusplus