This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Motif port to guile


> 
> 
> I would like to do a port of Motif/Lesstif to guile, along the general
> lines of Stk, but I would like some
> general advice.
> 
> Motif is pretty object oriented, so I think I need an object system. What
> object system should I use?
> 
> As I understand it, keywords are not a standard part of Scheme, although
> they seem useful for
> a Motif interface. Does guile have them, and if so should I use them?
> 
> How similar should I make it to the guile Stk port? Should I take that as
> an example of a good way
> to go, or does it have mistakes that I can now avoid?
> 
> Any other general advice/comments?
> 

You should start by looking at guile-gtk. This was written with the idea of
 being useful to more than just GTK. Many of the problems you will come across
 have already been solved here.

On a more generic note look at SWIG (www.swig.org). A bit of work here and you
 might be able to conjure up a complete interface to Xlib/Xt/Motif.

I have also seen mention of guile-ffi - this would also be worth a look.

On the subject of OO.I would layer your project. The first layer should be an
 exact (as possible) mapping of C ino Guile. The next layer could encapsulate
 this in some OO abstractions. This neatly splits up the project, allows people
 to program at the abstraction level they are most comfortable with and means
 that you might be able to automatise generation of a significant proportion of
 the first layers bindings (using something like guile-ffi or swig).

I did this in Common Lisp once and it worked pretty well, but we had a very
 advanced Foreign Function Interface.

As far as object systems go - there is something afoot, I believe. Although I am
 still playing with tiny-clos, which is wonderful, but slow. You could look for
 Meroon but ideally you need something under the Open Source license, otherwise
 you are going to restrict your audience and development community. It might
 just be better to work on the first layer and hang on, hoping for a decent
 Object System for Guile to materialise.

Let me know how you do - I'd be interested to see this work,



Jules