diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2013-08-09 16:48:12 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-08-30 12:56:35 +0100 |
commit | 390cfec10ef7d52391f890c7593ac82a7d77d856 (patch) | |
tree | 72876b9e95ae08fd4b0ed140d667b51b1a74b5c6 | |
parent | e716baedc4d8e52a60f43ef21aba771b340d8c8b (diff) |
hw/xwin: Correct winprefs.c function signatures for x64.
Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and
HandleCustomWM_COMMAND() function signatures which use unsigned long parameters,
where just a specific HWND or HMENU handle type should have been used.
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 6 | ||||
-rw-r--r-- | hw/xwin/winprefs.c | 22 | ||||
-rw-r--r-- | hw/xwin/winprefs.h | 8 | ||||
-rw-r--r-- | hw/xwin/wintrayicon.c | 2 |
4 files changed, 13 insertions, 25 deletions
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 9292e73ca..a888f08ef 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -420,14 +420,14 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* * Add whatever the setup file wants to for this window */ - SetupSysMenu((unsigned long) hwnd); + SetupSysMenu(hwnd); return 0; case WM_SYSCOMMAND: /* * Any window menu items go through here */ - if (HandleCustomWM_COMMAND((unsigned long) hwnd, LOWORD(wParam))) { + if (HandleCustomWM_COMMAND(hwnd, LOWORD(wParam))) { /* Don't pass customized menus to DefWindowProc */ return 0; } @@ -443,7 +443,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_INITMENU: /* Checks/Unchecks any menu items before they are displayed */ - HandleCustomWM_INITMENU((unsigned long) hwnd, wParam); + HandleCustomWM_INITMENU(hwnd, (HMENU)wParam); break; case WM_ERASEBKGND: diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index 8936aae63..f386facdd 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -188,7 +188,7 @@ ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam) } /* Update the system menu for this window */ - SetupSysMenu((unsigned long) hwnd); + SetupSysMenu(hwnd); /* That was easy... */ } @@ -275,15 +275,11 @@ ReloadPrefs(void) * Check/uncheck the ALWAYSONTOP items in this menu */ void -HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn) +HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu) { - HWND hwnd; - HMENU hmenu; DWORD dwExStyle; int i, j; - hwnd = (HWND) hwndIn; - hmenu = (HMENU) hmenuIn; if (!hwnd || !hmenu) return; @@ -305,15 +301,12 @@ HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn) * Return TRUE if command is proccessed, FALSE otherwise. */ Bool -HandleCustomWM_COMMAND(unsigned long hwndIn, int command) +HandleCustomWM_COMMAND(HWND hwnd, int command) { - HWND hwnd; int i, j; MENUPARSED *m; DWORD dwExStyle; - hwnd = (HWND) hwndIn; - if (!command) return FALSE; @@ -412,15 +405,13 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command) * Add the default or a custom menu depending on the class match */ void -SetupSysMenu(unsigned long hwndIn) +SetupSysMenu(HWND hwnd) { - HWND hwnd; HMENU sys; int i; WindowPtr pWin; char *res_name, *res_class; - hwnd = (HWND) hwndIn; if (!hwnd) return; @@ -465,11 +456,8 @@ SetupSysMenu(unsigned long hwndIn) * Possibly add a menu to the toolbar icon */ void -SetupRootMenu(unsigned long hmenuRoot) +SetupRootMenu(HMENU root) { - HMENU root; - - root = (HMENU) hmenuRoot; if (!root) return; diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h index a4a6e7eec..8f4eb0807 100644 --- a/hw/xwin/winprefs.h +++ b/hw/xwin/winprefs.h @@ -150,16 +150,16 @@ void LoadPreferences(void); void - SetupRootMenu(unsigned long hmenuRoot); + SetupRootMenu(HMENU root); void - SetupSysMenu(unsigned long hwndIn); + SetupSysMenu(HWND hwnd); void - HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn); + HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu); Bool - HandleCustomWM_COMMAND(unsigned long hwndIn, int command); + HandleCustomWM_COMMAND(HWND hwnd, int command); int winIconIsOverride(HICON hicon); diff --git a/hw/xwin/wintrayicon.c b/hw/xwin/wintrayicon.c index f168b884a..e0aa7e5ab 100644 --- a/hw/xwin/wintrayicon.c +++ b/hw/xwin/wintrayicon.c @@ -170,7 +170,7 @@ winHandleIconMessage(HWND hwnd, UINT message, RemoveMenu(hmenuTray, ID_APP_HIDE_ROOT, MF_BYCOMMAND); } - SetupRootMenu((unsigned long) hmenuTray); + SetupRootMenu(hmenuTray); /* * NOTE: This three-step procedure is required for |