From d49875f34f119fac570c4ce35742ec14101087ae Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 4 Jul 2020 20:47:20 +0200 Subject: [PATCH] SDK 10.11 minimum --- src/html/htmlctrl/webkit/webkit.mm | 12 +++--------- src/osx/cocoa/dataview.mm | 4 +--- src/osx/cocoa/window.mm | 5 ++--- src/osx/core/colour.cpp | 2 -- src/osx/webview_webkit.mm | 12 +++--------- 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm index ef8f8a3797..1052900d6e 100644 --- a/src/html/htmlctrl/webkit/webkit.mm +++ b/src/html/htmlctrl/webkit/webkit.mm @@ -30,12 +30,6 @@ #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) - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto > -#else - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) -#endif - extern WXDLLEXPORT_DATA(const char) wxWebKitCtrlNameStr[] = "webkitctrl"; // ---------------------------------------------------------------------------- @@ -114,7 +108,7 @@ inline int wxNavTypeFromWebNavType(int type){ return wxWEBKIT_NAV_OTHER; } -@interface MyFrameLoadMonitor : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate) +@interface MyFrameLoadMonitor : NSObject { wxWebKitCtrl* webKitWindow; } @@ -123,7 +117,7 @@ inline int wxNavTypeFromWebNavType(int type){ @end -@interface MyPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate) +@interface MyPolicyDelegate : NSObject { wxWebKitCtrl* webKitWindow; } @@ -132,7 +126,7 @@ inline int wxNavTypeFromWebNavType(int type){ @end -@interface MyUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate) +@interface MyUIDelegate : NSObject { wxWebKitCtrl* webKitWindow; } diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index b093ca6a6d..c7577e2305 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -3035,14 +3035,12 @@ bool wxDataViewTextRenderer::MacRender() [par setLineBreakMode:[cell lineBreakMode]]; // Tightening looks very ugly when combined with non-tightened rows, // 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 ( WX_IS_MACOS_AVAILABLE(10, 11) ) { [par setAllowsDefaultTighteningForTruncation:NO]; } else -#endif - [par setTighteningFactorForTruncation:0.0]; + [par setTighteningFactorForTruncation:0.0]; [str addAttribute:NSParagraphStyleAttributeName value:par diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 739fead0b8..7bb550b800 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -2828,11 +2828,10 @@ bool wxWidgetCocoaImpl::ShowWithEffect(bool show, return ShowViewOrWindowWithEffect(m_wxPeer, show, effect, timeout); } -// To avoid warnings about incompatible pointer types with OS X 10.11 SDK (and -// maybe even earlier? This has changed at some time between 10.9 and 10.11), +// To avoid warnings about incompatible pointer types with OS X 10.11 SDK // we need to constrain the comparison function arguments instead of just using // "id". -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 && __has_feature(objc_kindof) +#if __has_feature(objc_kindof) typedef __kindof NSView* KindOfView; #else typedef id KindOfView; diff --git a/src/osx/core/colour.cpp b/src/osx/core/colour.cpp index 9430d914d3..17d80c629f 100644 --- a/src/osx/core/colour.cpp +++ b/src/osx/core/colour.cpp @@ -118,7 +118,6 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col) } else if (model != kCGColorSpaceModelRGB) { -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11 if ( WX_IS_MACOS_AVAILABLE(10, 11) ) { rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL); @@ -126,7 +125,6 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col) components = CGColorGetComponents(rgbacol); } else -#endif { isRGB = false; } diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index c5bf2bcc16..77bfc3dc9e 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -44,12 +44,6 @@ #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) - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) < proto > -#else - #define wxWEBKIT_PROTOCOL_SINCE_10_11(proto) -#endif - // ---------------------------------------------------------------------------- // macros // ---------------------------------------------------------------------------- @@ -59,7 +53,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView); wxBEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl) wxEND_EVENT_TABLE() -@interface WebViewLoadDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate) +@interface WebViewLoadDelegate : NSObject { wxWebViewWebKit* webKitWindow; } @@ -68,7 +62,7 @@ wxEND_EVENT_TABLE() @end -@interface WebViewPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate) +@interface WebViewPolicyDelegate : NSObject { wxWebViewWebKit* webKitWindow; } @@ -77,7 +71,7 @@ wxEND_EVENT_TABLE() @end -@interface WebViewUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate) +@interface WebViewUIDelegate : NSObject { wxWebViewWebKit* webKitWindow; }