* Add edje_object_part_object_get() to get the 'Evas_Object *'

corresponding to a given part.


SVN revision: 24912
This commit is contained in:
moom 2006-08-19 18:22:01 +00:00 committed by moom
parent f631394f18
commit 5014c11f2e
2 changed files with 26 additions and 0 deletions

View File

@ -218,6 +218,7 @@ extern "C" {
EAPI void edje_object_calc_force (Evas_Object *obj);
EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
EAPI int edje_object_part_exists (Evas_Object *obj, const char *part);
EAPI Evas_Object *edje_object_part_object_get (Evas_Object *obj, const char *part);
EAPI void edje_object_part_geometry_get (Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
EAPI void edje_object_text_change_cb_set (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, const char *part), void *data);
EAPI void edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text);

View File

@ -573,6 +573,31 @@ edje_object_part_exists(Evas_Object *obj, const char *part)
return 1;
}
/**
* Gets the Evas_Object corresponding to a given part.
* You should never modify the state of the returned object
* (with evas_object_move() or evas_object_hide() for example),
* but you can safely query infos about its current state
* (with evas_object_visible_get() or evas_object_color_get() for example)
*
* @param obj A valid Evas_Object handle
* @param part The Edje part
* @return Returns the Evas_Object corresponding to the given part,
* or NULL on failure (if the part doesn't exist)
**/
EAPI Evas_Object *
edje_object_part_object_get(Evas_Object *obj, const char *part)
{
Edje *ed;
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
rp = _edje_real_part_get(ed, (char *)part);
if (!rp) return NULL;
return rp->object;
}
/** Get Edje part geometry
* @param obj A valid Evas_Object handle
* @param part The Edje part