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
|
#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";
|
extern WXDLLEXPORT_DATA(const char) wxWebKitCtrlNameStr[] = "webkitctrl";
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -130,7 +136,7 @@ inline int wxNavTypeFromWebNavType(int type){
|
|||||||
return wxWEBKIT_NAV_OTHER;
|
return wxWEBKIT_NAV_OTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@interface MyFrameLoadMonitor : NSObject <WebFrameLoadDelegate>
|
@interface MyFrameLoadMonitor : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate)
|
||||||
{
|
{
|
||||||
wxWebKitCtrl* webKitWindow;
|
wxWebKitCtrl* webKitWindow;
|
||||||
}
|
}
|
||||||
@@ -139,7 +145,7 @@ inline int wxNavTypeFromWebNavType(int type){
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface MyPolicyDelegate : NSObject <WebPolicyDelegate>
|
@interface MyPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate)
|
||||||
{
|
{
|
||||||
wxWebKitCtrl* webKitWindow;
|
wxWebKitCtrl* webKitWindow;
|
||||||
}
|
}
|
||||||
@@ -148,7 +154,7 @@ inline int wxNavTypeFromWebNavType(int type){
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface MyUIDelegate : NSObject <WebUIDelegate>
|
@interface MyUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate)
|
||||||
{
|
{
|
||||||
wxWebKitCtrl* webKitWindow;
|
wxWebKitCtrl* webKitWindow;
|
||||||
}
|
}
|
||||||
|
@@ -41,6 +41,12 @@
|
|||||||
|
|
||||||
#define DEBUG_WEBKIT_SIZING 0
|
#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
|
// macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -50,7 +56,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView);
|
|||||||
wxBEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl)
|
wxBEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
@interface WebViewLoadDelegate : NSObject <WebFrameLoadDelegate>
|
@interface WebViewLoadDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebFrameLoadDelegate)
|
||||||
{
|
{
|
||||||
wxWebViewWebKit* webKitWindow;
|
wxWebViewWebKit* webKitWindow;
|
||||||
}
|
}
|
||||||
@@ -59,7 +65,7 @@ wxEND_EVENT_TABLE()
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface WebViewPolicyDelegate : NSObject <WebPolicyDelegate>
|
@interface WebViewPolicyDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebPolicyDelegate)
|
||||||
{
|
{
|
||||||
wxWebViewWebKit* webKitWindow;
|
wxWebViewWebKit* webKitWindow;
|
||||||
}
|
}
|
||||||
@@ -68,7 +74,7 @@ wxEND_EVENT_TABLE()
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface WebViewUIDelegate : NSObject <WebUIDelegate>
|
@interface WebViewUIDelegate : NSObject wxWEBKIT_PROTOCOL_SINCE_10_11(WebUIDelegate)
|
||||||
{
|
{
|
||||||
wxWebViewWebKit* webKitWindow;
|
wxWebViewWebKit* webKitWindow;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user