static void iuplua_openlibs(lua_State *L) { lua_pushliteral(L, LUA_COPYRIGHT); lua_setglobal(L, "_COPYRIGHT"); /* set global _COPYRIGHT */ /* iuplua initialization */ iuplua_open(L); #ifdef USE_STATIC /* disable require */ iuplua_dostring(L, "function require() end ", "static_require"); #ifdef IUPLUA_IMGLIB luaopen_iupluaimglib(L); #endif #ifdef IUPLUA_TUIO iuptuiolua_open(L); #endif #ifdef IUPLUA_WEB iupweblua_open(L); #endif #ifdef IUPLUA_SCINTILLA iup_scintillalua_open(L); #endif /* luaopen_lfs(L); */ #ifndef IUPLUA_NO_GL iupgllua_open(L); iupglcontrolslua_open(L); #ifdef USE_LUAGL luaopen_luagl(L); #endif #endif #ifndef IUPLUA_NO_CD iupcontrolslua_open(L); iupmatrixexlua_open(L); iup_plotlua_open(L); cdlua_open(L); cdluaiup_open(L); cdInitContextPlus(); #endif #ifndef IUPLUA_NO_IM iupimlua_open(L); imlua_open(L); imlua_open_process(L); #endif #ifndef IUPLUA_NO_IM #ifndef IUPLUA_NO_CD cdluaim_open(L); #endif #endif #endif }
void iuplua_treefuncs_open (lua_State *L) { iuplua_dostring(L, "IUPTREEREFTABLE={}", ""); iuplua_register_cb(L, "MULTISELECTION_CB", (lua_CFunction)tree_multiselection_cb, NULL); /* In Lua 5: TreeSetTableId = TreeSetUserId TreeGetTable = TreeGetUserId TreeGetTableId = TreeGetId */ /* Userdata <-> id */ iuplua_register(L, TreeGetId, "TreeGetId"); iuplua_register(L, TreeGetUserId, "TreeGetUserId"); iuplua_register(L, TreeSetUserId, "TreeSetUserId"); /* Table <-> id */ iuplua_register(L, TreeGetId, "TreeGetTableId"); iuplua_register(L, TreeGetUserId, "TreeGetTable"); iuplua_register(L, TreeSetUserId, "TreeSetTableId"); }