Merged 47182 from svn trunk:
Make wxCocoa compile in 64-bit mode. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,7 +15,12 @@
|
||||
#include "wx/hashmap.h"
|
||||
#include "wx/cocoa/ObjcAssociate.h"
|
||||
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef struct CGRect NSRect;
|
||||
#else
|
||||
typedef struct _NSRect NSRect;
|
||||
#endif
|
||||
|
||||
class wxWindow;
|
||||
|
||||
WX_DECLARE_OBJC_HASHMAP(NSView);
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
WX_NSColor GetNSColor();
|
||||
int GetCocoaLineDash(const float **pattern);
|
||||
int GetCocoaLineDash(const CGFloat **pattern);
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_PEN_H__
|
||||
|
@@ -14,7 +14,11 @@
|
||||
|
||||
#include "wx/generic/region.h"
|
||||
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef struct CGRect NSRect;
|
||||
#else
|
||||
typedef struct _NSRect NSRect;
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxRegion : public wxRegionGeneric
|
||||
{
|
||||
|
@@ -17,7 +17,12 @@
|
||||
// ========================================================================
|
||||
// wxToolBar
|
||||
// ========================================================================
|
||||
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
|
||||
typedef struct CGPoint NSPoint;
|
||||
#else
|
||||
typedef struct _NSPoint NSPoint;
|
||||
#endif
|
||||
|
||||
class wxToolBarTool;
|
||||
|
||||
class wxToolBar : public wxToolBarBase
|
||||
|
@@ -2419,6 +2419,36 @@ typedef void* WXDisplay;
|
||||
|
||||
#ifdef __WXCOCOA__
|
||||
|
||||
/* Definitions of 32-bit/64-bit types
|
||||
* These are typedef'd exactly the same way in newer OS X headers so
|
||||
* redefinition when real headers are included should not be a problem. If
|
||||
* it is, the types are being defined wrongly here.
|
||||
* The purpose of these types is so they can be used from public wx headers.
|
||||
* and also because the older (pre-Leopard) headers don't define them.
|
||||
*/
|
||||
|
||||
/* NOTE: We don't pollute namespace with CGFLOAT_MIN/MAX/IS_DOUBLE macros
|
||||
* since they are unlikely to be needed in a public header.
|
||||
*/
|
||||
#if defined(__LP64__) && __LP64__
|
||||
typedef double CGFloat;
|
||||
#else
|
||||
typedef float CGFloat;
|
||||
#endif
|
||||
|
||||
#if (defined(__LP64__) && __LP64__) || (defined(NS_BUILD_32_LIKE_64) && NS_BUILD_32_LIKE_64)
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
#else
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
#endif
|
||||
|
||||
/* Objective-C type declarations.
|
||||
* These are to be used in public headers in lieu of NSSomething* because
|
||||
* Objective-C class names are not available in C/C++ code.
|
||||
*/
|
||||
|
||||
/* NOTE: This ought to work with other compilers too, but I'm being cautious */
|
||||
#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__)
|
||||
/* It's desirable to have type safety for Objective-C(++) code as it does
|
||||
|
Reference in New Issue
Block a user