[webkit-gtk] Accessing the page load progress

Andrew Wood a.j.w at me.com
Mon Sep 5 10:48:57 PDT 2011


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

while (webkit_web_view_get_progress(WEBKIT_WEB_VIEW (gtkwebview)) < 1)
{
           //page loading so update progress bar
            
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar),webkit_web_view_get_progress(WEBKIT_WEB_VIEW 
(gtkwebview)));
  }

but it just jams in an infinite loop.  How is the threading handled 
within WebKit?  Does the loading take place in a separate thread?

Thanks
Andrew




More information about the webkit-gtk mailing list