forked from enlightenment/efl
parent
3222e8202e
commit
a7282b534b
|
@ -27,6 +27,7 @@ extern "C" {
|
|||
int edje_object_thaw (Evas_Object *o);
|
||||
void edje_object_color_class_set (Evas_Object *o, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
||||
void edje_object_text_class_set (Evas_Object *o, const char *text_class, const char *font, double size);
|
||||
void edje_object_size_min_get (Evas_Object *o, double *minw, double *minh);
|
||||
int edje_object_part_exists (Evas_Object *o, const char *part);
|
||||
void edje_object_part_geometry_get (Evas_Object *o, const char *part, double *x, double *y, double *w, double *h);
|
||||
void edje_object_part_text_set (Evas_Object *o, const char *part, const char *text);
|
||||
|
@ -34,7 +35,7 @@ extern "C" {
|
|||
void edje_object_part_swallow (Evas_Object *o, const char *part, Evas_Object *o_swallow);
|
||||
void edje_object_part_unswallow (Evas_Object *o, Evas_Object *o_swallow);
|
||||
Evas_Object *edje_object_part_swallow_get (Evas_Object *o, const char *part);
|
||||
void edje_object_size_min_get (Evas_Object *o, double *minw, double *minh);
|
||||
const char *edje_object_part_state_get (Evas_Object *o, const char *part, double *val_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -508,6 +508,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
else
|
||||
chosen_desc = ep->param2.description;
|
||||
|
||||
ep->chosen_description = chosen_desc;
|
||||
if (ep->param1.description)
|
||||
_edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc, ep->param1.rel1_to, ep->param1.rel2_to, ep->param1.confine_to, &p1);
|
||||
if (ep->param2.description)
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
* drag needs to have signals with relative pos as arg.
|
||||
* drag vals should be 0.0 -> 1.0 if drag is confined. "rest" pos = 0.0.
|
||||
* query dragable for its relative pos value
|
||||
*
|
||||
* need to be able to query "state" of an edje part
|
||||
* need to be able to set callback on part state change
|
||||
* dragable needs to be able to affext rel/abs values of other parts
|
||||
*
|
||||
* swallowed objects need to be able to advertise min/max size
|
||||
*
|
||||
|
@ -379,6 +377,7 @@ struct _Edje_Real_Part
|
|||
} cache;
|
||||
} text;
|
||||
double description_pos;
|
||||
Edje_Part_Description *chosen_description;
|
||||
struct {
|
||||
Edje_Part_Description *description;
|
||||
Edje_Real_Part *rel1_to;
|
||||
|
|
|
@ -360,6 +360,44 @@ edje_object_size_min_get(Evas_Object *obj, double *minw, double *minh)
|
|||
ed->calc_only = 0;
|
||||
}
|
||||
|
||||
const char *
|
||||
edje_object_part_state_get(Evas_Object *obj, const char *part, double *val_ret)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part))
|
||||
{
|
||||
if (val_ret) *val_ret = 0;
|
||||
return "";
|
||||
}
|
||||
rp = _edje_real_part_get(ed, (char *)part);
|
||||
if (!rp)
|
||||
{
|
||||
if (val_ret) *val_ret = 0;
|
||||
return "";
|
||||
}
|
||||
if (!rp->chosen_description)
|
||||
{
|
||||
if (val_ret) *val_ret = rp->chosen_description->state.value;
|
||||
if (rp->chosen_description->state.name)
|
||||
return rp->chosen_description->state.name;
|
||||
return "default";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rp->param1.description)
|
||||
{
|
||||
if (val_ret) *val_ret = rp->param1.description->state.value;
|
||||
if (rp->param1.description->state.name)
|
||||
return rp->param1.description->state.name;
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
if (val_ret) *val_ret = 0;
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue