Re: lgtk-0.0.3 - experimental gtk bindings for Common Lisp

Mario Mommer <[email protected]> Tue, 28 Oct 2003 18:45:40 +0100
Newsgroups gmane.lisp.clump
Message-ID <[email protected]>
Miles Egan <[email protected]> writes:
> On Mon, 2003-10-27 at 15:12, Mario Mommer wrote:
> > Hi,
> > 
> > I have just put up experimental gtk bindings at common-lisp.net, to be
> > found here:
> > 
> > http://common-lisp.net/project/lgtk/
> 
> I'm looking forward to having a closer look at this, but I was wondering
> how you handle callbacks into lisp.  Can you do this in any remotely
> portable way?

I tried to keep the non-portable part as isolated as possible, so it
should be easy to port. You need some way to call into lisp, of
course. What plain cmucl 18e supports is enough, although it is not as
convenient as what cmucl 19a will have.

As to how it works: When a callback is added, I give it an id number
and store it in a hashtable. The toolkit then is asked to call a
certain handler callback with this number as an argument. The handler
then retrieves the corresponding lisp callback and executes it.

Regards,
        Mario.