From 55a4566a3314cdaddab678c91bda6100e951b310 Mon Sep 17 00:00:00 2001 From: VincentWei Date: Sun, 28 Jan 2018 11:37:56 +0800 Subject: [PATCH] use UINT for message --- include/window.h | 8 ++++---- src/kernel/desktop-comm.c | 6 +++--- src/kernel/message.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/window.h b/include/window.h index 3691c458..f6daa260 100644 --- a/include/window.h +++ b/include/window.h @@ -2782,7 +2782,7 @@ MG_EXPORT BOOL GUIAPI EmptyMessageQueue (HWND hWnd); #ifdef _MGHAVE_MSG_STRING /** - * \fn const char* GUIAPI Message2Str (int message) + * \fn const char* GUIAPI Message2Str (UINT message) * \brief Translates a message identifier to the message string. * * This function returns the message string of the message identifier \a message. @@ -2795,7 +2795,7 @@ MG_EXPORT BOOL GUIAPI EmptyMessageQueue (HWND hWnd); * * \sa PrintMessage */ -MG_EXPORT const char* GUIAPI Message2Str (int message); +MG_EXPORT const char* GUIAPI Message2Str (UINT message); /** * \fn void GUIAPI PrintMessage (FILE* fp, HWND hWnd, \ @@ -2841,12 +2841,12 @@ MG_EXPORT void GUIAPI PrintMessage (FILE* fp, HWND hWnd, /** * \var typedef int (* MSGHOOK)(void* context, HWND dst_wnd, \ - * int msg, WPARAM wparam, LPARAM lparam) + * UINT msg, WPARAM wparam, LPARAM lparam) * * \brief Type of message hook function. */ typedef int (* MSGHOOK)(void* context, HWND dst_wnd, - int msg, WPARAM wparam, LPARAM lparam); + UINT msg, WPARAM wparam, LPARAM lparam); /** * Structure defines a message hook. diff --git a/src/kernel/desktop-comm.c b/src/kernel/desktop-comm.c index 6c16fdfc..60d12731 100644 --- a/src/kernel/desktop-comm.c +++ b/src/kernel/desktop-comm.c @@ -672,7 +672,7 @@ static MSGHOOK dskRegisterMouseHook (void* context, MSGHOOK hook) return old_hook; } -static int dskHandleKeyHooks (HWND dst_wnd, int message, +static int dskHandleKeyHooks (HWND dst_wnd, UINT message, WPARAM wParam, LPARAM lParam) { int ret = HOOK_GOON; @@ -684,7 +684,7 @@ static int dskHandleKeyHooks (HWND dst_wnd, int message, return ret; } -static int dskHandleMouseHooks (HWND dst_wnd, int message, +static int dskHandleMouseHooks (HWND dst_wnd, UINT message, WPARAM wParam, LPARAM lParam) { int ret = HOOK_GOON; @@ -1215,7 +1215,7 @@ static int dskCancelDragWindow (PMAINWIN pWin) return 0; } -static int do_drag_drop_window (int msg, int x, int y) +static int do_drag_drop_window (UINT msg, int x, int y) { if (_dd_info.hwnd == 0) return 0; diff --git a/src/kernel/message.c b/src/kernel/message.c index 890d0186..4683177b 100644 --- a/src/kernel/message.c +++ b/src/kernel/message.c @@ -404,7 +404,7 @@ int GUIAPI BroadcastMessage (UINT nMsg, WPARAM wParam, LPARAM lParam) #ifdef _MGHAVE_MSG_STRING #include "msgstr.h" -const char* GUIAPI Message2Str (int message) +const char* GUIAPI Message2Str (UINT message) { if (message >= 0x0000 && message <= 0x006F) return __mg_msgstr1 [message];