Re: Gtk2::MozEmbed + DOM



On Wed, 9 Mar 2005, Torsten Schoenfeld wrote:
Gtk2::MozEmbed uses Perl's XS language to wrap gtkmozembed.  So
xs/GtkMozEmbed.xs in the tarball / CVS repository would be the first
place to look if you wanted to add support for the above stuff.  Since
it involves C++, you'd also have to look into getting g++ integrated --
which I know nothing about.  There have been some C++ threads on the
perl-xs list[3], though.

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.


=========

Notes on adding dom_* signals to Gtk2::MozEmbed

http://mail.gnome.org/archives/gtk-perl-list/2004-August/msg00048.html

    * The new_window, dom_*, security_change and status_change signals:
    Those need custom marshallers which were not written yet.

(new_window was since then written)

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.

Need a marshaller for dom event signals, apparently because of
the `gpointer dom_event' arguments?

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);

mozilla-source-1.7.5/embedding/browser/gtk/tests/TestGtkEmbed.cpp
indicates that the `gpointer dom_event' are either `nsIDOMKeyEvent *'
or `nsIDOMMouseEvent *'. I'm not sure what the `gint' return value
is supposed to be; possibly a boolean indicating whether the event
was handled?
The DOM event interfaces also have their own methods. Do those
have to be wrapped?



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