macOS/iOS: Use WKWebView for wxWebView Implementation

WKWebView replaces
WebView on macOS (available since 10.10, deprecated since 10.14) and
UIWebView on iOS (available since 8.0 deprecated since 10.0).
Using WKWebView ensures future compatiblity and unifies the interface
used for iOS and macOS.
This commit is contained in:
Tobias Taschner
2020-11-09 12:44:47 +00:00
parent 6d7f35090d
commit 4df334cec4
4 changed files with 320 additions and 529 deletions

View File

@@ -2789,6 +2789,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSRotationGestureRecognizer);
DECLARE_WXCOCOA_OBJC_CLASS(NSPressGestureRecognizer);
DECLARE_WXCOCOA_OBJC_CLASS(NSTouch);
DECLARE_WXCOCOA_OBJC_CLASS(NSPasteboard);
DECLARE_WXCOCOA_OBJC_CLASS(WKWebView);
typedef WX_NSWindow WXWindow;
typedef WX_NSView WXWidget;
@@ -2797,6 +2798,7 @@ typedef WX_NSMenu WXHMENU;
typedef WX_NSOpenGLPixelFormat WXGLPixelFormat;
typedef WX_NSOpenGLContext WXGLContext;
typedef WX_NSPasteboard OSXPasteboard;
typedef WX_WKWebView OSXWebViewPtr;
#elif wxOSX_USE_IPHONE
@@ -2810,7 +2812,6 @@ DECLARE_WXCOCOA_OBJC_CLASS(UIImage);
DECLARE_WXCOCOA_OBJC_CLASS(UIEvent);
DECLARE_WXCOCOA_OBJC_CLASS(NSSet);
DECLARE_WXCOCOA_OBJC_CLASS(EAGLContext);
DECLARE_WXCOCOA_OBJC_CLASS(UIWebView);
DECLARE_WXCOCOA_OBJC_CLASS(UIPasteboard);
typedef WX_UIWindow WXWindow;
@@ -2819,15 +2820,10 @@ typedef WX_UIImage WXImage;
typedef WX_UIMenu WXHMENU;
typedef WX_EAGLContext WXGLContext;
typedef WX_NSString WXGLPixelFormat;
typedef WX_UIWebView OSXWebViewPtr;
typedef WX_UIPasteboard WXOSXPasteboard;
#endif
#if wxOSX_USE_COCOA_OR_CARBON
DECLARE_WXCOCOA_OBJC_CLASS(WebView);
typedef WX_WebView OSXWebViewPtr;
#endif
#endif /* __WXMAC__ */