Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows

This commit is contained in:
Sam Lantinga
2021-07-24 12:11:27 -07:00
parent 09d1cea733
commit e1c3a25034
14 changed files with 40 additions and 22 deletions

View File

@@ -1440,6 +1440,15 @@ extern "C" {
*/
#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
/**
* \brief Controls the number of times a window flashes with SDL_FlashWindow()
*
* On Windows, if this variable is set, the SDL_FlashWindow() call will flash
* the specified number of times. Otherwise the window will flash until it
* becomes the foreground window.
*/
#define SDL_HINT_WINDOW_FLASH_COUNT "SDL_WINDOW_FLASH_COUNT"
/**
* \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
* The 0x406D1388 Exception is a trick used to inform Visual Studio of a

View File

@@ -1510,14 +1510,11 @@ extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
/**
* Request a window to demand attention from the user.
*
* \param window the window to request the flashing for
* \param flash_count number of times the window gets flashed on systems that
* support flashing the window multiple times, like
* Windows, else it is ignored
* \param window the window to be flashed
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*/
extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, Uint32 flash_count);
extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window);
/**
* Destroy a window.