Fix compilation of WebView code in wxOSX with SDK < 10.11
This was broken by 05857e66c0
which introduced
dependencies on protocols only declared in 10.11 headers.
Fix build by checking if we're using 10.11 SDK and using these protocols only
in this case.
This commit is contained in:
@@ -28,6 +28,12 @@
|
||||
|
||||
#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";
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -130,7 +136,7 @@ inline int wxNavTypeFromWebNavType(int type){
|
||||
return wxWEBKIT_NAV_OTHER;
|
||||
}
|
||||
|
||||
@interface MyFrameLoadMonitor : NSObject <WebFrameLoadDelegate>
|
||||
@interface MyFrameLoadMonitor : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate)
|
||||
{
|
||||
wxWebKitCtrl* webKitWindow;
|
||||
}
|
||||
@@ -139,7 +145,7 @@ inline int wxNavTypeFromWebNavType(int type){
|
||||
|
||||
@end
|
||||
|
||||
@interface MyPolicyDelegate : NSObject <WebPolicyDelegate>
|
||||
@interface MyPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate)
|
||||
{
|
||||
wxWebKitCtrl* webKitWindow;
|
||||
}
|
||||
@@ -148,7 +154,7 @@ inline int wxNavTypeFromWebNavType(int type){
|
||||
|
||||
@end
|
||||
|
||||
@interface MyUIDelegate : NSObject <WebUIDelegate>
|
||||
@interface MyUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate)
|
||||
{
|
||||
wxWebKitCtrl* webKitWindow;
|
||||
}
|
||||
|
Reference in New Issue
Block a user