Re: Gtk2::MozEmbed + DOM



On Sat, 26 Mar 2005, Torsten Schoenfeld wrote:
Yeah, sorry, I forgot about that.  I changed the xsub to be:

Ok, cool.

   $embed->signal_connect(dom_mouse_click => sub {
       foreach my $arg (@_) {
           print "'", ref($arg), "'\n";
       }
       return 1;
   });

Well, if I run that, I get:

 'Gtk2::MozEmbed'
 'Gtk2::MozEmbed::MouseEvent'

Everything looks correct, so I don't know why it doesn't work for you.

:(

Can you verify that the marshaller gets called at all?  (Just inserting
random warn ("ping");'s should suffice.)

Yes, I will try that.

The only modification I did to your patch is to include
<dom/nsIDOMMouseEvent.h> instead of just <nsIDOMMouseEvent.h> as the
latter doesn't exist on my system.

Hmm, it's weird that mine is not in the `dom' subdirectory.
It's on Debian Linux, from the package `mozilla-dev', version 1.7.6-1.
Possibly it's due to differing versions of Mozilla.

And I created the dom.typemap since your patch didn't include it:

Oops, sorry forgot.

The methods seem to work for me (I only tried GetButton, though).

Wow, cool. (ok, I mostly copied from something in Gnome2::GnomeConfig
so it's not so surprising :)

 You will have to change the %build_reqs
hash in Makefile.PL to require the next unstable version of Gtk2 for the
CodeGen changes.

This is 1.080, correct?
(if not, we might see why my signals aren't working)

Did you consider changing the names of the methods to match the rest of
the API (GetButton => get_button, for example)?  Studly caps don't occur
in any of the Gtk2-Perl modules, and don't look very pretty either,
IMHO.

I didn't consider it, but I'll change them. I did it that way
because it's how they are in the interfaces for nsIDOM*Event.
But I did already change them to return integers instead of passing
references to integers, so changing the names is better to make it
even more perl-ish.

Oh, and please use tabs for indention in the XS file since this the
quasi-standard here in Gtk2-Perl land.

Oops, yes I always try to follow the style of the existing code
but I wasn't paying attention the tabs.

Thanks.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]