diff options
author | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2010-06-15 00:59:57 -0700 |
commit | eed0eb6a476d54ce19aeff137984aa981d9e3976 (patch) | |
tree | 807891636efd2f87dcbd261e971216269973ae07 /iup/srclua5/il_tree_aux.c | |
parent | ccc8261e4d48de89da4ddfe7b55e378ae0cd6f47 (diff) |
Upgrading to iup 3.1
Diffstat (limited to 'iup/srclua5/il_tree_aux.c')
-rwxr-xr-x | iup/srclua5/il_tree_aux.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/iup/srclua5/il_tree_aux.c b/iup/srclua5/il_tree_aux.c index 99e721b..6ebaa09 100755 --- a/iup/srclua5/il_tree_aux.c +++ b/iup/srclua5/il_tree_aux.c @@ -151,12 +151,26 @@ static int tree_multiselection_cb(Ihandle *ih, int* ids, int p1) return iuplua_call(L, 2); } -static int tree_noderemoved_cb(Ihandle *ih, int id, void* p1) +static int tree_multiunselection_cb(Ihandle *ih, int* ids, int p1) +{ + int i; + lua_State *L = iuplua_call_start(ih, "multiunselection_cb"); + lua_newtable(L); + for (i = 0; i < p1; i++) + { + lua_pushnumber(L,i+1); + lua_pushnumber(L,ids[i]); + lua_settable(L,-3); + } + lua_pushnumber(L, p1); + return iuplua_call(L, 2); +} + +static int tree_noderemoved_cb(Ihandle *ih, void* p1) { lua_State *L = iuplua_call_start(ih, "noderemoved_cb"); - lua_pushnumber(L, id); tree_push_userid(L, p1); - return iuplua_call(L, 2); + return iuplua_call(L, 1); } void iuplua_treefuncs_open (lua_State *L) @@ -164,6 +178,7 @@ void iuplua_treefuncs_open (lua_State *L) iuplua_dostring(L, "IUPTREEREFTABLE={}", ""); iuplua_register_cb(L, "MULTISELECTION_CB", (lua_CFunction)tree_multiselection_cb, NULL); + iuplua_register_cb(L, "MULTIUNSELECTION_CB", (lua_CFunction)tree_multiunselection_cb, NULL); iuplua_register_cb(L, "NODEREMOVED_CB", (lua_CFunction)tree_noderemoved_cb, NULL); /* In Lua 5: |