shortcut some smart acceses for clipped smart.

SVN revision: 53132
This commit is contained in:
Carsten Haitzler 2010-10-07 03:54:51 +00:00
parent 5c43c88f74
commit 00a661beae
3 changed files with 14 additions and 12 deletions

View File

@ -362,6 +362,14 @@ evas_object_smart_members_get_direct(const Evas_Object *obj)
return o->contained;
}
void
_evas_object_smart_members_all_del(Evas_Object *obj)
{
Evas_Object_Smart *o = (Evas_Object_Smart *)(obj->object_data);
while (o->contained)
evas_object_del((Evas_Object *)(o->contained));
}
/**
* Instantiates a new smart object described by @p s.
*

View File

@ -20,14 +20,14 @@
EAPI void
evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
{
Eina_List *lst, *itr;
const Eina_Inlist *lst;
Evas_Object *child;
if ((dx == 0) && (dy == 0))
return;
lst = evas_object_smart_members_get(obj);
EINA_LIST_FOREACH(lst, itr, child)
lst = evas_object_smart_members_get_direct(obj);
EINA_INLIST_FOREACH(lst, child)
{
Evas_Coord orig_x, orig_y;
@ -39,8 +39,6 @@ evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_C
orig_y = child->cur.geometry.y;
evas_object_move(child, orig_x + dx, orig_y + dy);
}
eina_list_free(lst);
}
/**
@ -89,9 +87,6 @@ evas_object_smart_clipped_smart_add(Evas_Object *obj)
static void
evas_object_smart_clipped_smart_del(Evas_Object *obj)
{
Eina_List *lst, *itr;
Evas_Object *data;
CSO_DATA_GET_OR_RETURN(obj, cso);
if (cso->clipper)
@ -101,10 +96,7 @@ evas_object_smart_clipped_smart_del(Evas_Object *obj)
evas_object_del(clipper);
}
lst = evas_object_smart_members_get(obj);
EINA_LIST_FOREACH(lst, itr, data)
evas_object_del(data);
eina_list_free(lst);
_evas_object_smart_members_all_del(obj);
free(cso);
evas_object_smart_data_set(obj, NULL);

View File

@ -739,6 +739,7 @@ void evas_object_smart_member_lower(Evas_Object *member);
void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
void _evas_object_smart_members_all_del(Evas_Object *obj);
void evas_call_smarts_calculate(Evas *e);
void *evas_mem_calloc(int size);
void _evas_post_event_callback_call(Evas *e);
@ -820,6 +821,7 @@ void evas_render_object_recalc(Evas_Object *obj);
Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
#define EVAS_API_OVERRIDE(func, api, prefix) \
(api)->func = prefix##func