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

@@ -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.