[Top][All Lists]

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

Re: [Chicken-users] Callback nightmare

From: Tony Garnock-Jones
Subject: Re: [Chicken-users] Callback nightmare
Date: Sat, 29 Oct 2005 06:35:48 +0100
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

Pupeno wrote:
> I am tring to make some clean bindings for Gtk+ and I don't know how to 
> handle 
> the callbacks.

Fair enough. Wrapping Gtk+ is enormously painful. I've already taken a
stab at writing bindings; if you haven't already taken a look, they're
available here:

The code has rotted a lot since I wrote it, mostly because Chicken has
kept moving while my old code has stayed still, but it should be easy
enough to clean it up to get working with a modern Chicken release.
Certainly the old code ran the included demos (test/test+.scm,
test/explore.scm) just fine at one stage.

The part that addresses the problem you're having with callbacks is the
implementation of gsignal-connect in gobject.scm, along with glib's
gtype-based built-in "marshalling" support, that provides enough
metadata to allow limited conversion to and from Scheme types.

I've rendered the API documentation, which also mentions some of the
issues in binding glib, gobject, and Gtk+ to Scheme, and made it
available here:


reply via email to

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