El Thu, 15 Sep 2011 08:56:25 -0400 (EDT) Alexander Larsson <[email protected]> escribió: > > > ----- Original Message ----- > > On Thu, Sep 15, 2011 at 11:50:22AM +0200, Carlos Garcia Campos > > wrote: > > > > > > [...] > > > > > > Since it's a big change, I would like to share some general ideas > > > I have about the new API so that we can discuss them. > > > > > > - Try to keep webkit1 API when possible to make porting apps > > > easier. > > > - Use async API following the glib/gio pattern for operations > > > started > > > by the user like loading a page, finding text, etc. that has an > > > end. > > > > I've talked to Carlos and just wanted to do some clarifications > > about what this would mean. Developers will have to use an API > > where they add > > the callbacks for the function instead of connecting to signals, for > > instance, load uri was: > > > > webkit_web_view_load_uri (WebKitWebView *webView, > > const gchar *uri); > > > > And now would be: > > > > webkit_web_view_load_uri (WebKitWebView *web_view, > > const gchar *uri, > > GCancellable *cancellable, > > WebKitLoadProgressCallback progress_callback, > > gpointer progress_callback_data, > > GAsyncReadyCallback callback, > > gpointer user_data); > > > > I'm not sure passing the progress callback like this is the best > approach. It means e.g. that you have to reconnect the whole progress > UI handling on each load, in say a webbrowser. Its a nice API if all > your app does is load a single page, but not right if you want to > always show the load status of the view in some other widget.
hmm, good point. > One possible way to make the API "nicer" is to return a > WebKitLoadOperation object and have progress signals on that. I like the idea of having WebKitLoadOperation, this solves the problem of load-status, progress and load-error not making sense when the view is not loading. Regards, -- Carlos Garcia Campos http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
signature.asc
Description: PGP signature
_______________________________________________ webkit-gtk mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
