comparison include/SDL_video.h @ 5168:2b1989f59674

Extended SDL_SetWindowData() to allow arbitrary named values.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 03 Feb 2011 11:16:57 -0800
parents fb424691cfc7
children 4d39eeaad00b
comparison
equal deleted inserted replaced
5167:97423d858a1a 5168:2b1989f59674
481 */ 481 */
482 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, 482 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
483 SDL_Surface * icon); 483 SDL_Surface * icon);
484 484
485 /** 485 /**
486 * \brief Associate an arbitrary pointer with a window. 486 * \brief Associate an arbitrary named pointer with a window.
487 * 487 *
488 * \param window The window to associate with the pointer.
489 * \param name The name of the pointer.
490 * \param userdata The associated pointer.
491 *
492 * \return The previous value associated with 'name'
493 *
494 * \note The name is case-sensitive.
495 *
488 * \sa SDL_GetWindowData() 496 * \sa SDL_GetWindowData()
489 */ 497 */
490 extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_Window * window, 498 extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
491 void *userdata); 499 const char *name,
500 void *userdata);
492 501
493 /** 502 /**
494 * \brief Retrieve the data pointer associated with a window. 503 * \brief Retrieve the data pointer associated with a window.
495 * 504 *
505 * \param window The window to query.
506 * \param name The name of the pointer.
507 *
508 * \return The value associated with 'name'
509 *
496 * \sa SDL_SetWindowData() 510 * \sa SDL_SetWindowData()
497 */ 511 */
498 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window); 512 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
513 const char *name);
499 514
500 /** 515 /**
501 * \brief Set the position of a window. 516 * \brief Set the position of a window.
502 * 517 *
503 * \param window The window to reposition. 518 * \param window The window to reposition.
504 * \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or 519 * \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
505 ::SDL_WINDOWPOS_UNDEFINED. 520 ::SDL_WINDOWPOS_UNDEFINED.
506 * \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or 521 * \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
507 ::SDL_WINDOWPOS_UNDEFINED. 522 ::SDL_WINDOWPOS_UNDEFINED.
508 * 523 *