* Add evas_object_smart_parent_get() to get the smart parent of an Evas_Object

* Add evas_object_smart_members_get() to get a list of the member objects of a smart object


SVN revision: 24374
This commit is contained in:
moom 2006-08-03 02:14:53 +00:00 committed by moom
parent 255a87c0e8
commit ac0055db7e
2 changed files with 40 additions and 0 deletions

View File

@ -660,6 +660,8 @@ tile_mode);
EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s);
EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj);
EAPI void evas_object_smart_member_del (Evas_Object *obj);
EAPI Evas_Object *evas_object_smart_parent_get (Evas_Object *obj);
EAPI Evas_List *evas_object_smart_members_get (Evas_Object *obj);
EAPI Evas_Smart *evas_object_smart_smart_get (Evas_Object *obj);
EAPI void *evas_object_smart_data_get (Evas_Object *obj);
EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data);

View File

@ -183,6 +183,44 @@ evas_object_smart_member_del(Evas_Object *obj)
evas_object_change(obj);
}
/**
* Gets the smart parent of an Evas_Object
* @param obj the Evas_Object you want to get the parent
* @return Returns the smart parent of @a obj, or NULL if @a obj is not a smart member of another Evas_Object
*/
EAPI Evas_Object *
evas_object_smart_parent_get(Evas_Object *obj)
{
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
return obj->smart.parent;
}
/**
* Gets the list of the member objects of an Evas_Object
* @param obj the Evas_Object you want to get the list of member objects
* @return Returns the list of the member objects of @a obj.
* The returned list should be freed with evas_list_free() when you no longer need it
*/
EAPI Evas_List *
evas_object_smart_members_get(Evas_Object *obj)
{
Evas_List *members;
Evas_Object_List *member;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
members = NULL;
for (member = obj->smart.contained; member; member = member->next)
members = evas_list_append(members, member);
return members;
}
/**
* To be documented.
*