blob: c349adbefe8f91ce76ae873914a8752af56995d7 (
plain) (
tree)
|
|
/* Legacy API implementations based on internal EO calls */
#include "edje_private.h"
EAPI Eina_Bool
edje_object_part_geometry_get(const Edje_Object *obj, const char *part, int *x, int *y, int *w, int *h)
{
Edje_Real_Part *rp;
Edje *ed;
// Similar to geometry_get(efl_part(obj, part), x, y, w, h) but the bool
// return value matters here.
ed = _edje_fetch(obj);
if ((!ed) || (!part))
{
if (x) *x = 0;
if (y) *y = 0;
if (w) *w = 0;
if (h) *h = 0;
return EINA_FALSE;
}
/* Need to recalc before providing the object. */
_edje_recalc_do(ed);
rp = _edje_real_part_recursive_get(&ed, part);
if (!rp)
{
if (x) *x = 0;
if (y) *y = 0;
if (w) *w = 0;
if (h) *h = 0;
return EINA_FALSE;
}
if (x) *x = rp->x;
if (y) *y = rp->y;
if (w) *w = rp->w;
if (h) *h = rp->h;
return EINA_TRUE;
}
EAPI const char *
edje_object_part_state_get(const Edje_Object *obj, const char * part, double *val_ret)
{
const char *str = "";
efl_canvas_layout_internal_state_get(efl_part(obj, part), &str, val_ret);
return str;
}
|