Re: Gtk2::MozEmbed + DOM



On Tue, 29 Mar 2005, Torsten Schoenfeld wrote:
What do you think about creating a separate Mozilla module?

Yeah, I was thinking it should be more factored out.
Like the KeyEvent and MouseEvent could each have their
own .xs file. I'm not sure I quite get how this will
work when they're in separate Mozilla:: modules, though.

I think ideally it'd be something like

  GtkMozEmbed.xs  --> gtkmozembed2perl.h
  KeyEvent.xs     --> gtkmozemb_keyevent.h
  MouseEvent.xs   --> gtkmozemb_mouseevent.h

  gtkmozembed2perl.h  --> | gtkmozemb_keyevent.h
                          | gtkmozemb_mouseevent.h

where gtkmozemb_keyevent.h (etc.) has

  #include "nsIDOMKeyEvent.h"
  SV * newSVnsIDOMKeyEvent (nsIDOMKeyEvent *event);
  nsIDOMKeyEvent * SvnsIDOMKeyEvent (SV *event);

so that GtkMozEmbed.xs can find these declarations,
but the two functions are implemented at the top of
KeyEvent.xs. GtkMozEmbed.xs would still have the marshallers.
  But the problem I think is that this won't work if
Mozilla::* are separate modules, because I don't
Perl modules distribute C header files. (?)  So I guess
Gtk2::MozEmbed would also have to keep the
(newSV|Sv)nsIDOMKeyEvent functions itself.
  Then what are the Mozilla::* modules? Just basically the
bottom (under MODULE lines) of the GtkMozEmbed.xs file
plus a .pm file?



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