lua-users home
lua-l archive

Re: Stoppers for IUP..? (Re: GTK Binding)

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


Mark Stroetzel Glasberg wrote:
guiinit = loadlib("./guilib.a", "init")
guiinit()
Looks simple enough. Shouldn't be hard to do that with LoadLibrary.
You need to call IupOpen() and iuplua_open(lua_State*).
The problem is when to start running the GUI event loop, especially if you want to keep your original console interactive...
Quoting the Lua FLTK manual:
Most actions in FLTK happen inside the application's event loop. In particular, widgets are actually redrawn before checking for events; also, windows will not appear. Lua FLTK provides an implicit call to the standard FLTK event loop, Fl:run() after reading all script files specified on the command line. Fl:run() will return when there are no windows shown on the display. This behavior is inconvenient when not specifying any scripts on the command line---the interpreter would immediately exit since there are initially no windows shown. In this special case you must call Fl:run() yourself after you have a window up. Specifying -i on the command line allows you to continue to type Lua statements interactively even after Fl:run() begins. This feature appears to be broken on Win32 (surprise) and may have to be replaced with a shell window written in Lua FLTK.

AltStyle によって変換されたページ (->オリジナル) /