Re: [gnome-bindings] Redefining the defs format =)



On 14 Apr 2001 23:55:15 -0400, Ariel Rios wrote:
> Ok guys.
> We need to get a final version of the defs file format
> that satisfy most of the language binders.
> I will restart the discussion by sending some comments
> of the current version. This do not means that all
> of my ideas are there... But I want to start discussion
> Hopefully if we all agree we can have the gtk-defs and gnome-defs
> modules.
> 
> Remember that the current version of the document is on gtk+ HEAD
> on the docs dir.

First of all, it's great to see some discussion here. I tried at least
once to get some sort of discussion going on improving the defs format
without any success.

I've been working on Tcl bindings for Gtk 2.0 for a while now. Because
noone here seemed interested in cooperating I ended up defining my own
format, but if there was an authorative definition I would certainly
use it and help with maintenance.

For every public C function I need:
 - the name (available)
 - the class it belongs to (available)
 - the C return type and arg types (available)
 - the GTypes correpsonding to those C types (not available ?)

I can go from the C type to the Gtype with a fair degree of accuracy
using various heuristics, but it's ugly. Perhaps instead of including
the GTypes with every function we could just define a mapping from
the C type to the GType. The defs format seems to have some provision
for this, with "type", but it doesn't seem to be used in gtk.defs

The defs format seems to define a great deal of information that does
not seem needed given Glib's intropspection abilities. For example
defining the enums, flags, and signals seems like overkill. All of the
information needed can be queried at runtime. Maybe there is some
language binding that makes good use of this information?

Slightly unrelated: we should also get together to make sure the various
libraries we want to wrap register things like enums, flags, and boxed
types with the Glib type system. For example GdkPixbuf doesn't register
some enums and misc. pointers in Gtk aren't registered.

Mark





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