diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c index 63ed1f28124..7028cfaba04 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c @@ -965,6 +965,88 @@ JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1download_1set_1destination) } #endif +#ifndef NO_webkit_1find_1controller_1search +JNIEXPORT void JNICALL WebKitGTK_NATIVE(webkit_1find_1controller_1search) + (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jint arg2, jint arg3) +{ + jbyte *lparg1=NULL; + WebKitGTK_NATIVE_ENTER(env, that, webkit_1find_1controller_1search_FUNC); + if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; +/* + webkit_find_controller_search(arg0, lparg1, arg2, arg3); +*/ + { + WebKitGTK_LOAD_FUNCTION(fp, webkit_find_controller_search) + if (fp) { + ((void (CALLING_CONVENTION*)(jlong, jbyte *, jint, jint))fp)(arg0, lparg1, arg2, arg3); + } + } +fail: + if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); + WebKitGTK_NATIVE_EXIT(env, that, webkit_1find_1controller_1search_FUNC); +} +#endif + +#ifndef NO_webkit_1find_1controller_1search_1finish +JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1find_1controller_1search_1finish) + (JNIEnv *env, jclass that, jlong arg0) +{ + jlong rc = 0; + WebKitGTK_NATIVE_ENTER(env, that, webkit_1find_1controller_1search_1finish_FUNC); +/* + rc = (jlong)webkit_find_controller_search_finish(arg0); +*/ + { + WebKitGTK_LOAD_FUNCTION(fp, webkit_find_controller_search_finish) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0); + } + } + WebKitGTK_NATIVE_EXIT(env, that, webkit_1find_1controller_1search_1finish_FUNC); + return rc; +} +#endif + +#ifndef NO_webkit_1find_1controller_1search_1next +JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1find_1controller_1search_1next) + (JNIEnv *env, jclass that, jlong arg0) +{ + jlong rc = 0; + WebKitGTK_NATIVE_ENTER(env, that, webkit_1find_1controller_1search_1next_FUNC); +/* + rc = (jlong)webkit_find_controller_search_next(arg0); +*/ + { + WebKitGTK_LOAD_FUNCTION(fp, webkit_find_controller_search_next) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0); + } + } + WebKitGTK_NATIVE_EXIT(env, that, webkit_1find_1controller_1search_1next_FUNC); + return rc; +} +#endif + +#ifndef NO_webkit_1find_1controller_1search_1previous +JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1find_1controller_1search_1previous) + (JNIEnv *env, jclass that, jlong arg0) +{ + jlong rc = 0; + WebKitGTK_NATIVE_ENTER(env, that, webkit_1find_1controller_1search_1previous_FUNC); +/* + rc = (jlong)webkit_find_controller_search_previous(arg0); +*/ + { + WebKitGTK_LOAD_FUNCTION(fp, webkit_find_controller_search_previous) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0); + } + } + WebKitGTK_NATIVE_EXIT(env, that, webkit_1find_1controller_1search_1previous_FUNC); + return rc; +} +#endif + #ifndef NO_webkit_1get_1major_1version JNIEXPORT jint JNICALL WebKitGTK_NATIVE(webkit_1get_1major_1version) (JNIEnv *env, jclass that) @@ -1836,6 +1918,26 @@ JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1estimated_1lo } #endif +#ifndef NO_webkit_1web_1view_1get_1find_1controller +JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1find_1controller) + (JNIEnv *env, jclass that, jlong arg0) +{ + jlong rc = 0; + WebKitGTK_NATIVE_ENTER(env, that, webkit_1web_1view_1get_1find_1controller_FUNC); +/* + rc = (jlong)webkit_web_view_get_find_controller(arg0); +*/ + { + WebKitGTK_LOAD_FUNCTION(fp, webkit_web_view_get_find_controller) + if (fp) { + rc = (jlong)((jlong (CALLING_CONVENTION*)(jlong))fp)(arg0); + } + } + WebKitGTK_NATIVE_EXIT(env, that, webkit_1web_1view_1get_1find_1controller_FUNC); + return rc; +} +#endif + #ifndef NO_webkit_1web_1view_1get_1main_1resource JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(webkit_1web_1view_1get_1main_1resource) (JNIEnv *env, jclass that, jlong arg0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h index 5199504355e..72770e91301 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h @@ -69,6 +69,10 @@ typedef enum { webkit_1download_1get_1web_1view_FUNC, webkit_1download_1set_1allow_1overwrite_FUNC, webkit_1download_1set_1destination_FUNC, + webkit_1find_1controller_1search_FUNC, + webkit_1find_1controller_1search_1finish_FUNC, + webkit_1find_1controller_1search_1next_FUNC, + webkit_1find_1controller_1search_1previous_FUNC, webkit_1get_1major_1version_FUNC, webkit_1get_1micro_1version_FUNC, webkit_1get_1minor_1version_FUNC, @@ -112,6 +116,7 @@ typedef enum { webkit_1web_1view_1can_1show_1mime_1type_FUNC, webkit_1web_1view_1get_1context_FUNC, webkit_1web_1view_1get_1estimated_1load_1progress_FUNC, + webkit_1web_1view_1get_1find_1controller_FUNC, webkit_1web_1view_1get_1main_1resource_FUNC, webkit_1web_1view_1get_1page_1id_FUNC, webkit_1web_1view_1get_1settings_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java index da116e4a1d2..9851308dfa7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java @@ -420,8 +420,6 @@ public class WebKitGTK extends C { */ public static final native void webkit_window_properties_get_geometry(long webKitWindowProperties, GdkRectangle rectangle); - - /** @method flags=dynamic */ public static final native void webkit_web_view_go_back(long web_view); @@ -535,6 +533,23 @@ public class WebKitGTK extends C { /** @method flags=dynamic */ public static final native void webkit_user_script_unref (long user_script); + +/** @method flags=dynamic */ +public static final native long webkit_web_view_get_find_controller(long webView); + +/** @method flags=dynamic */ +/* void webkit_find_controller_search (WebKitFindController *find_controller, const gchar *search_text, guint32 find_options, guint max_match_count); **/ +public static final native void webkit_find_controller_search(long findController, byte[] textToSearch, int options, int max_match_count); + +/** @method flags=dynamic */ +public static final native long webkit_find_controller_search_next(long findController); + +/** @method flags=dynamic */ +public static final native long webkit_find_controller_search_previous(long findController); + +/** @method flags=dynamic */ +public static final native long webkit_find_controller_search_finish(long findController); + /* --------------------- start SWT natives --------------------- */ public static final native int GdkRectangle_sizeof();