Skip to content

Commit

Permalink
Fix typo of allowsBackForwardNavigationGestures
Browse files Browse the repository at this point in the history
  • Loading branch information
chantmk committed Nov 25, 2022
1 parent 3ef495f commit cea0858
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions plugins/WebViewObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private static extern void _CWebViewPlugin_Reload(
private static extern string _CWebViewPlugin_GetMessage(IntPtr instance);
#elif UNITY_IPHONE
[DllImport("__Internal")]
private static extern IntPtr _CWebViewPlugin_Init(string gameObject, bool transparent, bool zoom, string ua, bool enableWKWebView, int wkContentMode, bool wkAllowsLinkPreview, bool wkAllowsBackForwardNavigationGesture);
private static extern IntPtr _CWebViewPlugin_Init(string gameObject, bool transparent, bool zoom, string ua, bool enableWKWebView, int wkContentMode, bool wkAllowsLinkPreview, bool wkAllowsBackForwardNavigationGestures);
[DllImport("__Internal")]
private static extern int _CWebViewPlugin_Destroy(IntPtr instance);
[DllImport("__Internal")]
Expand Down Expand Up @@ -403,7 +403,7 @@ public void Init(
bool enableWKWebView = true,
int wkContentMode = 0, // 0: recommended, 1: mobile, 2: desktop
bool wkAllowsLinkPreview = true,
bool wkAllowsBackForwardNavigationGesture = true,
bool wkAllowsBackForwardNavigationGestures = true,
// editor
bool separated = false)
{
Expand Down Expand Up @@ -469,7 +469,7 @@ public void Init(
rect = new Rect(0, 0, Screen.width, Screen.height);
OnApplicationFocus(true);
#elif UNITY_IPHONE
webView = _CWebViewPlugin_Init(name, transparent, zoom, ua, enableWKWebView, wkContentMode, wkAllowsLinkPreview, wkAllowsBackForwardNavigationGesture);
webView = _CWebViewPlugin_Init(name, transparent, zoom, ua, enableWKWebView, wkContentMode, wkAllowsLinkPreview, wkAllowsBackForwardNavigationGestures);
#elif UNITY_ANDROID
webView = new AndroidJavaObject("net.gree.unitywebview.CWebViewPlugin");
webView.Call("Init", name, transparent, zoom, androidForceDarkMode, ua);
Expand Down
10 changes: 5 additions & 5 deletions plugins/iOS/WebView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ @implementation CWebViewPlugin
static WKProcessPool *_sharedProcessPool;
static NSMutableArray *_instances = [[NSMutableArray alloc] init];

- (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)transparent zoom:(BOOL)zoom ua:(const char *)ua enableWKWebView:(BOOL)enableWKWebView contentMode:(WKContentMode)contentMode allowsLinkPreview:(BOOL)allowsLinkPreview allowsBackForwardNavigationGesture:(BOOL)allowsBackForwardNavigationGesture
- (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)transparent zoom:(BOOL)zoom ua:(const char *)ua enableWKWebView:(BOOL)enableWKWebView contentMode:(WKContentMode)contentMode allowsLinkPreview:(BOOL)allowsLinkPreview allowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
{
self = [super init];

Expand Down Expand Up @@ -186,7 +186,7 @@ - (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)tra
#endif
WKWebView *wkwebView = [[WKWebView alloc] initWithFrame:view.frame configuration:configuration];
wkwebView.allowsLinkPreview = allowsLinkPreview;
wkwebView.allowsBackForwardNavigationGesture = allowsBackForwardNavigationGesture;
wkwebView.allowsBackForwardNavigationGestures = allowsBackForwardNavigationGestures;
webView = wkwebView;
webView.UIDelegate = self;
webView.navigationDelegate = self;
Expand Down Expand Up @@ -799,7 +799,7 @@ - (void)clearCache:(BOOL)includeDiskFiles
@end

extern "C" {
void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGesture);
void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGestures);
void _CWebViewPlugin_Destroy(void *instance);
void _CWebViewPlugin_SetMargins(
void *instance, float left, float top, float right, float bottom, BOOL relative);
Expand Down Expand Up @@ -829,7 +829,7 @@ void _CWebViewPlugin_SetMargins(
void _CWebViewPlugin_ClearCache(void *instance, BOOL includeDiskFiles);
}

void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGesture)
void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGestures)
{
if (! (enableWKWebView && [WKWebView class]))
return nil;
Expand All @@ -845,7 +845,7 @@ void _CWebViewPlugin_SetMargins(
wkContentMode = WKContentModeRecommended;
break;
}
CWebViewPlugin *webViewPlugin = [[CWebViewPlugin alloc] initWithGameObjectName:gameObjectName transparent:transparent zoom:zoom ua:ua enableWKWebView:enableWKWebView contentMode:wkContentMode allowsLinkPreview:allowsLinkPreview allowsBackForwardNavigationGesture:allowsBackForwardNavigationGesture];
CWebViewPlugin *webViewPlugin = [[CWebViewPlugin alloc] initWithGameObjectName:gameObjectName transparent:transparent zoom:zoom ua:ua enableWKWebView:enableWKWebView contentMode:wkContentMode allowsLinkPreview:allowsLinkPreview allowsBackForwardNavigationGestures:allowsBackForwardNavigationGestures];
[_instances addObject:webViewPlugin];
return (__bridge_retained void *)webViewPlugin;
}
Expand Down
10 changes: 5 additions & 5 deletions plugins/iOS/WebViewWithUIWebView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ @implementation CWebViewPlugin
static WKProcessPool *_sharedProcessPool;
static NSMutableArray *_instances = [[NSMutableArray alloc] init];

- (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)transparent zoom:(BOOL)zoom ua:(const char *)ua enableWKWebView:(BOOL)enableWKWebView contentMode:(WKContentMode)contentMode allowsLinkPreview:(BOOL)allowsLinkPreview allowsBackForwardNavigationGesture:(BOOL)allowsBackForwardNavigationGesture
- (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)transparent zoom:(BOOL)zoom ua:(const char *)ua enableWKWebView:(BOOL)enableWKWebView contentMode:(WKContentMode)contentMode allowsLinkPreview:(BOOL)allowsLinkPreview allowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
{
self = [super init];

Expand Down Expand Up @@ -239,7 +239,7 @@ - (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)tra
#endif
WKWebView *wkwebView = [[WKWebView alloc] initWithFrame:view.frame configuration:configuration];
wkwebView.allowsLinkPreview = allowsLinkPreview;
wkwebView.allowsBackForwardNavigationGesture = allowsBackForwardNavigationGesture;
wkwebView.allowsBackForwardNavigationGestures = allowsBackForwardNavigationGestures;
webView = wkwebView;
webView.UIDelegate = self;
webView.navigationDelegate = self;
Expand Down Expand Up @@ -902,7 +902,7 @@ - (void)setBasicAuthInfo:(const char *)userName password:(const char *)password
@end

extern "C" {
void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGesture);
void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGestures);
void _CWebViewPlugin_Destroy(void *instance);
void _CWebViewPlugin_SetMargins(
void *instance, float left, float top, float right, float bottom, BOOL relative);
Expand Down Expand Up @@ -932,7 +932,7 @@ void _CWebViewPlugin_SetMargins(
void _CWebViewPlugin_ClearCache(void *instance, BOOL includeDiskFiles);
}

void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGesture)
void *_CWebViewPlugin_Init(const char *gameObjectName, BOOL transparent, BOOL zoom, const char *ua, BOOL enableWKWebView, int contentMode, BOOL allowsLinkPreview, BOOL allowsBackForwardNavigationGestures)
{
WKContentMode wkContentMode = WKContentModeRecommended;
switch (contentMode) {
Expand All @@ -946,7 +946,7 @@ void _CWebViewPlugin_SetMargins(
wkContentMode = WKContentModeRecommended;
break;
}
CWebViewPlugin *webViewPlugin = [[CWebViewPlugin alloc] initWithGameObjectName:gameObjectName transparent:transparent zoom:zoom ua:ua enableWKWebView:enableWKWebView contentMode:wkContentMode allowsLinkPreview:allowsLinkPreview allowsBackForwardNavigationGesture:allowsBackForwardNavigationGesture];
CWebViewPlugin *webViewPlugin = [[CWebViewPlugin alloc] initWithGameObjectName:gameObjectName transparent:transparent zoom:zoom ua:ua enableWKWebView:enableWKWebView contentMode:wkContentMode allowsLinkPreview:allowsLinkPreview allowsBackForwardNavigationGestures:allowsBackForwardNavigationGestures];
[_instances addObject:webViewPlugin];
return (__bridge_retained void *)webViewPlugin;
}
Expand Down

0 comments on commit cea0858

Please sign in to comment.