Re: Gtk2::MozEmbed + DOM



On Thu, 24 Mar 2005, muppet wrote:
On Mar 24, 2005, at 6:29 AM, Scott Lanning wrote:
erm, that doesn't sound right. 'typemap' should Just Work, but for other various reasons, you may want to call it 'dom.typemap' or the like, and add it to the "add_typemaps" line in the Makefile.PL. not sure why the path is being mangled.

Ok, I renamed it 'dom.typemap' and added it to Makefile.PL, and now
that part is working for some reason..


GtkMozEmbed.c:557: error: invalid conversion from `gint' to `
   GtkMozEmbedReloadFlags'
...
        /* * * * line 557 is next * * * */
        GtkMozEmbedReloadFlags  flags = SvGtkMozEmbedReloadFlags (ST(1));

did you add GtkMozEmbedReloadFlags to a maps file? if so (and your project is properly set up, which i assume it is), the #define for this macro will be in build/whatever-autogen.h, protected by #ifdef on the TYPE macro. e.g.

This GtkMozEmbedReloadFlags is indeed in the 'maps' file
(though I didn't add it there). All the generated code for
the types that were already there seems to be fine...
Nothing related to the DOM types is in the generated code, though;
I was assuming that that's expected since I put it in its own
typemap file. Then in the header file for the XS file, I put

  #include <dom/nsIDOMKeyEvent.h>
  #include <nsIDOMMouseEvent.h>

  SV * newSVnsIDOMKeyEvent (nsIDOMKeyEvent *event);
  nsIDOMKeyEvent * SvnsIDOMKeyEvent (SV *event);


  #if FOO_TYPE_BAR
  # define SvFooBar(...)  ...
  # define newSVFooBar(..) ...
  #endif

you may need to either add new includes, reorder includes, or create your own GLib constant wrappers.

for enumeration types, there is usually a GType registered which includes a value table --- this is where the bindings get the information about the enum value nicknames. if those wrappers aren't there, then the constants simply won't work as magical gtk2-perl constants. several of the modules in gtk2-perl cvs have examples of how to add missing enum gtypes in a way that doesn't cause too many problems when the types are eventually added upstream.

But the thing is, this had already been taken care of.
Or, at least, it had been before I started in on it.. :/

Another thing I'm not sure of is if I have to use
gperl_signal_set_marshaller_for; and, if so, I'm not sure
what to put for the first argument, since I didn't set up
those macros like was done for GTK_TYPE_MOZ_EMBED.
Maybe this is the problem.

I attached my diff so far in case you are bored.

Attachment: gtk2mozembed.diff
Description: relevant diffs so far



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