forked from enlightenment/efl
edje can now swallow other evas objects... including... other EDJES! :)
SVN revision: 7166
This commit is contained in:
parent
a23287c9fe
commit
395743c598
|
@ -130,6 +130,7 @@ collections {
|
|||
parts {
|
||||
part {
|
||||
name, "background";
|
||||
color_class, "bg";
|
||||
mouse_events, 0;
|
||||
description {
|
||||
state, "default" 0.0;
|
||||
|
@ -168,30 +169,33 @@ collections {
|
|||
color3, 0 0 0 32;
|
||||
text {
|
||||
text, "This is a longer test string";
|
||||
font, "Vera-Bold";
|
||||
size, 8;
|
||||
font, "Vera";
|
||||
size, 6;
|
||||
fit, 0 0;
|
||||
// min, 1 1;
|
||||
align, 0.0 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* test swallowing */
|
||||
/*
|
||||
part {
|
||||
name, "clip";
|
||||
name, "swallow";
|
||||
mouse_events, 0;
|
||||
type, RECT;
|
||||
description {
|
||||
state, "default" 0.0;
|
||||
rel1 {
|
||||
relative, 0.5 0.5;
|
||||
offset, -20 -20;
|
||||
relative, 0.0 1.0;
|
||||
offset, 0 0;
|
||||
to, "logo";
|
||||
}
|
||||
rel2 {
|
||||
relative, 0.5 0.5;
|
||||
offset, 19 19;
|
||||
relative, 1.0 1.0;
|
||||
offset, -1 99;
|
||||
to, "logo";
|
||||
}
|
||||
color, 100 200 255 128;
|
||||
color, 0 0 0 100;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -147,10 +147,40 @@ bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Demo_Edje *de;
|
||||
|
||||
de = l->data;
|
||||
if (!strcmp(ev->keyname, "p")) edje_object_play_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "o")) edje_object_play_set(de->edje, 0);
|
||||
else if (!strcmp(ev->keyname, "a")) edje_object_animation_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "s")) edje_object_animation_set(de->edje, 0);
|
||||
if (!strcmp(ev->keyname, "p"))
|
||||
edje_object_play_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "o"))
|
||||
edje_object_play_set(de->edje, 0);
|
||||
else if (!strcmp(ev->keyname, "a"))
|
||||
edje_object_animation_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "s"))
|
||||
edje_object_animation_set(de->edje, 0);
|
||||
else if (!strcmp(ev->keyname, "t"))
|
||||
edje_object_part_text_set(de->edje, "text", "String 1");
|
||||
else if (!strcmp(ev->keyname, "y"))
|
||||
edje_object_part_text_set(de->edje, "text", "Buttox");
|
||||
else if (!strcmp(ev->keyname, "u"))
|
||||
edje_object_part_text_set(de->edje, "text", "You pressed \"U\". Nice one stenchie!");
|
||||
else if (!strcmp(ev->keyname, "q"))
|
||||
edje_object_color_class_set(de->edje, "bg",
|
||||
255, 255, 255, 255,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0);
|
||||
else if (!strcmp(ev->keyname, "w"))
|
||||
edje_object_color_class_set(de->edje, "bg",
|
||||
255, 200, 120, 255,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0);
|
||||
else if (!strcmp(ev->keyname, "e"))
|
||||
edje_object_color_class_set(de->edje, "bg",
|
||||
120, 200, 255, 200,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0);
|
||||
else if (!strcmp(ev->keyname, "r"))
|
||||
edje_object_color_class_set(de->edje, "bg",
|
||||
255, 200, 50, 100,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -430,6 +460,14 @@ test_setup(char *file, char *name)
|
|||
evas_object_resize(o, 200, 240);
|
||||
evas_object_show(o);
|
||||
de->edje = o;
|
||||
|
||||
/* test swallowing */
|
||||
/*
|
||||
o = edje_object_add(evas);
|
||||
edje_object_file_set(o, file, name);
|
||||
edje_object_part_swallow(de->edje, "swallow", o);
|
||||
evas_object_show(o);
|
||||
*/
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -21,15 +21,18 @@ extern "C" {
|
|||
int edje_object_play_get (Evas_Object *o);
|
||||
void edje_object_animation_set (Evas_Object *o, int on);
|
||||
int edje_object_animation_get (Evas_Object *o);
|
||||
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);
|
||||
const char *edje_object_part_text_get (Evas_Object *o, const char *part);
|
||||
int edje_object_freeze (Evas_Object *o);
|
||||
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);
|
||||
|
||||
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);
|
||||
const char *edje_object_part_text_get (Evas_Object *o, const char *part);
|
||||
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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -640,6 +640,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
if (p3.visible) evas_object_show(ep->object);
|
||||
else evas_object_hide(ep->object);
|
||||
}
|
||||
if (ep->swallowed_object)
|
||||
{
|
||||
evas_object_move(ep->swallowed_object, ed->x + p3.x, ed->y + p3.y);
|
||||
evas_object_resize(ep->swallowed_object, p3.w, p3.h);
|
||||
if (p3.visible) evas_object_show(ep->swallowed_object);
|
||||
else evas_object_hide(ep->swallowed_object);
|
||||
}
|
||||
|
||||
ep->x = p3.x;
|
||||
ep->y = p3.y;
|
||||
|
|
|
@ -227,6 +227,7 @@ _edje_file_del(Edje *ed)
|
|||
rp = ed->parts->data;
|
||||
_edje_text_part_on_del(ed, rp);
|
||||
evas_object_del(rp->object);
|
||||
if (rp->swallowed_object) evas_object_del(rp->swallowed_object);
|
||||
if (rp->text.text) free(rp->text.text);
|
||||
if (rp->text.font) free(rp->text.font);
|
||||
if (rp->text.cache.in_str) free(rp->text.cache.in_str);
|
||||
|
|
|
@ -35,7 +35,6 @@ void
|
|||
_edje_del(Edje *ed)
|
||||
{
|
||||
_edje_file_del(ed);
|
||||
_edje_clean_objects(ed);
|
||||
if (ed->path) free(ed->path);
|
||||
if (ed->part) free(ed->part);
|
||||
while (ed->callbacks)
|
||||
|
@ -70,28 +69,9 @@ _edje_del(Edje *ed)
|
|||
free(ed);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_clean_part_objects(Edje *ed)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
evas_object_del(rp->object);
|
||||
rp->object = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_edje_clean_objects(Edje *ed)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
ed->have_objects = 0;
|
||||
_edje_clean_part_objects(ed);
|
||||
evas_object_del(ed->clipper);
|
||||
ed->evas = NULL;
|
||||
ed->obj = NULL;
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
* real part size and "before min/max limit" sizes need to be stored per part
|
||||
* need to be able to calculate min & max size of a whole edje
|
||||
*
|
||||
* named parts need to be able to be "replaced" with new evas objects
|
||||
* part replacement with object callbacks should be possible
|
||||
* swallowed objects need to be able to adversize min/max size
|
||||
*
|
||||
* need to be able to list collections in an eet file
|
||||
*
|
||||
|
@ -349,6 +348,7 @@ struct _Edje_Real_Part
|
|||
} offset;
|
||||
Evas_Object *object;
|
||||
Evas_List *extra_objects;
|
||||
Evas_Object *swallowed_object;
|
||||
unsigned char calculated : 1;
|
||||
unsigned char still_in : 1;
|
||||
int clicked_button;
|
||||
|
@ -480,7 +480,6 @@ void _edje_collection_free(Edje_Part_Collection *ec);
|
|||
|
||||
Edje *_edje_add(Evas_Object *obj);
|
||||
void _edje_del(Edje *ed);
|
||||
void _edje_clean_part_objects(Edje *ed);
|
||||
void _edje_clean_objects(Edje *ed);
|
||||
void _edje_ref(Edje *ed);
|
||||
void _edje_unref(Edje *ed);
|
||||
|
@ -496,6 +495,7 @@ void _edje_text_part_on_add_clippers(Edje *ed, Edje_Real_Part *ep);
|
|||
void _edje_text_part_on_del(Edje *ed, Edje_Real_Part *ep);
|
||||
void _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *params, Edje_Part_Description *chosen_desc);
|
||||
|
||||
Edje_Real_Part *_edje_real_part_get(Edje *ed, char *part);
|
||||
Ejde_Color_Class *_edje_color_class_find(Edje *ed, char *color_class);
|
||||
Ejde_Text_Class *_edje_text_class_find(Edje *ed, char *text_class);
|
||||
Edje *_edje_fetch(Evas_Object *obj);
|
||||
|
|
|
@ -98,6 +98,8 @@ _edje_smart_layer_set(Evas_Object * obj, int layer)
|
|||
}
|
||||
}
|
||||
evas_object_layer_set(ep->object, ed->layer);
|
||||
if (ep->swallowed_object)
|
||||
evas_object_layer_set(ep->swallowed_object, ed->layer);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "layer,set,%i", layer);
|
||||
_edje_emit(ed, buf, "");
|
||||
|
@ -129,6 +131,8 @@ _edje_smart_raise(Evas_Object * obj)
|
|||
}
|
||||
}
|
||||
evas_object_raise(ep->object);
|
||||
if (ep->swallowed_object)
|
||||
evas_object_raise(ep->swallowed_object);
|
||||
}
|
||||
_edje_emit(ed, "raise", "");
|
||||
}
|
||||
|
@ -146,6 +150,8 @@ _edje_smart_lower(Evas_Object * obj)
|
|||
Edje_Real_Part *ep;
|
||||
|
||||
ep = l->data;
|
||||
if (ep->swallowed_object)
|
||||
evas_object_lower(ep->swallowed_object);
|
||||
evas_object_lower(ep->object);
|
||||
if (ep->extra_objects)
|
||||
{
|
||||
|
@ -176,6 +182,8 @@ _edje_smart_stack_above(Evas_Object * obj, Evas_Object * above)
|
|||
Edje_Real_Part *ep;
|
||||
|
||||
ep = l->data;
|
||||
if (ep->swallowed_object)
|
||||
evas_object_stack_above(ep->swallowed_object, above);
|
||||
evas_object_stack_above(ep->object, above);
|
||||
if (ep->extra_objects)
|
||||
{
|
||||
|
@ -219,6 +227,8 @@ _edje_smart_stack_below(Evas_Object * obj, Evas_Object * below)
|
|||
}
|
||||
}
|
||||
evas_object_stack_below(ep->object, below);
|
||||
if (ep->swallowed_object)
|
||||
evas_object_stack_below(ep->swallowed_object, below);
|
||||
}
|
||||
_edje_emit(ed, "stack_below", "");
|
||||
}
|
||||
|
@ -245,6 +255,11 @@ _edje_smart_move(Evas_Object * obj, double x, double y)
|
|||
ep = l->data;
|
||||
evas_object_geometry_get(ep->object, &ox, &oy, NULL, NULL);
|
||||
evas_object_move(ep->object, ed->x + ep->x + ep->offset.x, ed->y + ep->y +ep->offset.y);
|
||||
if (ep->swallowed_object)
|
||||
{
|
||||
evas_object_geometry_get(ep->swallowed_object, &ox, &oy, NULL, NULL);
|
||||
evas_object_move(ep->swallowed_object, ed->x + ep->x + ep->offset.x, ed->y + ep->y +ep->offset.y);
|
||||
}
|
||||
if (ep->extra_objects)
|
||||
{
|
||||
Evas_List *el;
|
||||
|
@ -267,15 +282,12 @@ static void
|
|||
_edje_smart_resize(Evas_Object * obj, double w, double h)
|
||||
{
|
||||
Edje *ed;
|
||||
int nw, nh;
|
||||
|
||||
ed = evas_object_smart_data_get(obj);
|
||||
if (!ed) return;
|
||||
nw = ed->w;
|
||||
nh = ed->h;
|
||||
if ((w == ed->w) && (h == ed->h)) return;
|
||||
ed->w = w;
|
||||
ed->h = h;
|
||||
if ((nw == ed->w) && (nh == ed->h)) return;
|
||||
evas_object_resize(ed->clipper, ed->w, ed->h);
|
||||
ed->dirty = 1;
|
||||
_edje_recalc(ed);
|
||||
|
@ -289,6 +301,7 @@ _edje_smart_show(Evas_Object * obj)
|
|||
|
||||
ed = evas_object_smart_data_get(obj);
|
||||
if (!ed) return;
|
||||
if (evas_object_visible_get(obj)) return;
|
||||
if ((ed->collection) && (ed->parts))
|
||||
evas_object_show(ed->clipper);
|
||||
_edje_emit(ed, "show", "");
|
||||
|
@ -301,6 +314,7 @@ _edje_smart_hide(Evas_Object * obj)
|
|||
|
||||
ed = evas_object_smart_data_get(obj);
|
||||
if (!ed) return;
|
||||
if (!evas_object_visible_get(obj)) return;
|
||||
evas_object_hide(ed->clipper);
|
||||
_edje_emit(ed, "hide", "");
|
||||
}
|
||||
|
|
|
@ -1,115 +1,6 @@
|
|||
#include "Edje.h"
|
||||
#include "edje_private.h"
|
||||
|
||||
int
|
||||
edje_object_part_exists(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
if (!strcmp(rp->part->name, part)) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_part_geometry_get(Evas_Object *obj, const char *part, double *x, double *y, double *w, double *h )
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part))
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
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;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
if (!strcmp(rp->part->name, part))
|
||||
{
|
||||
if (rp->part->type == EDJE_PART_TYPE_TEXT)
|
||||
{
|
||||
if ((!rp->text.text) && (!text))
|
||||
return;
|
||||
if ((rp->text.text) && (text) &&
|
||||
(!strcmp(rp->text.text, text)))
|
||||
return;
|
||||
if (rp->text.text) free(rp->text.text);
|
||||
rp->text.text = strdup(text);
|
||||
ed->dirty = 1;
|
||||
_edje_recalc(ed);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
edje_object_part_text_get(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return NULL;
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
if (!strcmp(rp->part->name, part))
|
||||
{
|
||||
if (rp->part->type == EDJE_PART_TYPE_TEXT)
|
||||
return evas_object_text_text_get(rp->object);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
edje_object_freeze(Evas_Object *obj)
|
||||
{
|
||||
|
@ -246,6 +137,168 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
|||
_edje_recalc(ed);
|
||||
}
|
||||
|
||||
int
|
||||
edje_object_part_exists(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_part_geometry_get(Evas_Object *obj, const char *part, double *x, double *y, double *w, double *h )
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part))
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
rp = _edje_real_part_get(ed, (char *)part);
|
||||
if (!rp)
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
if (x) *x = rp->x;
|
||||
if (y) *y = rp->y;
|
||||
if (w) *w = rp->w;
|
||||
if (h) *h = rp->h;
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->part->type != EDJE_PART_TYPE_TEXT) return;
|
||||
if ((!rp->text.text) && (!text))
|
||||
return;
|
||||
if ((rp->text.text) && (text) &&
|
||||
(!strcmp(rp->text.text, text)))
|
||||
return;
|
||||
if (rp->text.text) free(rp->text.text);
|
||||
rp->text.text = strdup(text);
|
||||
ed->dirty = 1;
|
||||
_edje_recalc(ed);
|
||||
}
|
||||
|
||||
const char *
|
||||
edje_object_part_text_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;
|
||||
if (rp->part->type == EDJE_PART_TYPE_TEXT)
|
||||
return evas_object_text_text_get(rp->object);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_swallow)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->swallowed_object)
|
||||
{
|
||||
evas_object_clip_unset(rp->swallowed_object);
|
||||
rp->swallowed_object = NULL;
|
||||
}
|
||||
if (!obj_swallow) return;
|
||||
rp->swallowed_object = obj_swallow;
|
||||
evas_object_clip_set(rp->swallowed_object, ed->clipper);
|
||||
evas_object_stack_above(rp->swallowed_object, rp->object);
|
||||
ed->dirty = 1;
|
||||
_edje_recalc(ed);
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!obj_swallow)) return;
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
if (rp->swallowed_object == obj_swallow)
|
||||
{
|
||||
evas_object_clip_unset(rp->swallowed_object);
|
||||
rp->swallowed_object = NULL;
|
||||
ed->dirty = 1;
|
||||
_edje_recalc(ed);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object *
|
||||
edje_object_part_swallow_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->swallowed_object;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Edje_Real_Part *
|
||||
_edje_real_part_get(Edje *ed, char *part)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
if (!strcmp(rp->part->name, part)) return rp;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Ejde_Color_Class *
|
||||
_edje_color_class_find(Edje *ed, char *color_class)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue