include/SDL_video.h
changeset 5165 2b1989f59674
parent 5154 fb424691cfc7
child 5166 4d39eeaad00b
     1.1 --- a/include/SDL_video.h	Thu Feb 03 10:03:55 2011 -0800
     1.2 +++ b/include/SDL_video.h	Thu Feb 03 11:16:57 2011 -0800
     1.3 @@ -483,24 +483,39 @@
     1.4                                                 SDL_Surface * icon);
     1.5  
     1.6  /**
     1.7 - *  \brief Associate an arbitrary pointer with a window.
     1.8 + *  \brief Associate an arbitrary named pointer with a window.
     1.9   *  
    1.10 + *  \param window   The window to associate with the pointer.
    1.11 + *  \param name     The name of the pointer.
    1.12 + *  \param userdata The associated pointer.
    1.13 + *
    1.14 + *  \return The previous value associated with 'name'
    1.15 + *
    1.16 + *  \note The name is case-sensitive.
    1.17 + *
    1.18   *  \sa SDL_GetWindowData()
    1.19   */
    1.20 -extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_Window * window,
    1.21 -                                               void *userdata);
    1.22 +extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
    1.23 +                                                const char *name,
    1.24 +                                                void *userdata);
    1.25  
    1.26  /**
    1.27   *  \brief Retrieve the data pointer associated with a window.
    1.28   *  
    1.29 + *  \param window   The window to query.
    1.30 + *  \param name     The name of the pointer.
    1.31 + *
    1.32 + *  \return The value associated with 'name'
    1.33 + *  
    1.34   *  \sa SDL_SetWindowData()
    1.35   */
    1.36 -extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window);
    1.37 +extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
    1.38 +                                                const char *name);
    1.39  
    1.40  /**
    1.41   *  \brief Set the position of a window.
    1.42   *  
    1.43 - *  \param window The window to reposition.
    1.44 + *  \param window   The window to reposition.
    1.45   *  \param x        The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
    1.46                      ::SDL_WINDOWPOS_UNDEFINED.
    1.47   *  \param y        The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or