static int /*long*/ JSObjectCallAsFunctionProc (int /*long*/ ctx, int /*long*/ function, int /*long*/ thisObject, int /*long*/ argumentCount, int /*long*/ arguments, int /*long*/ exception) { if (WebKitGTK.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) { return WebKitGTK.JSValueMakeUndefined (ctx); } int /*long*/ ptr = WebKitGTK.JSObjectGetPrivate (thisObject); int /*long*/[] handle = new int /*long*/[1]; C.memmove (handle, ptr, C.PTR_SIZEOF); Browser browser = FindBrowser (handle[0]); if (browser == null) return 0; WebKit webkit = (WebKit)browser.webBrowser; return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception); }
static long /*int*/ JSObjectCallAsFunctionProc (long /*int*/ ctx, long /*int*/ function, long /*int*/ thisObject, long /*int*/ argumentCount, long /*int*/ arguments, long /*int*/ exception) { if (WebKitGTK.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) { return WebKitGTK.JSValueMakeUndefined (ctx); } long /*int*/ ptr = WebKitGTK.JSObjectGetPrivate (thisObject); long /*int*/[] handle = new long /*int*/[1]; C.memmove (handle, ptr, C.PTR_SIZEOF); Browser browser = FindBrowser (handle[0]); if (browser == null) return 0; WebKit webkit = (WebKit)browser.webBrowser; return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception); }
static int /*long*/ JSObjectCallAsFunctionProc (int /*long*/ ctx, int /*long*/ function, int /*long*/ thisObject, int /*long*/ argumentCount, int /*long*/ arguments, int /*long*/ exception) { if (WebKitGTK.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) { return WebKitGTK.JSValueMakeUndefined (ctx); } int /*long*/ ptr = WebKitGTK.JSObjectGetPrivate (thisObject); int /*long*/[] handle = new int /*long*/[1]; C.memmove (handle, ptr, C.PTR_SIZEOF); Browser browser = FindBrowser (handle[0]); if (browser == null) return 0; WebKit webkit = (WebKit)browser.webBrowser; return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception); }
static long /*int*/ browserProc(long /*int*/ id, long /*int*/ sel, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3) { Display d = Display.getCurrent(); if (d == null || d.isDisposed()) return 0; Widget widget = d.findWidget(id); if (widget == null) return 0; WebKit webKit = (WebKit)((Browser)widget).webBrowser; if (sel == OS.sel_webView_resource_didFailLoadingWithError_fromDataSource_) { webKit.webView_resource_didFailLoadingWithError_fromDataSource(arg0, arg1, arg2, arg3); } else if (sel == OS.sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_) { webKit.webView_resource_didReceiveAuthenticationChallenge_fromDataSource(arg0, arg1, arg2, arg3); } else if (sel == OS.sel_callJava) { id result = webKit.callJava(arg0, arg1, arg2, arg3); return result == null ? 0 : result.id; } return 0; }
static int /*long*/ JSObjectCallAsFunctionProc (int /*long*/ ctx, int /*long*/ function, int /*long*/ thisObject, int /*long*/ argumentCount, int /*long*/ arguments, int /*long*/ exception) { WebKit_win32.JSGlobalContextRetain (ctx); if (WebKit_win32.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) { return WebKit_win32.JSValueMakeUndefined (ctx); } int /*long*/ ptr = WebKit_win32.JSObjectGetPrivate (thisObject); int /*long*/[] handle = new int /*long*/[1]; C.memmove (handle, ptr, C.PTR_SIZEOF); Browser browser = findBrowser (handle[0]); if (browser == null) return WebKit_win32.JSValueMakeUndefined (ctx); WebKit webkit = (WebKit)browser.webBrowser; return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception); }