Author: paullanders Date: Wed Oct 12 18:30:03 2016 New Revision: 40146 URL: http://svn.gna.org/viewcvs/gnustep?rev=40146&view=rev Log: change calls from getWindowLong to getWindowLongPtr for 64bit compatibility
Modified: libs/back/branches/gnustep_testplant_branch/Source/cairo/Win32CairoSurface.m libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.h libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.mm libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm libs/back/branches/gnustep_testplant_branch/Source/win32/WIN32Server.m libs/back/branches/gnustep_testplant_branch/Source/win32/w32_create.m libs/back/branches/gnustep_testplant_branch/Source/win32/w32_general.m libs/back/branches/gnustep_testplant_branch/Source/win32/w32_movesize.m libs/back/branches/gnustep_testplant_branch/Source/win32/w32_windowdisplay.m Modified: libs/back/branches/gnustep_testplant_branch/Source/cairo/Win32CairoSurface.m URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/cairo/Win32CairoSurface.m?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/cairo/Win32CairoSurface.m (original) +++ libs/back/branches/gnustep_testplant_branch/Source/cairo/Win32CairoSurface.m Wed Oct 12 18:30:03 2016 @@ -47,7 +47,7 @@ gsDevice = device; _surface = NULL; - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong(device, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr(device, GWLP_USERDATA); HDC hDC = GetDC(device); if (hDC == NULL) Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.h URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.h?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.h (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.h Wed Oct 12 18:30:03 2016 @@ -24,8 +24,8 @@ // Whenever this restriction is lifted, we can get rid of it here as well. #if __has_feature(objc_default_synthesize_properties) +#include <GNUstepBase/GSConfig.h> #include <windows.h> -#include <GNUstepBase/GSConfig.h> // C++ header includes... #include <string> Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.mm URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.mm?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.mm (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/MSUserNotification.mm Wed Oct 12 18:30:03 2016 @@ -49,7 +49,10 @@ #include <stdio.h> #include <windows.h> #include <ShellAPI.h> +#define CINTERFACE +#define interface struct #include <shlwapi.h> +#undef interface #include <gdiplus/gdiplus.h> #include <iostream> @@ -335,7 +338,7 @@ { NSLog(@"%s:UUIDString: %@", __PRETTY_FUNCTION__, uuidString); GUID theGUID = { 0 }; - NSUInteger value = 0; + unsigned int value = 0; NSArray *components = [uuidString componentsSeparatedByString: @"-"]; NSScanner *scanner1 = [NSScanner scannerWithString: [components objectAtIndex: 0]]; NSScanner *scanner2 = [NSScanner scannerWithString: [components objectAtIndex: 1]]; @@ -343,10 +346,10 @@ NSString *data4 = [[components objectAtIndex: 3] stringByAppendingString: [components objectAtIndex: 4]]; NSScanner *scanner4 = [NSScanner scannerWithString: data4]; - [scanner1 scanHexInt: (NSUInteger*)&theGUID.Data1]; - [scanner2 scanHexInt: (NSUInteger*)&value]; + [scanner1 scanHexInt: (unsigned int*)&theGUID.Data1]; + [scanner2 scanHexInt: &value]; theGUID.Data2 = (WORD) value; - [scanner3 scanHexInt: (NSUInteger*)&value]; + [scanner3 scanHexInt: &value]; theGUID.Data3 = (WORD) value; return theGUID; Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm Wed Oct 12 18:30:03 2016 @@ -23,7 +23,10 @@ #include <Foundation/NSValue.h> #include <ShellAPI.h> +#define CINTERFACE +#define interface struct #include <shlwapi.h> +#undef interface //#include <Winuser.h> #include <rpcdce.h> @@ -45,6 +48,12 @@ #endif #if !defined(NIN_BALLOONUSERCLICK) #define NIN_BALLOONUSERCLICK (WM_USER + 5) +#endif +#if !defined(NIN_POPUPOPEN) +#define NIN_POPUPOPEN (WM_USER + 6) +#endif +#if !defined(NIN_POPUPCLOSE) +#define NIN_POPUPCLOSE (WM_USER + 7) #endif #ifdef BUILD_DLL @@ -767,11 +776,11 @@ NSString *data4 = [[components objectAtIndex: 3] stringByAppendingString: [components objectAtIndex: 4]]; NSScanner *scanner4 = [NSScanner scannerWithString: data4]; - NSUInteger value; - [scanner1 scanHexInt: (NSUInteger*)&theGUID.Data1]; - [scanner2 scanHexInt: (NSUInteger*)&value]; + unsigned int value; + [scanner1 scanHexInt: (unsigned int*)&theGUID.Data1]; + [scanner2 scanHexInt: &value]; theGUID.Data2 = (WORD) value; - [scanner3 scanHexInt: (NSUInteger*)&value]; + [scanner3 scanHexInt: &value]; theGUID.Data3 = (WORD) value; return theGUID; Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/WIN32Server.m URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/WIN32Server.m?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/WIN32Server.m (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/WIN32Server.m Wed Oct 12 18:30:03 2016 @@ -1030,7 +1030,7 @@ - (void) resizeBackingStoreFor: (HWND)hwnd { #if (BUILD_GRAPHICS==GRAPHICS_winlib) - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong((HWND)hwnd, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr((HWND)hwnd, GWLP_USERDATA); // FIXME: We should check if the size really did change. if (win->useHDC) @@ -2121,8 +2121,8 @@ // Borderless window request... if (wstyle & WS_POPUP) { - LONG wstyleOld = GetWindowLong(hwnd, GWL_STYLE); - LONG estyleOld = GetWindowLong(hwnd, GWL_EXSTYLE); + LONG wstyleOld = GetWindowLongPtr(hwnd, GWL_STYLE); + LONG estyleOld = GetWindowLongPtr(hwnd, GWL_EXSTYLE); LONG wstyleNew = (wstyleOld & ~WS_OVERLAPPEDWINDOW); LONG estyleNew = estyleOld | WS_EX_TOOLWINDOW; @@ -2132,8 +2132,8 @@ estyleOld, estyleNew); // Modify window style parameters and update the window information... - SetWindowLong(hwnd, GWL_STYLE, wstyleNew); - SetWindowLong(hwnd, GWL_EXSTYLE, estyleNew); + SetWindowLongPtr(hwnd, GWL_STYLE, wstyleNew); + SetWindowLongPtr(hwnd, GWL_EXSTYLE, estyleNew); SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSENDCHANGING | SWP_NOREPOSITION | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); @@ -2164,8 +2164,8 @@ @"-stylewindow: : called when [self handlesWindowDecorations] == NO"); NSDebugLLog(@"WTrace", @"stylewindow: %d : %d", style, winNum); - SetWindowLong((HWND)winNum, GWL_STYLE, wstyle); - SetWindowLong((HWND)winNum, GWL_EXSTYLE, estyle); + SetWindowLongPtr((HWND)winNum, GWL_STYLE, wstyle); + SetWindowLongPtr((HWND)winNum, GWL_EXSTYLE, estyle); } - (void) setbackgroundcolor: (NSColor *)color : (int)win @@ -2175,7 +2175,7 @@ /** Changes window's the backing store to type */ - (void) windowbacking: (NSBackingStoreType)type : (int) winNum { - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong((HWND)winNum, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr((HWND)winNum, GWLP_USERDATA); NSDebugLLog(@"WTrace", @"windowbacking: %d : %d", type, winNum); #if (BUILD_GRAPHICS==GRAPHICS_winlib) @@ -2288,7 +2288,7 @@ if (op == NSWindowOut) { - SetWindowLong((HWND)winNum, OFF_ORDERED, 0); + SetWindowLongPtr((HWND)winNum, OFF_ORDERED, 0); ShowWindow((HWND)winNum, SW_HIDE); return; } @@ -2306,10 +2306,10 @@ } ShowWindow((HWND)winNum, flag); - SetWindowLong((HWND)winNum, OFF_ORDERED, 1); + SetWindowLongPtr((HWND)winNum, OFF_ORDERED, 1); // Process window leveling... - level = GetWindowLong((HWND)winNum, OFF_LEVEL); + level = GetWindowLongPtr((HWND)winNum, OFF_LEVEL); if (otherWin <= 0) { @@ -2334,14 +2334,14 @@ /* Put this on the same window level as the window we are ordering * it against. */ - otherLevel = GetWindowLong((HWND)otherWin, OFF_LEVEL); + otherLevel = GetWindowLongPtr((HWND)otherWin, OFF_LEVEL); if (level != otherLevel) { NSDebugLLog(@"WTrace", @"orderwindow: implicitly set level of %d (%d) to that of %d (%d)", winNum, level, otherWin, otherLevel); level = otherLevel; - SetWindowLong((HWND)winNum, OFF_LEVEL, level); + SetWindowLongPtr((HWND)winNum, OFF_LEVEL, level); } } @@ -2388,9 +2388,9 @@ && GetClassName((HWND)otherWin, buf, 32) == 18 && strncmp(buf, "GNUstepWindowClass", 18) == 0) { - if (GetWindowLong((HWND)otherWin, OFF_ORDERED) == 1) + if (GetWindowLongPtr((HWND)otherWin, OFF_ORDERED) == 1) { - otherLevel = GetWindowLong((HWND)otherWin, OFF_LEVEL); + otherLevel = GetWindowLongPtr((HWND)otherWin, OFF_LEVEL); NSDebugLLog(@"WTrace", @"orderwindow: found gnustep window %d (%d)", otherWin, otherLevel); if (otherLevel >= level) @@ -2471,9 +2471,9 @@ && GetClassName((HWND)otherWin, buf, 32) == 18 && strncmp(buf, "GNUstepWindowClass", 18) == 0) { - if (GetWindowLong((HWND)otherWin, OFF_ORDERED) == 1) + if (GetWindowLongPtr((HWND)otherWin, OFF_ORDERED) == 1) { - otherLevel = GetWindowLong((HWND)otherWin, OFF_LEVEL); + otherLevel = GetWindowLongPtr((HWND)otherWin, OFF_LEVEL); s = [s stringByAppendingFormat: @"%d (%d)\n", otherWin, otherLevel]; } @@ -2510,7 +2510,7 @@ SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING); #if (BUILD_GRAPHICS==GRAPHICS_winlib) - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong((HWND)winNum, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr((HWND)winNum, GWLP_USERDATA); if ((win->useHDC) && (r.right - r.left != r2.right - r2.left) @@ -2555,10 +2555,10 @@ - (void) setwindowlevel: (int) level : (int) winNum { NSDebugLLog(@"WTrace", @"setwindowlevel: %d : %d", level, winNum); - if (GetWindowLong((HWND)winNum, OFF_LEVEL) != level) - { - SetWindowLong((HWND)winNum, OFF_LEVEL, level); - if (GetWindowLong((HWND)winNum, OFF_ORDERED) == YES) + if (GetWindowLongPtr((HWND)winNum, OFF_LEVEL) != level) + { + SetWindowLongPtr((HWND)winNum, OFF_LEVEL, level); + if (GetWindowLongPtr((HWND)winNum, OFF_ORDERED) == YES) { [self orderwindow: NSWindowAbove : 0 : winNum]; } @@ -2567,7 +2567,7 @@ - (int) windowlevel: (int) winNum { - return GetWindowLong((HWND)winNum, OFF_LEVEL); + return GetWindowLongPtr((HWND)winNum, OFF_LEVEL); } - (NSArray *) windowlist @@ -2615,7 +2615,7 @@ /** Set the maximum size of the window */ - (void) setmaxsize: (NSSize)size : (int) winNum { - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong((HWND)winNum, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr((HWND)winNum, GWLP_USERDATA); POINT p; p.x = size.width; @@ -2625,20 +2625,20 @@ // Disable the maximize box if a maximum size is set if (size.width < 10000 || size.height < 10000) { - SetWindowLong((HWND)winNum, GWL_STYLE, - GetWindowLong((HWND)winNum, GWL_STYLE) ^ WS_MAXIMIZEBOX); + SetWindowLongPtr((HWND)winNum, GWL_STYLE, + GetWindowLongPtr((HWND)winNum, GWL_STYLE) ^ WS_MAXIMIZEBOX); } else { - SetWindowLong((HWND)winNum, GWL_STYLE, - GetWindowLong((HWND)winNum, GWL_STYLE) | WS_MAXIMIZEBOX); + SetWindowLongPtr((HWND)winNum, GWL_STYLE, + GetWindowLongPtr((HWND)winNum, GWL_STYLE) | WS_MAXIMIZEBOX); } } /** Set the minimum size of the window */ - (void) setminsize: (NSSize)size : (int) winNum { - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong((HWND)winNum, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr((HWND)winNum, GWLP_USERDATA); POINT p; p.x = size.width; @@ -2654,7 +2654,7 @@ - (void) flushwindowrect: (NSRect)rect : (int)winNum { HWND hwnd = (HWND)winNum; - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong(hwnd, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr(hwnd, GWLP_USERDATA); if (win) { @@ -2761,15 +2761,15 @@ { if (alpha > 0.99) { - SetWindowLong((HWND)win, GWL_EXSTYLE, - GetWindowLong((HWND)win, GWL_EXSTYLE) & ~WS_EX_LAYERED); + SetWindowLongPtr((HWND)win, GWL_EXSTYLE, + GetWindowLongPtr((HWND)win, GWL_EXSTYLE) & ~WS_EX_LAYERED); RedrawWindow((HWND)win, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN); } else { - SetWindowLong((HWND)win, GWL_EXSTYLE, - GetWindowLong((HWND)win, GWL_EXSTYLE) | WS_EX_LAYERED); + SetWindowLongPtr((HWND)win, GWL_EXSTYLE, + GetWindowLongPtr((HWND)win, GWL_EXSTYLE) | WS_EX_LAYERED); SetLayeredWindowAttributes((HWND)win, 0, 255 * alpha, LWA_ALPHA); } } @@ -3058,15 +3058,15 @@ - (void) setIgnoreMouse: (BOOL)ignoreMouse : (int)win { - int extendedStyle = GetWindowLong((HWND)win, GWL_EXSTYLE); + int extendedStyle = GetWindowLongPtr((HWND)win, GWL_EXSTYLE); if (ignoreMouse) { - SetWindowLong((HWND)win, GWL_EXSTYLE, extendedStyle | WS_EX_TRANSPARENT); + SetWindowLongPtr((HWND)win, GWL_EXSTYLE, extendedStyle | WS_EX_TRANSPARENT); } else { - SetWindowLong((HWND)win, GWL_EXSTYLE, extendedStyle & ~WS_EX_TRANSPARENT); + SetWindowLongPtr((HWND)win, GWL_EXSTYLE, extendedStyle & ~WS_EX_TRANSPARENT); } } Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/w32_create.m URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/w32_create.m?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/w32_create.m (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/w32_create.m Wed Oct 12 18:30:03 2016 @@ -68,7 +68,7 @@ win->useHDC = NO; // Save win internals structure pointer for window handle... - SetWindowLong(hwnd, GWL_USERDATA, (int)win); + SetWindowLongPtr(hwnd, GWLP_USERDATA, (int)win); SetWindowLongPtr(hwnd, IME_INFO, (LONG)ime); [self windowbacking: type : (int)hwnd]; Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/w32_general.m URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/w32_general.m?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/w32_general.m (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/w32_general.m Wed Oct 12 18:30:03 2016 @@ -71,7 +71,7 @@ - (void) decodeWM_DESTROYParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd { - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong(hwnd, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr(hwnd, GWLP_USERDATA); // Clean up window-specific data objects. Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/w32_movesize.m URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/w32_movesize.m?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/w32_movesize.m (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/w32_movesize.m Wed Oct 12 18:30:03 2016 @@ -284,7 +284,7 @@ - (LRESULT) decodeWM_GETMINMAXINFOParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd { - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong(hwnd, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr(hwnd, GWLP_USERDATA); MINMAXINFO *mm; if (win != NULL) Modified: libs/back/branches/gnustep_testplant_branch/Source/win32/w32_windowdisplay.m URL: http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/w32_windowdisplay.m?rev=40146&r1=40145&r2=40146&view=diff ============================================================================== --- libs/back/branches/gnustep_testplant_branch/Source/win32/w32_windowdisplay.m (original) +++ libs/back/branches/gnustep_testplant_branch/Source/win32/w32_windowdisplay.m Wed Oct 12 18:30:03 2016 @@ -36,7 +36,7 @@ static void invalidateWindow(WIN32Server *svr, HWND hwnd, RECT rect) { - WIN_INTERN *win = (WIN_INTERN *)GetWindowLong((HWND)hwnd, GWL_USERDATA); + WIN_INTERN *win = (WIN_INTERN *)GetWindowLongPtr((HWND)hwnd, GWLP_USERDATA); if (!win->useHDC || win->backingStoreEmpty) { _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs