Add wxOSX_10_6_AND_LATER macro and use it.
Replace all occurrences of @interface wxFoo : NSFoo #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 <NSProtocol> #endif which we used for protocols new in 10.6 with just @interface wxFoo : NSFoo wxOSX_10_6_AND_LATER(<NSProtocol>) which looks better and simpler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -301,7 +301,7 @@ protected :
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@interface wxNSTextView : NSTextView
|
@interface wxNSTextView : NSTextView wxOSX_10_6_AND_LATER(<NSTextViewDelegate>)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,17 @@
|
|||||||
#include "wx/osx/core/cfstring.h"
|
#include "wx/osx/core/cfstring.h"
|
||||||
#include "wx/osx/core/cfdataref.h"
|
#include "wx/osx/core/cfdataref.h"
|
||||||
|
|
||||||
|
// Define helper macros allowing to insert small snippets of code to be
|
||||||
|
// compiled for high enough OS X version only: this shouldn't be abused for
|
||||||
|
// anything big but it's handy for e.g. specifying OS X 10.6-only protocols in
|
||||||
|
// the Objective C classes declarations when they're not supported under the
|
||||||
|
// previous versions
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||||
|
#define wxOSX_10_6_AND_LATER(x) x
|
||||||
|
#else
|
||||||
|
#define wxOSX_10_6_AND_LATER(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxOSX_USE_COCOA_OR_CARBON
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE long UMAGetSystemVersion() ;
|
WXDLLIMPEXP_BASE long UMAGetSystemVersion() ;
|
||||||
|
@@ -33,10 +33,7 @@
|
|||||||
|
|
||||||
class wxListWidgetCocoaImpl;
|
class wxListWidgetCocoaImpl;
|
||||||
|
|
||||||
@interface wxNSTableDataSource : NSObject
|
@interface wxNSTableDataSource : NSObject wxOSX_10_6_AND_LATER(<NSTableViewDataSource>)
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
||||||
<NSTableViewDataSource>
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
wxListWidgetCocoaImpl* impl;
|
wxListWidgetCocoaImpl* impl;
|
||||||
}
|
}
|
||||||
@@ -56,10 +53,7 @@ class wxListWidgetCocoaImpl;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface wxNSTableView : NSTableView
|
@interface wxNSTableView : NSTableView wxOSX_10_6_AND_LATER(<NSTableViewDelegate>)
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
||||||
<NSTableViewDelegate>
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,10 +55,7 @@
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface wxNSMenuController : NSObject
|
@interface wxNSMenuController : NSObject wxOSX_10_6_AND_LATER(<NSMenuDelegate>)
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
||||||
<NSMenuDelegate>
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1199,10 +1199,7 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// define a delegate used to refresh the window during animation
|
// define a delegate used to refresh the window during animation
|
||||||
@interface wxNSAnimationDelegate : NSObject
|
@interface wxNSAnimationDelegate : NSObject wxOSX_10_6_AND_LATER(<NSAnimationDelegate>)
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
|
||||||
<NSAnimationDelegate>
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
wxWindow *m_win;
|
wxWindow *m_win;
|
||||||
bool m_isDone;
|
bool m_isDone;
|
||||||
|
Reference in New Issue
Block a user