Edje part geometry querying added.

Only does something if part geom has been calculated.

Maybe this should return an int as to whether or not its actually giving the geometry values?


SVN revision: 7099
This commit is contained in:
rephorm 2003-06-26 21:14:48 +00:00 committed by rephorm
parent 9ab9ba283d
commit c22eea281c
2 changed files with 25 additions and 0 deletions

View File

@ -19,6 +19,8 @@ extern "C" {
void edje_signal_callback_add(Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
void *edje_signal_callback_del(Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
void edje_signal_emit(Evas_Object *o, const char *emission, const char *source);
void edje_part_geometry_get(Evas_Object *o, char *part, int *x, int *y, int *w, int *h);
#ifdef __cplusplus
}

View File

@ -36,3 +36,26 @@ _edje_thaw(Edje *ed)
_edje_recalc(ed);
return ed->freeze;
}
void
edje_part_geometry_get(Evas_Object *o, char *part, int *x, int *y, int *w, int *h )
{
Evas_List *l;
Edje *ed;
ed = _edje_fetch(o);
for (l = ed->parts; l; l = l->next)
{
Edje_Real_Part *rp;
rp = l->data;
if (!strcmp(rp->part->name, part) && rp->calculated)
{
if (x) *x = rp->x;
if (y) *y = rp->y;
if (w) *w = rp->w;
if (h) *h = rp->h;
}
}
}