switching from AvailabilityMacros.h to Availability.h
The old version is not updated for 10.16 therefore switch to the ‚newer‘ version - that existed since 10.6 - starting with double underscores
This commit is contained in:
@@ -123,7 +123,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTIFICATION_MESSAGE_ACTION, w
|
|||||||
|
|
||||||
#if (defined(__WXGTK__) && wxUSE_LIBNOTIFY) || \
|
#if (defined(__WXGTK__) && wxUSE_LIBNOTIFY) || \
|
||||||
(defined(__WXMSW__) && wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS) || \
|
(defined(__WXMSW__) && wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS) || \
|
||||||
(defined(__WXOSX_COCOA__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8))
|
(defined(__WXOSX_COCOA__) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8))
|
||||||
#define wxHAS_NATIVE_NOTIFICATION_MESSAGE
|
#define wxHAS_NATIVE_NOTIFICATION_MESSAGE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@ public :
|
|||||||
void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent);
|
void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent);
|
||||||
virtual bool SetupCursor(NSEvent* event);
|
virtual bool SetupCursor(NSEvent* event);
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
#ifdef API_AVAILABLE
|
#ifdef API_AVAILABLE
|
||||||
#define WX_AVAILABLE_10_10 API_AVAILABLE(macos(10.10))
|
#define WX_AVAILABLE_10_10 API_AVAILABLE(macos(10.10))
|
||||||
#else
|
#else
|
||||||
@@ -164,7 +164,7 @@ public :
|
|||||||
WX_AVAILABLE_10_10 virtual void TouchesEnded(NSEvent *event);
|
WX_AVAILABLE_10_10 virtual void TouchesEnded(NSEvent *event);
|
||||||
|
|
||||||
#undef WX_AVAILABLE_10_10
|
#undef WX_AVAILABLE_10_10
|
||||||
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
|
|
||||||
#if !wxOSX_USE_NATIVE_FLIPPED
|
#if !wxOSX_USE_NATIVE_FLIPPED
|
||||||
void SetFlipped(bool flipped);
|
void SetFlipped(bool flipped);
|
||||||
|
@@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
// Include unistd to ensure that NULL is defined
|
// Include unistd to ensure that NULL is defined
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
// Include AvailabilityMacros for DEPRECATED_ATTRIBUTE
|
// Include Availability for __AVAILABILITY_INTERNAL_DEPRECATED
|
||||||
#include <AvailabilityMacros.h>
|
#include <Availability.h>
|
||||||
|
|
||||||
#if __has_feature(objc_arc)
|
#if __has_feature(objc_arc)
|
||||||
#define WX_OSX_BRIDGE_RETAINED __bridge_retained
|
#define WX_OSX_BRIDGE_RETAINED __bridge_retained
|
||||||
@@ -391,7 +391,7 @@ inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &other
|
|||||||
Normally, this function is unimplemented resulting in a linker error if used.
|
Normally, this function is unimplemented resulting in a linker error if used.
|
||||||
*/
|
*/
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void CFRelease(const wxCFRef<T*> & cfref) DEPRECATED_ATTRIBUTE;
|
inline void CFRelease(const wxCFRef<T*> & cfref) __AVAILABILITY_INTERNAL_DEPRECATED;
|
||||||
|
|
||||||
/*! @function CFRetain
|
/*! @function CFRetain
|
||||||
@abstract Overloads CFRetain so that the user is warned of bad behaviour.
|
@abstract Overloads CFRetain so that the user is warned of bad behaviour.
|
||||||
@@ -400,7 +400,7 @@ inline void CFRelease(const wxCFRef<T*> & cfref) DEPRECATED_ATTRIBUTE;
|
|||||||
Normally, this function is unimplemented resulting in a linker error if used.
|
Normally, this function is unimplemented resulting in a linker error if used.
|
||||||
*/
|
*/
|
||||||
template <class T>
|
template <class T>
|
||||||
inline void CFRetain(const wxCFRef<T*>& cfref) DEPRECATED_ATTRIBUTE;
|
inline void CFRetain(const wxCFRef<T*>& cfref) __AVAILABILITY_INTERNAL_DEPRECATED;
|
||||||
|
|
||||||
// Change the 0 to a 1 if you want the functions to work (no link errors)
|
// Change the 0 to a 1 if you want the functions to work (no link errors)
|
||||||
// Neither function will cause retain/release side-effects if implemented.
|
// Neither function will cause retain/release side-effects if implemented.
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#ifdef __WXMAC_XCODE__
|
#ifdef __WXMAC_XCODE__
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# include <TargetConditionals.h>
|
# include <TargetConditionals.h>
|
||||||
# include <AvailabilityMacros.h>
|
# include <Availability.h>
|
||||||
# ifndef MAC_OS_X_VERSION_10_4
|
# ifndef MAC_OS_X_VERSION_10_4
|
||||||
# define MAC_OS_X_VERSION_10_4 1040
|
# define MAC_OS_X_VERSION_10_4 1040
|
||||||
# endif
|
# endif
|
||||||
@@ -53,7 +53,13 @@
|
|||||||
# ifndef MAC_OS_X_VERSION_10_15
|
# ifndef MAC_OS_X_VERSION_10_15
|
||||||
# define MAC_OS_X_VERSION_10_15 101500
|
# define MAC_OS_X_VERSION_10_15 101500
|
||||||
# endif
|
# endif
|
||||||
# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
# ifndef MAC_OS_X_VERSION_10_16
|
||||||
|
# define MAC_OS_X_VERSION_10_16 101600
|
||||||
|
# endif
|
||||||
|
# ifndef MAC_OS_X_VERSION_10_16
|
||||||
|
# define MAC_OS_VERSION_11_0 110000
|
||||||
|
# endif
|
||||||
|
# if __MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
||||||
# ifndef NSAppKitVersionNumber10_10
|
# ifndef NSAppKitVersionNumber10_10
|
||||||
# define NSAppKitVersionNumber10_10 1343
|
# define NSAppKitVersionNumber10_10 1343
|
||||||
# endif
|
# endif
|
||||||
@@ -467,7 +473,7 @@
|
|||||||
|
|
||||||
#ifdef __WXOSX_MAC__
|
#ifdef __WXOSX_MAC__
|
||||||
# if defined(__MACH__)
|
# if defined(__MACH__)
|
||||||
# include <AvailabilityMacros.h>
|
# include <Availability.h>
|
||||||
# ifndef MAC_OS_X_VERSION_10_4
|
# ifndef MAC_OS_X_VERSION_10_4
|
||||||
# define MAC_OS_X_VERSION_10_4 1040
|
# define MAC_OS_X_VERSION_10_4 1040
|
||||||
# endif
|
# endif
|
||||||
@@ -501,7 +507,16 @@
|
|||||||
# ifndef MAC_OS_X_VERSION_10_14
|
# ifndef MAC_OS_X_VERSION_10_14
|
||||||
# define MAC_OS_X_VERSION_10_14 101400
|
# define MAC_OS_X_VERSION_10_14 101400
|
||||||
# endif
|
# endif
|
||||||
# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
# ifndef MAC_OS_X_VERSION_10_15
|
||||||
|
# define MAC_OS_X_VERSION_10_15 101500
|
||||||
|
# endif
|
||||||
|
# ifndef MAC_OS_X_VERSION_10_16
|
||||||
|
# define MAC_OS_X_VERSION_10_16 101600
|
||||||
|
# endif
|
||||||
|
# ifndef MAC_OS_X_VERSION_10_16
|
||||||
|
# define MAC_OS_VERSION_11_0 110000
|
||||||
|
# endif
|
||||||
|
# if __MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
||||||
# ifndef NSAppKitVersionNumber10_10
|
# ifndef NSAppKitVersionNumber10_10
|
||||||
# define NSAppKitVersionNumber10_10 1343
|
# define NSAppKitVersionNumber10_10 1343
|
||||||
# endif
|
# endif
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#include "wx/osx/private.h"
|
#include "wx/osx/private.h"
|
||||||
|
|
||||||
#include <WebKit/WebKit.h>
|
#include <WebKit/WebKit.h>
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15
|
||||||
#include <WebKit/HIWebView.h>
|
#include <WebKit/HIWebView.h>
|
||||||
#include <WebKit/CarbonUtils.h>
|
#include <WebKit/CarbonUtils.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define DEBUG_WEBKIT_SIZING 0
|
#define DEBUG_WEBKIT_SIZING 0
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_11) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11)
|
#if defined(MAC_OS_X_VERSION_10_11) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11)
|
||||||
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto >
|
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto >
|
||||||
#else
|
#else
|
||||||
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto)
|
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto)
|
||||||
|
@@ -118,7 +118,7 @@ void wxStatusBarMac::InitColours()
|
|||||||
SetBackgroundColour(wxColour(0xF4, 0xF4, 0xF4)); // inactive bg
|
SetBackgroundColour(wxColour(0xF4, 0xF4, 0xF4)); // inactive bg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 10.9 Mavericks and older:
|
// 10.9 Mavericks and older:
|
||||||
@@ -130,7 +130,7 @@ void wxStatusBarMac::InitColours()
|
|||||||
m_borderInactive = wxColour(0xA3, 0xA3, 0xA3);
|
m_borderInactive = wxColour(0xA3, 0xA3, 0xA3);
|
||||||
SetBackgroundColour(wxColour(0xE1, 0xE1, 0xE1)); // inactive bg
|
SetBackgroundColour(wxColour(0xE1, 0xE1, 0xE1)); // inactive bg
|
||||||
}
|
}
|
||||||
#endif // MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
#endif // __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight)
|
void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight)
|
||||||
|
@@ -108,7 +108,7 @@ NSFont* wxFont::OSXGetNSFont() const
|
|||||||
|
|
||||||
NSFont *font = const_cast<NSFont*>(reinterpret_cast<const NSFont*>(OSXGetCTFont()));
|
NSFont *font = const_cast<NSFont*>(reinterpret_cast<const NSFont*>(OSXGetCTFont()));
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
#if __MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
||||||
// There's a bug in OS X 10.11 (but not present in 10.10 or 10.12) where a
|
// There's a bug in OS X 10.11 (but not present in 10.10 or 10.12) where a
|
||||||
// toll-free bridged font may have an attributed of private class __NSCFCharacterSet
|
// toll-free bridged font may have an attributed of private class __NSCFCharacterSet
|
||||||
// that unlike NSCharacterSet doesn't conform to NSSecureCoding. This poses
|
// that unlike NSCharacterSet doesn't conform to NSSecureCoding. This poses
|
||||||
@@ -122,7 +122,7 @@ NSFont* wxFont::OSXGetNSFont() const
|
|||||||
{
|
{
|
||||||
return [NSFont fontWithDescriptor:[font fontDescriptor] size:[font pointSize]];
|
return [NSFont fontWithDescriptor:[font fontDescriptor] size:[font pointSize]];
|
||||||
}
|
}
|
||||||
#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
#endif // __MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
@@ -633,7 +633,7 @@ NSString* wxNSStringWithWxString(const wxString &wxstring)
|
|||||||
|
|
||||||
wxOSXEffectiveAppearanceSetter::wxOSXEffectiveAppearanceSetter()
|
wxOSXEffectiveAppearanceSetter::wxOSXEffectiveAppearanceSetter()
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
||||||
{
|
{
|
||||||
formerAppearance = NSAppearance.currentAppearance;
|
formerAppearance = NSAppearance.currentAppearance;
|
||||||
@@ -646,7 +646,7 @@ wxOSXEffectiveAppearanceSetter::wxOSXEffectiveAppearanceSetter()
|
|||||||
|
|
||||||
wxOSXEffectiveAppearanceSetter::~wxOSXEffectiveAppearanceSetter()
|
wxOSXEffectiveAppearanceSetter::~wxOSXEffectiveAppearanceSetter()
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
||||||
NSAppearance.currentAppearance = (NSAppearance*) formerAppearance;
|
NSAppearance.currentAppearance = (NSAppearance*) formerAppearance;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -105,7 +105,7 @@ bool wxNSColorRefData::IsSolid() const
|
|||||||
|
|
||||||
CGColorRef wxNSColorRefData::GetCGColor() const
|
CGColorRef wxNSColorRefData::GetCGColor() const
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 8) ) {
|
if ( WX_IS_MACOS_AVAILABLE(10, 8) ) {
|
||||||
wxOSXEffectiveAppearanceSetter helper;
|
wxOSXEffectiveAppearanceSetter helper;
|
||||||
return [m_nsColour CGColor];
|
return [m_nsColour CGColor];
|
||||||
|
@@ -3035,14 +3035,14 @@ bool wxDataViewTextRenderer::MacRender()
|
|||||||
[par setLineBreakMode:[cell lineBreakMode]];
|
[par setLineBreakMode:[cell lineBreakMode]];
|
||||||
// Tightening looks very ugly when combined with non-tightened rows,
|
// Tightening looks very ugly when combined with non-tightened rows,
|
||||||
// so disabled it on OS X version where it's used:
|
// so disabled it on OS X version where it's used:
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 11) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 11) )
|
||||||
{
|
{
|
||||||
[par setAllowsDefaultTighteningForTruncation:NO];
|
[par setAllowsDefaultTighteningForTruncation:NO];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
||||||
{
|
{
|
||||||
[par setTighteningFactorForTruncation:0.0];
|
[par setTighteningFactorForTruncation:0.0];
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include "wx/osx/private.h"
|
#include "wx/osx/private.h"
|
||||||
#include "wx/osx/private/available.h"
|
#include "wx/osx/private/available.h"
|
||||||
|
|
||||||
#if wxOSX_USE_COCOA && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 && defined(__LP64__)
|
#if wxOSX_USE_COCOA && __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 && defined(__LP64__)
|
||||||
#define wxOSX_USE_AVKIT 1
|
#define wxOSX_USE_AVKIT 1
|
||||||
#else
|
#else
|
||||||
#define wxOSX_USE_AVKIT 0
|
#define wxOSX_USE_AVKIT 0
|
||||||
|
@@ -121,7 +121,7 @@ public:
|
|||||||
|
|
||||||
virtual void SetIcon(const wxIcon& icon) wxOVERRIDE
|
virtual void SetIcon(const wxIcon& icon) wxOVERRIDE
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
||||||
// Additional icon in the notification is only supported on OS X 10.9+
|
// Additional icon in the notification is only supported on OS X 10.9+
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 9) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 9) )
|
||||||
m_notif.contentImage = icon.GetNSImage();
|
m_notif.contentImage = icon.GetNSImage();
|
||||||
|
@@ -37,7 +37,7 @@ bool UpdatePowerResourceUsage(wxPowerResourceKind kind, const wxString& reason)
|
|||||||
if( reason.IsEmpty())
|
if( reason.IsEmpty())
|
||||||
cfreason = wxString("User Activity");
|
cfreason = wxString("User Activity");
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 9) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 9) )
|
||||||
{
|
{
|
||||||
// Use NSProcessInfo for 10.9 and newer
|
// Use NSProcessInfo for 10.9 and newer
|
||||||
@@ -82,7 +82,7 @@ bool UpdatePowerResourceUsage(wxPowerResourceKind kind, const wxString& reason)
|
|||||||
else if ( g_powerResourceSystemRefCount == 0 )
|
else if ( g_powerResourceSystemRefCount == 0 )
|
||||||
{
|
{
|
||||||
// Release power assertion
|
// Release power assertion
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 9) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 9) )
|
||||||
{
|
{
|
||||||
// Use NSProcessInfo for 10.9 and newer
|
// Use NSProcessInfo for 10.9 and newer
|
||||||
|
@@ -48,7 +48,7 @@ static int wxOSXGetUserDefault(NSString* key, int defaultValue)
|
|||||||
|
|
||||||
wxString wxSystemAppearance::GetName() const
|
wxString wxSystemAppearance::GetName() const
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14) )
|
||||||
{
|
{
|
||||||
return wxStringWithNSString([[NSApp effectiveAppearance] name]);
|
return wxStringWithNSString([[NSApp effectiveAppearance] name]);
|
||||||
@@ -60,7 +60,7 @@ wxString wxSystemAppearance::GetName() const
|
|||||||
|
|
||||||
bool wxSystemAppearance::IsDark() const
|
bool wxSystemAppearance::IsDark() const
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14) )
|
||||||
{
|
{
|
||||||
const NSAppearanceName
|
const NSAppearanceName
|
||||||
@@ -163,7 +163,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
|||||||
sysColor = [NSColor windowBackgroundColor];
|
sysColor = [NSColor windowBackgroundColor];
|
||||||
break;
|
break;
|
||||||
case wxSYS_COLOUR_HOTLIGHT:
|
case wxSYS_COLOUR_HOTLIGHT:
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14) )
|
||||||
{
|
{
|
||||||
sysColor = [NSColor linkColor];
|
sysColor = [NSColor linkColor];
|
||||||
|
@@ -478,7 +478,7 @@ void wxApp::DoCleanUp()
|
|||||||
void wxApp::OSXEnableAutomaticTabbing(bool enable)
|
void wxApp::OSXEnableAutomaticTabbing(bool enable)
|
||||||
{
|
{
|
||||||
// Automatic tabbing was first introduced in 10.12
|
// Automatic tabbing was first introduced in 10.12
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 12) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 12) )
|
||||||
{
|
{
|
||||||
[NSWindow setAllowsAutomaticWindowTabbing:enable];
|
[NSWindow setAllowsAutomaticWindowTabbing:enable];
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include "wx/osx/private.h"
|
#include "wx/osx/private.h"
|
||||||
#include "wx/osx/private/available.h"
|
#include "wx/osx/private/available.h"
|
||||||
|
|
||||||
#if (defined(__WXOSX_COCOA__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10) \
|
#if (defined(__WXOSX_COCOA__) && __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10) \
|
||||||
|| (defined(__WXOSX_IPHONE__) && defined(__IPHONE_8_0))
|
|| (defined(__WXOSX_IPHONE__) && defined(__IPHONE_8_0))
|
||||||
#define wxHAS_NSPROCESSINFO 1
|
#define wxHAS_NSPROCESSINFO 1
|
||||||
#endif
|
#endif
|
||||||
@@ -238,7 +238,7 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NSMutableArray *params = [[NSMutableArray alloc] init];
|
NSMutableArray *params = [[NSMutableArray alloc] init];
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
||||||
{
|
{
|
||||||
// Loop through command line arguments to the bundle,
|
// Loop through command line arguments to the bundle,
|
||||||
@@ -287,7 +287,7 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid)
|
|||||||
|
|
||||||
NSRunningApplication *app = nil;
|
NSRunningApplication *app = nil;
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
||||||
{
|
{
|
||||||
if ( [params count] > 0 )
|
if ( [params count] > 0 )
|
||||||
|
@@ -1128,7 +1128,7 @@ void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text)
|
|||||||
impl->insertText(text, self, _cmd);
|
impl->insertText(text, self, _cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
WX_API_AVAILABLE_MACOS(10, 10)
|
WX_API_AVAILABLE_MACOS(10, 10)
|
||||||
void wxOSX_panGestureEvent(NSView* self, SEL _cmd, NSPanGestureRecognizer* panGestureRecognizer)
|
void wxOSX_panGestureEvent(NSView* self, SEL _cmd, NSPanGestureRecognizer* panGestureRecognizer)
|
||||||
{
|
{
|
||||||
@@ -1198,7 +1198,7 @@ void wxOSX_touchesEnded(NSView* self, SEL _cmd, NSEvent *event)
|
|||||||
|
|
||||||
impl->TouchesEnded(event);
|
impl->TouchesEnded(event);
|
||||||
}
|
}
|
||||||
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
|
|
||||||
BOOL wxOSX_acceptsFirstResponder(NSView* self, SEL _cmd)
|
BOOL wxOSX_acceptsFirstResponder(NSView* self, SEL _cmd)
|
||||||
{
|
{
|
||||||
@@ -1577,7 +1577,7 @@ void wxWidgetCocoaImpl::keyEvent(WX_NSEvent event, WXWidget slf, void *_cmd)
|
|||||||
m_lastKeyDownEvent = NULL;
|
m_lastKeyDownEvent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
|
|
||||||
// Class containing data used for gestures support.
|
// Class containing data used for gestures support.
|
||||||
class WX_API_AVAILABLE_MACOS(10, 10) wxCocoaGesturesImpl
|
class WX_API_AVAILABLE_MACOS(10, 10) wxCocoaGesturesImpl
|
||||||
@@ -2140,7 +2140,7 @@ void wxCocoaGesturesImpl::TouchesEnded(NSEvent* event)
|
|||||||
m_activeGestures &= ~press_and_tap;
|
m_activeGestures &= ~press_and_tap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
|
|
||||||
void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd)
|
void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd)
|
||||||
{
|
{
|
||||||
@@ -2577,9 +2577,9 @@ wxWidgetCocoaImpl::~wxWidgetCocoaImpl()
|
|||||||
if ( m_osxView )
|
if ( m_osxView )
|
||||||
CFRelease(m_osxView);
|
CFRelease(m_osxView);
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
wxCocoaGestures::EraseForObject(this);
|
wxCocoaGestures::EraseForObject(this);
|
||||||
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWidgetCocoaImpl::IsVisible() const
|
bool wxWidgetCocoaImpl::IsVisible() const
|
||||||
@@ -2592,7 +2592,7 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
|
|||||||
[m_osxView setHidden:(visible ? NO:YES)];
|
[m_osxView setHidden:(visible ? NO:YES)];
|
||||||
|
|
||||||
// trigger redraw upon shown for layer-backed views
|
// trigger redraw upon shown for layer-backed views
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
||||||
if( !m_osxView.isHiddenOrHasHiddenAncestor )
|
if( !m_osxView.isHiddenOrHasHiddenAncestor )
|
||||||
SetNeedsDisplay(NULL);
|
SetNeedsDisplay(NULL);
|
||||||
@@ -2846,7 +2846,7 @@ bool wxWidgetCocoaImpl::ShowWithEffect(bool show,
|
|||||||
// maybe even earlier? This has changed at some time between 10.9 and 10.11),
|
// maybe even earlier? This has changed at some time between 10.9 and 10.11),
|
||||||
// we need to constrain the comparison function arguments instead of just using
|
// we need to constrain the comparison function arguments instead of just using
|
||||||
// "id".
|
// "id".
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 && __has_feature(objc_kindof)
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 && __has_feature(objc_kindof)
|
||||||
typedef __kindof NSView* KindOfView;
|
typedef __kindof NSView* KindOfView;
|
||||||
#else
|
#else
|
||||||
typedef id KindOfView;
|
typedef id KindOfView;
|
||||||
@@ -3048,7 +3048,7 @@ void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &hei
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -3080,7 +3080,7 @@ void wxWidgetCocoaImpl::SetNeedsDisplay( const wxRect* where )
|
|||||||
// Layer-backed views (which are all in Mojave's Dark Mode) may not have
|
// Layer-backed views (which are all in Mojave's Dark Mode) may not have
|
||||||
// their children implicitly redrawn with the parent. For compatibility,
|
// their children implicitly redrawn with the parent. For compatibility,
|
||||||
// do it manually here:
|
// do it manually here:
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 14 ) )
|
||||||
SetSubviewsNeedDisplay(m_osxView);
|
SetSubviewsNeedDisplay(m_osxView);
|
||||||
#endif
|
#endif
|
||||||
@@ -3593,7 +3593,7 @@ void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control )
|
|||||||
|
|
||||||
bool wxWidgetCocoaImpl::EnableTouchEvents(int eventsMask)
|
bool wxWidgetCocoaImpl::EnableTouchEvents(int eventsMask)
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 10) )
|
||||||
{
|
{
|
||||||
if ( HasUserMouseHandling() )
|
if ( HasUserMouseHandling() )
|
||||||
@@ -3623,7 +3623,7 @@ bool wxWidgetCocoaImpl::EnableTouchEvents(int eventsMask)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||||
|
|
||||||
wxUnusedVar(eventsMask);
|
wxUnusedVar(eventsMask);
|
||||||
return false;
|
return false;
|
||||||
|
@@ -118,7 +118,7 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col)
|
|||||||
}
|
}
|
||||||
else if (model != kCGColorSpaceModelRGB)
|
else if (model != kCGColorSpaceModelRGB)
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11
|
||||||
if ( WX_IS_MACOS_AVAILABLE(10, 11) )
|
if ( WX_IS_MACOS_AVAILABLE(10, 11) )
|
||||||
{
|
{
|
||||||
rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL);
|
rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL);
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include <UIKit/UIWebView.h>
|
#include <UIKit/UIWebView.h>
|
||||||
#else
|
#else
|
||||||
#include <WebKit/WebKit.h>
|
#include <WebKit/WebKit.h>
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15
|
||||||
#include <WebKit/HIWebView.h>
|
#include <WebKit/HIWebView.h>
|
||||||
#include <WebKit/CarbonUtils.h>
|
#include <WebKit/CarbonUtils.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
#define DEBUG_WEBKIT_SIZING 0
|
#define DEBUG_WEBKIT_SIZING 0
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_11) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11)
|
#if defined(MAC_OS_X_VERSION_10_11) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11)
|
||||||
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto >
|
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto >
|
||||||
#else
|
#else
|
||||||
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto)
|
#define wxWEBKIT_PROTOCOL_SINCE_10_11(proto)
|
||||||
|
Reference in New Issue
Block a user