[webkit-gtk] Accessing the page load progress
Diego Escalante Urrelo
descalante at igalia.com
Mon Sep 5 16:36:21 PDT 2011
Hi,
El lun, 05-09-2011 a las 18:48 +0100, Andrew Wood escribió:
> How can I check the progress of a page loading, so I can update a
> progress bar? Ive tried this:
>
> webkit_web_view_load_uri (WEBKIT_WEB_VIEW (gtkwebview), url.c_str());
> //this line on its own works
>
You can connect to the notify::progress signal
http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView--progress
http://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-notify
Basically it's a signal that works for any property in any GObject, so
when the property changes you get your callback called.
In this case, you'll get one call for every progress update. You can see
how Epiphany does this:
http://git.gnome.org/browse/epiphany/tree/src/ephy-window.c#n2901
Lots of other examples on that file.
Good luck!
More information about the webkit-gtk
mailing list