be passed as an index to @code{xwidget-webkit-goto-history}.
@end defun
+@defun xwidget-webkit-estimated-load-progress xwidget
+Return an estimate of how much data is remaining to be transferred
+before the page displayed by the WebKit widget @var{xwidget} is fully
+loaded.
+
+The value returned is a float ranging between 0.0 and 1.0.
+@end defun
+
@node Buttons
@section Buttons
@cindex buttons in buffers
This function is used to obtain the history of page-loads in a given
WebKit xwidget.
++++
+*** New function 'xwidget-webkit-estimated-load-progress'.
+This function is used to obtain the estimated progress of page loading
+in a given WebKit xwidget.
+
+++
*** 'load-changed' xwidget events are now more detailed.
In particular, they can now have different arguments based on the
return list3 (back, here, forward);
}
+
+DEFUN ("xwidget-webkit-estimated-load-progress",
+ Fxwidget_webkit_estimated_load_progress, Sxwidget_webkit_estimated_load_progress,
+ 1, 1, 0, doc: /* Get the estimated load progress of XWIDGET, a WebKit widget.
+Return a value ranging from 0.0 to 1.0, based on how close XWIDGET
+is to completely loading its page. */)
+ (Lisp_Object xwidget)
+{
+ struct xwidget *xw;
+ WebKitWebView *webview;
+ double value;
+
+ CHECK_XWIDGET (xwidget);
+ xw = XXWIDGET (xwidget);
+ CHECK_WEBKIT_WIDGET (xw);
+
+ block_input ();
+ webview = WEBKIT_WEB_VIEW (xw->widget_osr);
+ value = webkit_web_view_get_estimated_load_progress (webview);
+ unblock_input ();
+
+ return make_float (value);
+}
#endif
void
#ifdef USE_GTK
defsubr (&Sxwidget_webkit_load_html);
defsubr (&Sxwidget_webkit_back_forward_list);
+ defsubr (&Sxwidget_webkit_estimated_load_progress);
#endif
defsubr (&Skill_xwidget);