From: raster Date: Tue, 13 Jul 2010 06:47:18 +0000 (+0000) Subject: fill in moar. X-Git-Tag: 2.0_alpha~163^2~460 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f19e4d3a928fa0e4393777589c850a832300109;p=framework%2Fuifw%2Fedje.git fill in moar. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@50213 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_lua2.c b/src/lib/edje_lua2.c index dbb0171..1407347 100644 --- a/src/lib/edje_lua2.c +++ b/src/lib/edje_lua2.c @@ -116,8 +116,6 @@ static int _elua_above(lua_State *L); static int _elua_below(lua_State *L); static int _elua_top(lua_State *L); static int _elua_bottom(lua_State *L); -static int _elua_aboveget(lua_State *L); -static int _elua_belowget(lua_State *L); static int _elua_color(lua_State *L); static int _elua_clip(lua_State *L); static int _elua_unclip(lua_State *L); @@ -168,17 +166,16 @@ static const struct luaL_reg _elua_edje_api [] = {"visible", _elua_visible}, // get object visibility {"move", _elua_move}, // move, return current position {"resize", _elua_resize}, // resize, return current size - {"posget", _elua_pos}, // move, return current position - {"sizeget", _elua_size}, // resize, return current size + {"pos", _elua_pos}, // move, return current position + {"size", _elua_size}, // resize, return current size {"geom", _elua_geom}, // move and resize and return current geometry - {"raise", _elua_raise}, // raise - {"lower", _elua_lower}, // lower - {"above", _elua_above}, // stack above - {"below", _elua_below}, // stack below - {"topget", _elua_top}, // get top - {"bottomget", _elua_bottom}, // get bottom - {"aboveget", _elua_aboveget}, // get object above - {"belowget", _elua_belowget}, // get object below + + {"raise", _elua_raise}, // raise to top + {"lower", _elua_lower}, // lower to bottom + {"above", _elua_above}, // get object above or stack obj above given obj + {"below", _elua_below}, // get object below or stack obj below given obj + {"top", _elua_top}, // get top + {"bottom", _elua_bottom}, // get bottom {"color", _elua_color}, // set color, return color {"clip", _elua_clip}, // set clip obj, return clip object {"unclip", _elua_unclip}, // clear clip obj @@ -1418,19 +1415,38 @@ _elua_geom(lua_State *L) static int _elua_raise(lua_State *L) { + Edje_Lua_Obj *obj = (Edje_Lua_Obj *)lua_touserdata(L, 1); + Edje_Lua_Evas_Object *elo = (Edje_Lua_Evas_Object *)obj; + if (!obj) return 0; + if (!obj->is_evas_obj) return 0; + evas_object_raise(elo->evas_obj); return 0; } static int _elua_lower(lua_State *L) { + Edje_Lua_Obj *obj = (Edje_Lua_Obj *)lua_touserdata(L, 1); + Edje_Lua_Evas_Object *elo = (Edje_Lua_Evas_Object *)obj; + if (!obj) return 0; + if (!obj->is_evas_obj) return 0; + evas_object_lower(elo->evas_obj); return 0; } static int _elua_above(lua_State *L) { - return 0; + Edje_Lua_Obj *obj = (Edje_Lua_Obj *)lua_touserdata(L, 1); + Edje_Lua_Evas_Object *elo = (Edje_Lua_Evas_Object *)obj; + Edje_Lua_Evas_Object *elo2; + Evas_Object *o; + if (!obj) return 0; + if (!obj->is_evas_obj) return 0; + if (!(o = evas_object_above_get(elo->evas_obj))) return 0; + if (!(elo2 = evas_object_data_get(o, "elo"))) return 0; + lua_pushlightuserdata(L, elo2); + return 1; } static int @@ -1452,18 +1468,6 @@ _elua_bottom(lua_State *L) } static int -_elua_aboveget(lua_State *L) -{ - return 0; -} - -static int -_elua_belowget(lua_State *L) -{ - return 0; -} - -static int _elua_color(lua_State *L) { Edje_Lua_Obj *obj = (Edje_Lua_Obj *)lua_touserdata(L, 1);