summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2009-07-21 16:07:56 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2009-07-26 15:15:37 +0100
commitb3751454cbe02ee952bab213e8c3684d429c41b3 (patch)
treeace39a9edffc46696c69e5761aa2ef94fd5e4d26 /hw
parentc81595e23b48368dafc054f023c1dd16bbad9494 (diff)
Cygwin/X: Update Get/SetWindowLong() to Get/SetWindowLongPtr() everywhere
Get/SetWindowLong() is superseded by Get/SetWindowLongPtr(), so change to using that everywhere it remains Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'hw')
-rwxr-xr-xhw/xwin/windialogs.c24
-rw-r--r--hw/xwin/winmultiwindowwindow.c2
-rw-r--r--hw/xwin/winprefs.c4
3 files changed, 15 insertions, 15 deletions
diff --git a/hw/xwin/windialogs.c b/hw/xwin/windialogs.c
index 0cfddc6b8..0bcf0d7cd 100755
--- a/hw/xwin/windialogs.c
+++ b/hw/xwin/windialogs.c
@@ -150,7 +150,7 @@ winURLWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SetCursor (cursor);
return TRUE;
}
- origCB = (WNDPROC)GetWindowLong (hwnd, GWL_USERDATA);
+ origCB = (WNDPROC)GetWindowLongPtr(hwnd, GWL_USERDATA);
/* Otherwise fall through to original WndProc */
if (origCB)
return CallWindowProc (origCB, hwnd, msg, wParam, lParam);
@@ -167,19 +167,19 @@ static void
winOverrideURLButton (HWND hwnd, int id)
{
WNDPROC origCB;
- origCB = (WNDPROC)SetWindowLong (GetDlgItem (hwnd, id),
- GWL_WNDPROC, (LONG)winURLWndProc);
- SetWindowLong (GetDlgItem (hwnd, id), GWL_USERDATA, (LONG)origCB);
+ origCB = (WNDPROC)SetWindowLongPtr(GetDlgItem (hwnd, id),
+ GWL_WNDPROC, (LONG_PTR)winURLWndProc);
+ SetWindowLongPtr(GetDlgItem (hwnd, id), GWL_USERDATA, (LONG_PTR)origCB);
}
static void
winUnoverrideURLButton (HWND hwnd, int id)
{
WNDPROC origCB;
- origCB = (WNDPROC)SetWindowLong (GetDlgItem (hwnd, id),
- GWL_USERDATA, 0);
+ origCB = (WNDPROC)SetWindowLongPtr(GetDlgItem (hwnd, id),
+ GWL_USERDATA, 0);
if (origCB)
- SetWindowLong (GetDlgItem (hwnd, id), GWL_WNDPROC, (LONG)origCB);
+ SetWindowLongPtr(GetDlgItem (hwnd, id), GWL_WNDPROC, (LONG_PTR)origCB);
}
@@ -200,13 +200,13 @@ winInitDialog (HWND hwndDlg)
hwndDesk = GetDesktopWindow ();
/* Remove minimize and maximize buttons */
- SetWindowLong (hwndDlg, GWL_STYLE,
- GetWindowLong (hwndDlg, GWL_STYLE)
- & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX));
+ SetWindowLongPtr(hwndDlg, GWL_STYLE,
+ GetWindowLongPtr(hwndDlg, GWL_STYLE)
+ & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX));
/* Set Window not to show in the task bar */
- SetWindowLong (hwndDlg, GWL_EXSTYLE,
- GetWindowLong (hwndDlg, GWL_EXSTYLE) & ~WS_EX_APPWINDOW );
+ SetWindowLongPtr(hwndDlg, GWL_EXSTYLE,
+ GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_APPWINDOW );
/* Center dialog window in the screen. Not done for multi-monitor systems, where
* it is likely to end up split across the screens. In that case, it appears
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 8b18aeb50..e2b5ed291 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -575,7 +575,7 @@ winCreateWindowsWindow (WindowPtr pWin)
if (hIconSmall) SendMessage (hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall);
/* Change style back to popup, already placed... */
- SetWindowLong (hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
SetWindowPos (hWnd, 0, 0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
/* Make sure it gets the proper system menu for a WS_POPUP, too */
diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c
index fe49ae224..d5bceb928 100644
--- a/hw/xwin/winprefs.c
+++ b/hw/xwin/winprefs.c
@@ -313,7 +313,7 @@ HandleCustomWM_INITMENU(unsigned long hwndIn,
if (!hwnd || !hmenu)
return;
- if (GetWindowLong (hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
+ if (GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST)
dwExStyle = MF_BYCOMMAND | MF_CHECKED;
else
dwExStyle = MF_BYCOMMAND | MF_UNCHECKED;
@@ -408,7 +408,7 @@ HandleCustomWM_COMMAND (unsigned long hwndIn,
return FALSE;
/* Get extended window style */
- dwExStyle = GetWindowLong (hwnd, GWL_EXSTYLE);
+ dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
/* Handle topmost windows */
if (dwExStyle & WS_EX_TOPMOST)