Submitted for your perusal, as the outcome of my Google Summer of Code efforts hitherto:
The first (somewhat) working draft of a shiny new module. It's for putting a browser in your Wx apps... with a few temporary caveats.
First, it doesn't work on Windows, because wxWebKit only compiles with MSVC at the moment. So Strawberry's right out, and my ActivePerl install is GCC-built too. I'm not sure if all AP versions are (I think they used to be MSVC?) but there you go. We're going to start work on porting to GCC / MinGW, but I don't know how long that'll take.
Also, there's a bug that's only in the Gtk layer at the moment which makes it pretty unusable on Linux too wxWebKit git repo if you have the skillz and inclination to apply it yourself (although sneakily, the new build system is in fact waf, not scons.)
Building the wxWebKit binaries was a steep learning curve for me personally; it might be a lot easier for people who know what they're doing, but I've put up a Linux (Ubuntu 9.04) binary for those who want the least possible faffing about (75MB tarball mind):
Now, if anyone's still with me, there are a number of things that I'm still working on / need help with:
General coding style of
Testing on Mac / BSD.
For some reason, when I tried to change sub OnAddressBarEnter to also call SetFocus on the Wx::WebView object, it crashed with the error: "Can't locate object method "SetFocus" via package "Wx::WebView" at blib/lib/Wx/DemoModules/wxWebKit.pm line 275." (you'll see I have the line still there commented out). I went and looked through the
The general wxWebKit API class is called wxWebView, so that's what I ran through h2xs and that's what I started hacking on at the beginning. I always thought that it'd be more convenient for users of the module to call Wx::WebKit->new, so this morning I tried to change it to that. I changed the package name in WebKit.xs, and every occurrence of 'WebView' I could find in Wx/WebKit.pm and Wx/DemoModules/wxWebKit.pm. test.pl seemed to load fine, but when I input a URL and OnAddressBarEnter eventually called $browser->LoadURL, the app crashed with the error "variable is not of type Wx::WebView at
I haven't figured out what's involved in exposing wxWebView's special events yet. I'm going to look at Wx::ActiveX for how to do that; hopefully I'll understand what's going on, if not I'll hit it with a wrench for a while before giving up and asking here again.
So, if anyone can help with any of the above, I'd be very much obliged. Big thanks to Mattia and the wxperl-users list for all your help so far.
By the way, I've called this a 'new' module, and labelled my effort 0.01. I've made repeated reference to Dan Sugalski's existing CPAN module. I haven't been in direct contact with him about it yet but if my one works on Mac at the minute then it should be as functional as the existing one. Mac users please let me know.
Ta for now!