コード例 #1
0
ファイル: browser.c プロジェクト: FreeBSDFoundation/freebsd
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);
}
コード例 #2
0
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;
}
コード例 #3
0
ファイル: webkit.c プロジェクト: rottame/gtk-webkit-ruby
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;
}
コード例 #4
0
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);
}
コード例 #5
0
ファイル: ghtml-webkit.c プロジェクト: galexcode/Surfer
/* 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;
}
コード例 #6
0
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);
}
コード例 #7
0
ファイル: callbacks.c プロジェクト: phddoom/uzbl
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);
}
コード例 #8
0
ファイル: ripcurl.c プロジェクト: dluco/ripcurl
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);
}	
コード例 #9
0
ファイル: main.c プロジェクト: flwh/Alcatel_OT_985_kernel
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));
}
コード例 #10
0
ファイル: surf.c プロジェクト: bobrippling/bin
void
progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c) {
	c->progress = webkit_web_view_get_progress(c->view) * 100;
	update(c);
}