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:
Stefan Csomor
2020-06-25 15:59:53 +02:00
parent c7f6feadfd
commit 80610cb383
18 changed files with 63 additions and 48 deletions

View File

@@ -123,7 +123,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTIFICATION_MESSAGE_ACTION, w
#if (defined(__WXGTK__) && wxUSE_LIBNOTIFY) || \
(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
#endif

View File

@@ -148,7 +148,7 @@ public :
void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent);
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
#define WX_AVAILABLE_10_10 API_AVAILABLE(macos(10.10))
#else
@@ -164,7 +164,7 @@ public :
WX_AVAILABLE_10_10 virtual void TouchesEnded(NSEvent *event);
#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
void SetFlipped(bool flipped);

View File

@@ -18,8 +18,8 @@
// Include unistd to ensure that NULL is defined
#include <unistd.h>
// Include AvailabilityMacros for DEPRECATED_ATTRIBUTE
#include <AvailabilityMacros.h>
// Include Availability for __AVAILABILITY_INTERNAL_DEPRECATED
#include <Availability.h>
#if __has_feature(objc_arc)
#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.
*/
template <class T>
inline void CFRelease(const wxCFRef<T*> & cfref) DEPRECATED_ATTRIBUTE;
inline void CFRelease(const wxCFRef<T*> & cfref) __AVAILABILITY_INTERNAL_DEPRECATED;
/*! @function CFRetain
@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.
*/
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)
// Neither function will cause retain/release side-effects if implemented.

View File

@@ -16,7 +16,7 @@
#ifdef __WXMAC_XCODE__
# include <unistd.h>
# include <TargetConditionals.h>
# include <AvailabilityMacros.h>
# include <Availability.h>
# ifndef MAC_OS_X_VERSION_10_4
# define MAC_OS_X_VERSION_10_4 1040
# endif
@@ -53,7 +53,13 @@
# ifndef MAC_OS_X_VERSION_10_15
# define MAC_OS_X_VERSION_10_15 101500
# 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
# define NSAppKitVersionNumber10_10 1343
# endif
@@ -467,7 +473,7 @@
#ifdef __WXOSX_MAC__
# if defined(__MACH__)
# include <AvailabilityMacros.h>
# include <Availability.h>
# ifndef MAC_OS_X_VERSION_10_4
# define MAC_OS_X_VERSION_10_4 1040
# endif
@@ -501,7 +507,16 @@
# ifndef MAC_OS_X_VERSION_10_14
# define MAC_OS_X_VERSION_10_14 101400
# 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
# define NSAppKitVersionNumber10_10 1343
# endif