guile-user
[Top][All Lists]
Advanced

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

Re: gnome-guile and C types?


From: Bill Gribble
Subject: Re: gnome-guile and C types?
Date: 15 Oct 2001 13:48:31 -0500

On Mon, 2001-10-15 at 13:13, Maciej Stachowiak wrote:
> The best way to add bindings to guile-gtk/gnome-guile is to use the
> code generator, which can automatically generate wrappers from .defs
> files. 

Right.  I was presuming that the omission of functions which return a
GList * was a pretty broad hint that the code generator can't handle
GLists smoothly.  That makes a lot of sense, because it's not very safe
to pass around void pointers and I know gnome-guile has been going for
type safety.  

In g-wrap, we had to deal with that by forcing the defs file to
explicitly declare what the type of the void* data for each GList cell
was.  Still not completely safe, but it allows for smooth conversion
between GLists and SCM lists, at least. 

> I suspect guile-gtk also exports the function needed to convert a
> GtkWidget * to a Scheme object, but I'm not sure.

Thanks.  I always forget that guile-gtk and guile-gnome aren't the same
thing, and I was looking for a C header in guile-gnome rather than
guile-gtk.  I've found it now.  It looks like a combination of
'sgtk_list_to_scm' and 'sgtk_wrap_gtkobj' will do what I needed. 

b.g.





reply via email to

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