On Feb 18, 2010, at 1:44 PM, Leo L. Schwab wrote:
I'm trying to write an HTML viewer, as a precursor to making mods to an email client, and WebKit looked like a decent foundation. So I've beenmucking around with WebKitGTK+.Since this is intended to be an HTML/email viewer and not a Web browser, I want my app to handle all remote resource requests. As anexample, if a request is made for an image, and that image just happens to be attached to the current email, I'd like to be able to hand it to WebKit directly. Anything that would open a network connection would be blocked.I wrote a tiny program that connects to the web view's 'resource-request-starting' signal, and this works very well as far as itgoes. I see everything WebKit's trying to load, and am able to block loadsby changing the URI to "about:blank". The trouble is I'm not seeing how to provide resources to WebKit inthe event I have what it's looking for. The "obvious" solution would be, in the resource-request-starting signal handler, to create a WebKitWebResource and pass it back to WebKit, but there appears to be no facility to do this.Is what I'm trying to do reasonable? What bits of documentation should I be reading to better understand how to make this work?
In the Balsa email client[1], we use webkit_network_request_set_uri to replace a cid URI with a file URI pointing to a temporary file containing the requested message part.
Good hunting! Peter [1]<URL:http://git.gnome.org/browse/balsa/tree/libbalsa/html.c>
pgpd5YOYTeQmj.pgp
Description: PGP signature
_______________________________________________ webkit-gtk mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk
