Re: Gtk2::MozEmbed + DOM
- From: muppet <scott asofyet org>
- To: Scott Lanning <lannings who int>
- Cc: Torsten Schoenfeld <kaffeetisch gmx de>, gtk-perl-list gnome org
- Subject: Re: Gtk2::MozEmbed + DOM
- Date: Mon, 21 Mar 2005 07:57:16 -0500
On Mar 21, 2005, at 4:55 AM, Scott Lanning wrote:
I looked last night at adding the dom_* signals
to Gtk2::MozEmbed. I appended my notes, but it's going
very slowly... Assuming nobody is working on it already,
if someone (probably Torsten) could explain roughly what
would be necessary or where I could look for an example,
I would appreciate it.
search through the gtk+ source for the xs files that #include
gperl_marshal.h, as those will have custom marshalers. also read the
comments in that header.
you will probably have to add typemap entries for some of the dom types
if you are going to bind them; as i doubt the dom types have glib type
system support, you'll probably have to revert to standard perl
extension techniques.
A good source of info is the Binding Howto
http://gtk2-perl.sourceforge.net/doc/binding_howto.pod.html though I
don't know Gtk2/Glib well enough for some of it to make much sense.
just ask, i'd be happy to clarify.
Need a marshaller for dom event signals, apparently because of the
`gpointer dom_event' arguments?
yes. gpointer is just a generic pointer, with no other type
information. therefore, the generic marshaler has no idea how to wrap
this object and just treats it as an unsigned integer. the custom
marshaler is needed to wrap it the right way.
mozilla-source-1.7.5/embedding/browser/gtk/src/gtkmozembed.h:
gint (* dom_key_down) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_key_press) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_key_up) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_mouse_down) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_mouse_up) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_mouse_click) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_mouse_dbl_click) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_mouse_over) (GtkMozEmbed *embed, gpointer
dom_event);
gint (* dom_mouse_out) (GtkMozEmbed *embed, gpointer
dom_event);
would hope you could use the same marshaler for all of them.
The DOM event interfaces also have their own methods. Do those have to
be wrapped?
if you need to use the events, then they need to be wrapped. i suspect
you'll need to use the events to find out what happened.
--
Brian: If i recall correctly, this is the physics department.
Chris: That explains all that gravity.
-- Family Guy, "The Story on Page One"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]