diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index d2ffdf25..72247f07 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -16,6 +16,8 @@ Please report any bugs and incompatibilities in represents the shadow frame buffer of the screen. * configure option: `--enable-syncupdate` * macro: `_MGUSE_SYNC_UPDATE` + 1. New API: `UpdateInvalidClient`. You can use this function to update + the invalid client region of a window instantly. 1. Use different colors for the output of `_DBG_PRINTF` and `_ERR_PRINTF`. 1. Add `__mg_save_jpg` function for storing MYBITMAP as JPEG file (10km). 1. Modified logic for checking JPEG format (10km). diff --git a/include/window.h b/include/window.h index 1b812d06..8c2dae99 100644 --- a/include/window.h +++ b/include/window.h @@ -5338,6 +5338,22 @@ MG_EXPORT void GUIAPI DumpWindow (FILE* fp, HWND hWnd); */ MG_EXPORT void GUIAPI UpdateWindow (HWND hWnd, BOOL bErase); +/** + * \fn void GUIAPI UpdateInvalidClient (HWND hWnd, BOOL bErase) + * \brief Updates the invalid client areas in a window. + * + * This function updates the client areas specified by \a hWnd. + * It will redraw the invalid client area of the window, and + * if \b bErase is TRUE, the client area will be erased by using + * background color. + * + * \param hWnd The handle to the window. + * \param bErase Indicates whether to erase the client area of the window. + * + * \sa UpdateWindow + */ +MG_EXPORT void GUIAPI UpdateInvalidClient (HWND hWnd, BOOL bErase); + /** * \fn BOOL GUIAPI ShowWindow (HWND hWnd, int iCmdShow) * \brief Shows or hides a window. diff --git a/src/gui/window.c b/src/gui/window.c index 0c4b37bd..37b10c15 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -3977,8 +3977,7 @@ void GUIAPI UpdateWindow (HWND hWnd, BOOL fErase) #endif } -MG_EXPORT void GUIAPI UpdateInvalidRect (HWND hWnd, BOOL bErase); -void GUIAPI UpdateInvalidRect (HWND hWnd, BOOL fErase) +void GUIAPI UpdateInvalidClient (HWND hWnd, BOOL fErase) { MG_CHECK (MG_IS_NORMAL_WINDOW(hWnd));