static void view_cb_notify_progress(WebKitWebView *view, GParamSpec *pspec, struct browser_context *ctx) { ctx->progress = 100 * webkit_web_view_get_progress(view); wpa_printf(MSG_DEBUG, "BROWSER:%s progress=%d", __func__, ctx->progress); browser_update_title(ctx); }
JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1progress) (JNIEnv *env, jclass that, jintLong arg0) { jdouble rc = 0; WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1progress_FUNC); rc = (jdouble)webkit_web_view_get_progress((WebKitWebView *)arg0); WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1progress_FUNC); return rc; }
static VALUE WebView_progress(VALUE self) { VALUE __p_retval = Qnil; WebKitWebView *_self = ((WebKitWebView*)RVAL2GOBJ(self)); #line 279 "/home/ngl/Progetti/gtk-webkit-ruby/ext/webkit/webkit.cr" do { __p_retval = rb_float_new(webkit_web_view_get_progress(_self)); goto out; } while(0); out: return __p_retval; }
static void updateTitle(GtkWindow* window, WebKitWebView* webView) { GString *string = g_string_new(webkit_web_view_get_title(webView)); gdouble loadProgress = webkit_web_view_get_progress(webView) * 100; g_string_append(string, " - WebKit Launcher"); if (loadProgress < 100) g_string_append_printf(string, " (%f%%)", loadProgress); gchar *title = g_string_free(string, FALSE); gtk_window_set_title(window, title); g_free(title); }
/* ghtml_get_progress */ gdouble ghtml_get_progress(GtkWidget * widget) { gdouble ret = -1.0; #if WEBKIT_CHECK_VERSION(1, 1, 0) /* XXX may not be accurate */ GHtml * ghtml; ghtml = g_object_get_data(G_OBJECT(widget), "ghtml"); ret = webkit_web_view_get_progress(WEBKIT_WEB_VIEW(ghtml->view)); if(ret == 0.0) ret = -1.0; #endif return ret; }
static void notify_progress_cb (WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { gdouble load_progress = webkit_web_view_get_progress (web_view) * 100; printf("Load progress: %.2f%%\n", load_progress); }
void progress_change_cb (WebKitWebView* web_view, GParamSpec param_spec) { (void) param_spec; int progress = webkit_web_view_get_progress(web_view) * 100; send_event(LOAD_PROGRESS, NULL, TYPE_INT, progress, NULL); }
void cb_wv_notify_progress(WebKitWebView *view, GParamSpec *pspec, Browser *b) { b->State.progress = webkit_web_view_get_progress(b->UI.view) * 100; browser_update_uri(b); }
static void notify_progress_cb (WebKitWebView* web_view, GParamSpec* pspec, gpointer data) { load_progress = webkit_web_view_get_progress (web_view) * 100; update_title (GTK_WINDOW (main_window)); }
void progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c) { c->progress = webkit_web_view_get_progress(c->view) * 100; update(c); }