Re: GIntrospection and poppler
- From: Jonathan Blandford <jrb redhat com>
- To: Matthias Clasen <mclasen redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GIntrospection and poppler
- Date: 04 May 2005 13:23:46 -0400
Matthias Clasen <mclasen redhat com> writes:
> > * I needed a constructor for boxed types. I put a patch in bugzilla to
> > add support for this. Also, return-types in constructors seem to be
> > optional. They should prolly be mandatory.
>
> agreed
I'll update the DTD then. I wonder if it makes sense to check this into
CVS at all.
> > * I didn't bother with any of the copy/free functions that go with
> > boxed types, as g_boxed_copy/free will work as well. Does this make
> > sense? Seems like something we can't automate.
>
> Not sure if having copy/free specified buys us anything.
Yeah. Doesn't make a difference either way. I'll leave them out as
they kinda seem part of the C bindings.
> > * I had to put <return-type type="void" /> in all functions without a
> > return value. Might be nicer to make this field optional.
>
> maybe.
maybe not?
> > * There's no way to indicate a union. I suppose I can add a bunch of
> > accessor's, but it's pretty obnoxious. It'll be worse for GdkEvent,
> > too.
>
> ok, so we probably need unions
I suppose I could remove the Union support in poppler too. It's of low
priority, as we mostly use this opaquely.
> > * I couldn't indicate what the contents of a GList are. I vaguely
> > recall this went by in the last round of mail, but I don't see it in
> > the archives off-hand. This is a must.
>
> I'm a bit unhappy with how this is currently done, but the parser allows
> you to specify types like GList<GtkWidget>, GHashTable<string,GObject>
> or GError<GMarkupError,GFileError,GdkPixbufError>
Ah, cool. Why the unhappiness?
> Currently, the lookup is done in all available namespaces, based only on
> the name. Ie if you refer to a type named "Foo", we look for "Foo" in
> all available namespaces. We should probably make it possible to
> explicitly refer to a type in a different namespace, eg. using
> "FooLib::Foo". Some of the examples use qualified names like
> "FooLib.Foo" to achieve the same effect, but it would certainly be
> better to lift this from a naming convention to something that can be
> enforced.
I would expect that 'Foo' only be looked up in the current namespace,
and that 'Gtk::Button' would refer to GtkButton. It seems like
glib/GObject should also be unnamespaced, too (eg, 'GObject::guint' is
clearly wrong. 'GObject::Object' is probably wrong.)
> > * How does it know where in the struct the various fields are? Or do I
> > need to layout the whole struct when defining fields?
>
> The binary metadata format has "struct_offset" for fields and vfuncs,
> but the code doesn't handle that yet.
Nice. I might look into implementing that, then. I'm going to update
the .gidl file for poppler tonight and check it in. I'd like to then
look into doing something with the metadata. I'll probably have many
more comments then.
Thanks,
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]