Actually return the map source.

SVN revision: 65070
This commit is contained in:
David Walter Seikel 2011-11-11 16:34:14 +00:00
parent 6838b5ac07
commit 6d9f0ed3dc
2 changed files with 7 additions and 4 deletions

View File

@ -142,7 +142,7 @@ collections {
D.text:show();
--// Fun with maps!
D.map = edje.map(4);
D.map = edje.map(4); --// 4 is the only supported map size at the moment.
--// These all do the same thing.
--// Note, lua likes to start at 1, C (and thus evas) at 0. I choose to agree with C.
D.map:coord(0, 50, 50, 0);
@ -202,7 +202,7 @@ collections {
print("lua::map enabled");
end
--// D.rect2:map_source(D.rect); --// Don't think this is actually implemented in evas.
D.rect2:map_source(D.rect); --// Don't think this is actually implemented in evas.
--// D.map:dup();
--// D.map:size(); --// perhaps overide the # operator? For now it's only gonna return 4 anyway.

View File

@ -2184,6 +2184,8 @@ _elua_obj_map_source(lua_State *L)
{
Edje_Lua_Obj *obj = (Edje_Lua_Obj *)lua_touserdata(L, 1);
Edje_Lua_Evas_Object *elo = (Edje_Lua_Evas_Object *)obj;
Evas_Object *o;
Edje_Lua_Evas_Object *elo2;
int n;
if (!obj) return 0;
@ -2201,8 +2203,9 @@ _elua_obj_map_source(lua_State *L)
evas_object_map_source_set(elo->evas_obj, source->evas_obj);
}
// FIXME: return this evas object.
// evas_object_map_source_get(elo->evas_obj);
if (!(o = evas_object_map_source_get(elo->evas_obj))) return 0;
if (!(elo2 = evas_object_data_get(o, ELO))) return 0;
_elua_ref_get(L, elo2);
return 1;
}