mirror of
https://github.com/encounter/SDL.git
synced 2025-12-13 15:16:13 +00:00
Implement bare minimum for SDL_FlashWindow
This commit is contained in:
@@ -176,6 +176,7 @@ WIN_CreateDevice(int devindex)
|
||||
device->OnWindowEnter = WIN_OnWindowEnter;
|
||||
device->SetWindowHitTest = WIN_SetWindowHitTest;
|
||||
device->AcceptDragAndDrop = WIN_AcceptDragAndDrop;
|
||||
device->FlashWindow = WIN_FlashWindow;
|
||||
|
||||
device->shape_driver.CreateShaper = Win32_CreateShaper;
|
||||
device->shape_driver.SetWindowShape = Win32_SetWindowShape;
|
||||
|
||||
@@ -1084,6 +1084,24 @@ WIN_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept)
|
||||
DragAcceptFiles(data->hwnd, accept ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
int
|
||||
WIN_FlashWindow(_THIS, SDL_Window * window, Uint32 flash_count)
|
||||
{
|
||||
HWND hwnd;
|
||||
FLASHWINFO desc;
|
||||
|
||||
hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
|
||||
desc.cbSize = sizeof(desc);
|
||||
desc.hwnd = hwnd;
|
||||
desc.dwFlags = FLASHW_TRAY;
|
||||
desc.uCount = flash_count; /* flash x times */
|
||||
desc.dwTimeout = 0;
|
||||
|
||||
FlashWindowEx(&desc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SDL_VIDEO_DRIVER_WINDOWS */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
||||
@@ -86,6 +86,7 @@ extern void WIN_OnWindowEnter(_THIS, SDL_Window * window);
|
||||
extern void WIN_UpdateClipCursor(SDL_Window *window);
|
||||
extern int WIN_SetWindowHitTest(SDL_Window *window, SDL_bool enabled);
|
||||
extern void WIN_AcceptDragAndDrop(SDL_Window * window, SDL_bool accept);
|
||||
extern int WIN_FlashWindow(_THIS, SDL_Window * window, Uint32 flash_count);
|
||||
|
||||
#endif /* SDL_windowswindow_h_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user