From 173171b653519a461011ea3dc665a72a6c92124a Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Fri, 26 Jul 2019 12:07:32 +0800 Subject: [PATCH] use -1 instead of 0xFFFFFFFF for ON_UPDSECDC_DONOTHING; chang return type of GetGDCapability to Uint32 --- include/gdi.h | 6 +++--- src/newgdi/gdi.c | 6 +++--- src/sysres/mgetc.c | 2 +- src/sysres/mgetc_win32.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/gdi.h b/include/gdi.h index c7f67de9..1cc90548 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -1155,7 +1155,7 @@ MG_EXPORT BOOL GUIAPI InitPolygonRegion (PCLIPRGN dst, #define GDCAP_DPI_MINIMAL 36 /** - * \fn unsigned int GUIAPI GetGDCapability (HDC hdc, int iItem) + * \fn Uint32 GUIAPI GetGDCapability (HDC hdc, int iItem) * \brief Returns a capability of a DC. * * This function returns the capability of the specified item \a iItem of @@ -1201,7 +1201,7 @@ MG_EXPORT BOOL GUIAPI InitPolygonRegion (PCLIPRGN dst, * * \return The capbility. */ -MG_EXPORT unsigned int GUIAPI GetGDCapability (HDC hdc, int iItem); +MG_EXPORT Uint32 GUIAPI GetGDCapability (HDC hdc, int iItem); /** * \fn HDC GUIAPI GetDC (HWND hwnd) @@ -1911,7 +1911,7 @@ typedef int (* ON_UPDATE_SECONDARYDC)(HWND hwnd, HDC secondary_dc, const RECT* main_update_rc); #define ON_UPDSECDC_DEFAULT ((ON_UPDATE_SECONDARYDC)0) -#define ON_UPDSECDC_DONOTHING ((ON_UPDATE_SECONDARYDC)0xFFFFFFFF) +#define ON_UPDSECDC_DONOTHING ((ON_UPDATE_SECONDARYDC)-1) /** * \fn HDC GUIAPI SetSecondaryDC (HWND hwnd, HDC secondary_dc, \ diff --git a/src/newgdi/gdi.c b/src/newgdi/gdi.c index 4930ec48..e88da4fb 100644 --- a/src/newgdi/gdi.c +++ b/src/newgdi/gdi.c @@ -337,17 +337,17 @@ void mg_TerminateGDI( void ) #endif /* - * Function: int GUIAPI GetGDCapability( int iItem) + * Function: Uint32 GUIAPI GetGDCapability( int iItem) * This Function return DC parameters. * Parameters: * The element want to retrive. * Return: * The parameter. */ -unsigned int GUIAPI GetGDCapability (HDC hdc, int iItem) +Uint32 GUIAPI GetGDCapability (HDC hdc, int iItem) { PDC pdc; - unsigned int iret = 0xFFFFFFFF; + Uint32 iret = 0xFFFFFFFF; pdc = dc_HDC2PDC (hdc); diff --git a/src/sysres/mgetc.c b/src/sysres/mgetc.c index 13b946cb..42065178 100644 --- a/src/sysres/mgetc.c +++ b/src/sysres/mgetc.c @@ -496,7 +496,7 @@ static char* _flat_values[]={ "1", "16", //window element colors - "0xFFFFFFFFF", + "0xFFFFFFFF", "0xFF000000", "0xFF000000", "0xFF000000", diff --git a/src/sysres/mgetc_win32.c b/src/sysres/mgetc_win32.c index acf82298..6017e0e4 100644 --- a/src/sysres/mgetc_win32.c +++ b/src/sysres/mgetc_win32.c @@ -497,7 +497,7 @@ static char* _flat_values[]={ "1", "16", //window element colors - "0xFFFFFFFFF", + "0xFFFFFFFF", "0xFF000000", "0xFF000000", "0xFF000000",