[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: fltk bindings for lua, 0.1
- From: "Jay Carlson" <nop@...>
- Date: Sun, 8 Jul 2001 22:30:56 -0400
I've put up a quick set of fltk bindings for Lua 4.0 at
http://www.place.org/~nop/lua-fltk-0.1.tar.gz
This is my first Lua work, so I may be making obvious mistakes; I still
think other people might be interested in it.
Here's the README:
Fltk bindings for lua
Jay Carlson nop@nop.com
Hacked together over a weekend (between rounds of Counter-Strike). No
warranty.
*** DANGER *** DANGER *** DANGER ***
I'm sure my memory management is completely hosed. OTOH my samples
don't crash, so I'm guessing I'm leaking rather than prematurely
freeing.
*** DANGER *** DANGER *** DANGER ***
Requires Lua 4.0 and toLua 4.0 (alpha, at the time of this writing).
Built on Debian 2.2; if you're lucky it might be portable to your
system.
I'm not sure whether the *.tolua fltk bindings are covered by the LGPL
or not; perhaps it's safest to assume so. Consider the rest of the
package to be covered by the terms of the lua license in lua.h.
Some notes:
There's an implicit Fl:run() at the end of cmdline arg execution.
However, if you start up without any args at all you need to Fl:run()
yourself once you have a window up. (Fl:run() exits if there are no
windows on screen.)
If you add -i, like "flua -i multi.lua", you'll get an interactive
shell after the scripts run.
The base API is very C++-like. What would a good API in the spirit of
Lua look like? Would it make sense to implement on top of this?
There's no Fltk event handling, just callbacks. And no drawing,
either. But hey, no fltk *or* tolua code was modified!
I'm sure the memory management is completely hosed. OTOH my samples
don't crash, so I'm guessing I'm leaking rather than prematurely
freeing.
It sure would be nice to have a fluid code generator for flua.