mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 13:15:10 +00:00
Added a window flash operation to be explicit about window flash behavior
This commit is contained in:
@@ -1440,15 +1440,6 @@ 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
|
||||
|
||||
@@ -64,6 +64,7 @@ typedef struct
|
||||
const char *window_title;
|
||||
const char *window_icon;
|
||||
Uint32 window_flags;
|
||||
SDL_bool flash_on_focus_loss;
|
||||
int window_x;
|
||||
int window_y;
|
||||
int window_w;
|
||||
|
||||
@@ -188,6 +188,9 @@ typedef enum
|
||||
SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
|
||||
} SDL_DisplayEventID;
|
||||
|
||||
/**
|
||||
* \brief Display orientation
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
|
||||
@@ -197,6 +200,16 @@ typedef enum
|
||||
SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
|
||||
} SDL_DisplayOrientation;
|
||||
|
||||
/**
|
||||
* \brief Window flash operation
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_FLASH_CANCEL, /**< Cancel any window flash state */
|
||||
SDL_FLASH_BRIEFLY, /**< Flash the window briefly to get attention */
|
||||
SDL_FLASH_UNTIL_FOCUSED, /**< Flash the window until it gets focus */
|
||||
} SDL_FlashOperation;
|
||||
|
||||
/**
|
||||
* \brief An opaque handle to an OpenGL context.
|
||||
*/
|
||||
@@ -1511,10 +1524,11 @@ extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
|
||||
* Request a window to demand attention from the user.
|
||||
*
|
||||
* \param window the window to be flashed
|
||||
* \param the flash operation
|
||||
* \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);
|
||||
extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation);
|
||||
|
||||
/**
|
||||
* Destroy a window.
|
||||
|
||||
Reference in New Issue
Block a user