Re: [gtk-list] auto-generating language bindings



"Olly Stephens" <olly@scatcat.demon.co.uk> writes:

> I'm working on Modula-3 bindings for the GTK library.

Great!

> Once I've worked out the best way to map the functionality onto M3 
> objects by hand (which I think I nearly have), I'm hoping to auto-
> generate most of the code.
> 
> Any hints as to the best way to do this?  I've looked briefly at some 
> of the things done by other bindings.  I've also looked at gtk.defs 
> which looks ideal but:
> 
> 1. is it up-to-date (and will it be kept up-to-date) ?

I'm afraid it is not.  This is largely due to me dragging my feet.  I
think there are enough language bindings out there to think about
unifying their mechanisms for auto-generating glue code.  I always
wanted to do that and it's a pity that I can't muster the motivation.

It will definitely pay of to start with one of the formal descriptions
of the Gtk+ API used by one of the language bindings and try to stay
compatible with it.  I suggest you look at the Python bindings.

> 2. it doesn't appear to define any of the signals

All necessary information about signals can be found at run-time.  If
that is not good enough, you are very welcome to add signal
information to the defs files.  I can give you some hints how to do
that in the `right' way.

- Marius



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