mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-devel] GTk+ in MIT-Scheme?


From: Andreas Rottmann
Subject: Re: [MIT-Scheme-devel] GTk+ in MIT-Scheme?
Date: Tue, 27 Jan 2009 04:18:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

address@hidden (Matt Birkholz) writes:

>> Since you mention GTK+ bindings: are you aware of
>> gobject-introspection[http://live.gnome.org/GObjectIntrospection]?
>> [...]
>
> I am aware of things like that.  I have not looked at any in the last
> couple of years...
>
>> It is designed to make the creating of both static and dynamic
>> bindings much easier, as it should be possible to create
>> fully-functional bindings using only the introspected data
>
> That would be cool.  It would be uber fun to point my shim generator
> at an XML file and get a complete GNOME shim -- no .cdecl files to
> write!  That could save me from the temptation to parse C headers!
>
Yes, gobject-introspection should do all the C parsing for you (it
includes a yacc-based C parser), you'd just need to process the XML it
produces.

>> I do a (runtime) binding library based on gobject-introspection
>> called sbank[http://live.gnome.org/sbank] [...]  this could be an
>> opportunity for sharing code
>
> You are already reading C type and function declarations from a GIR
> XML file?  Oooo, I would like to see THAT.  The next time I find
> myself fiddling .cdecl files I will definitely take a look at sbank.
>
I have only minimal need for using the GIR XML, as I do things at
runtime, where the .typelib (binary representation of the introspection
data) is more appropriate. I only use a GIR file for the header file
that defines the structs and unions that make up the actual binary data
(I use that GIR to create matching accessors at expand-time).

For static bindings, you'd need to work with the GIR instead of the
typelib, however, as you need access to C type names, which are not
included in the .typelib, as they don't make sense at runtime. If you
look for an example project that does static binding based on GIR, you
could take a look at Vala, but I think it uses in intermediate .vapi
format that has (at least currently) even a bit more information as
needed for compile-time bindings; I don't know to what degree this still
is true, however. For questions regarding gobject-introspection, you
could drop by on #introspection no irc.gnome.org, which is reasonably
active[0].

[0] http://rottyforge.yi.org/irclogs/gnome/%23introspection/ </plug>

Regards, Rotty
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty/     | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | C38A 39C5 16D7 B69F 33A3  6993 22C8 27F7 35A9 92E7
v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com

Life is a sexually transmitted disease.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]