lua-users home
lua-l archive

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


I built Lua 4.1 for Window CE yesterday, for use on my Pocket PC.  I first got it executing
scripts via the command line (with only MessageBox for output), then wrote a simple GUI for
interactive sessions; the easy stuff. Now I want to provide full access the Window API.  I can
think of a couple major options:

The first is expose the Win32 API via C code, either by totally by hand or mechanically assisted
(ToLua).  It seems like exposing even a small percentage of the Window API will require a huge
amount of C "wrapper" code.  The runtime will be huge.  Parts of the API that I *don't* get around
to exposing will be totally unavailable to Lua. I don't really like this option.

The second is to find a Window GUI library that has already been integrated with Lua, that is
fairly small and *Unicode aware*, which I can port to Windows CE.

The third is to provide a generic mechanism for prototyping C functions and data structures, and
directly calling into arbitrary DLLs from Lua. If you wanted a more "Lua-ized" interface to the
Win32 API, you could write it directly in Lua. This is how the Pocket-PC Forth and Scheme
interpreters work. I like this option best of all.

So my questions: has this been done?  Are there fundamental problems/limitations/gotchas?  Is
there another approach I haven't thought of?

I appreciate any thoughts on this.

Cheers,
Eric


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com