summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-04-07 02:18:48 +0900
committerCedric Bail <cedric.bail@free.fr>2013-04-07 02:18:48 +0900
commita645c8153f82c593920190416b8115b546b3668f (patch)
treec4afccc28fddcc945f8575c84e39837272b37053
parent1231faf8d9af21f3bdb2b40a9fdc963b227b6153 (diff)
downloadefl-a645c8153f82c593920190416b8115b546b3668f.tar.gz
edje: one less pointer per Edje_Real_Part.
-rw-r--r--src/lib/edje/edje_calc.c40
-rw-r--r--src/lib/edje/edje_edit.c17
-rw-r--r--src/lib/edje/edje_entry.c465
-rw-r--r--src/lib/edje/edje_load.c29
-rw-r--r--src/lib/edje/edje_private.h51
-rw-r--r--src/lib/edje/edje_program.c71
-rw-r--r--src/lib/edje/edje_smart.c2
-rw-r--r--src/lib/edje/edje_util.c353
8 files changed, 505 insertions, 523 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 5f95c17d6c..b19bfb3db7 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1932,6 +1932,7 @@ _edje_part_recalc_single_fill(Edje_Real_Part *ep,
static void
_edje_part_recalc_single_min_max(FLOAT_T sc,
+ Edje *edje,
Edje_Real_Part *ep,
Edje_Part_Description_Common *desc,
int *minw, int *minh,
@@ -1946,7 +1947,7 @@ _edje_part_recalc_single_min_max(FLOAT_T sc,
*minw = ep->typedata.swallow->swallow_params.min.w;
}
- if (ep->edje->calc_only)
+ if (edje->calc_only)
{
if (desc->minmul.have)
{
@@ -1995,7 +1996,7 @@ _edje_part_recalc_single_min_max(FLOAT_T sc,
if (*maxw < 1) *maxw = 1;
}
}
- if ((ep->edje->calc_only) && (desc->minmul.have) &&
+ if ((edje->calc_only) && (desc->minmul.have) &&
(desc->minmul.w != FROM_INT(1))) *maxw = *minw;
if (*maxw >= 0)
{
@@ -2011,7 +2012,7 @@ _edje_part_recalc_single_min_max(FLOAT_T sc,
*minh = ep->typedata.swallow->swallow_params.min.h;
}
- if (ep->edje->calc_only)
+ if (edje->calc_only)
{
if (desc->minmul.have)
{
@@ -2060,7 +2061,7 @@ _edje_part_recalc_single_min_max(FLOAT_T sc,
if (*maxh < 1) *maxh = 1;
}
}
- if ((ep->edje->calc_only) && (desc->minmul.have) &&
+ if ((edje->calc_only) && (desc->minmul.have) &&
(desc->minmul.h != FROM_INT(1))) *maxh = *minh;
if (*maxh >= 0)
{
@@ -2196,7 +2197,7 @@ _edje_part_recalc_single(Edje *ed,
sc = ed->scale;
if (sc == ZERO) sc = _edje_scale;
- _edje_part_recalc_single_min_max(sc, ep, desc, &minw, &minh, &maxw, &maxh);
+ _edje_part_recalc_single_min_max(sc, ed, ep, desc, &minw, &minh, &maxw, &maxh);
/* relative coords of top left & bottom right */
_edje_part_recalc_single_rel(ed, ep, desc, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params);
@@ -2572,7 +2573,8 @@ _edje_physics_world_geometry_check(EPhysics_World *world)
}
static void
-_edje_physics_body_props_update(Edje_Real_Part *ep, Edje_Calc_Params *pf, Eina_Bool pos_update)
+_edje_physics_body_props_update(Edje *edje, Edje_Real_Part *ep, Edje_Calc_Params *pf,
+ Eina_Bool pos_update)
{
ephysics_body_linear_movement_enable_set(ep->body,
pf->physics->mov_freedom.lin.x,
@@ -2590,8 +2592,10 @@ _edje_physics_body_props_update(Edje_Real_Part *ep, Edje_Calc_Params *pf, Eina_B
if (pos_update)
{
- ephysics_body_move(ep->body, ep->edje->x + pf->x,
- ep->edje->y + pf->y, pf->physics->z);
+ ephysics_body_move(ep->body,
+ edje->x + pf->x,
+ edje->y + pf->y,
+ pf->physics->z);
ep->x = pf->x;
ep->y = pf->y;
ep->w = pf->w;
@@ -2639,14 +2643,16 @@ static void
_edje_physics_body_update_cb(void *data, EPhysics_Body *body, void *event_info EINA_UNUSED)
{
Edje_Real_Part *rp = data;
+ Edje *edje = ephysics_body_data_get(body);
+
ephysics_body_geometry_get(body, &(rp->x), &(rp->y), NULL,
&(rp->w), &(rp->h), NULL);
ephysics_body_evas_object_update(body);
- rp->edje->dirty = EINA_TRUE;
+ edje->dirty = EINA_TRUE;
}
static void
-_edje_physics_body_add(Edje_Real_Part *rp, EPhysics_World *world)
+_edje_physics_body_add(Edje *edje, Edje_Real_Part *rp, EPhysics_World *world)
{
Eina_Bool resize = EINA_TRUE;
Edje_Physics_Face *pface;
@@ -2715,7 +2721,7 @@ _edje_physics_body_add(Edje_Real_Part *rp, EPhysics_World *world)
edje_obj = edje_object_add(evas);
if (!edje_obj) continue;
- edje_object_file_set(edje_obj, rp->edje->path, pface->source);
+ edje_object_file_set(edje_obj, edje->path, pface->source);
evas_object_resize(edje_obj, 1, 1);
ephysics_body_face_evas_object_set(rp->body, pface->type,
edje_obj, EINA_FALSE);
@@ -2725,6 +2731,7 @@ _edje_physics_body_add(Edje_Real_Part *rp, EPhysics_World *world)
ephysics_body_evas_object_set(rp->body, rp->object, resize);
ephysics_body_event_callback_add(rp->body, EPHYSICS_CALLBACK_BODY_UPDATE,
_edje_physics_body_update_cb, rp);
+ ephysics_body_data_set(rp->body, edje);
}
#endif
@@ -3432,10 +3439,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
evas_obj_size_set(pf->w, pf->h));
if ((ep->part->physics_body) && (!ep->body))
{
- if (_edje_physics_world_geometry_check(ep->edje->world))
+ if (_edje_physics_world_geometry_check(ed->world))
{
- _edje_physics_body_add(ep, ep->edje->world);
- _edje_physics_body_props_update(ep, pf, EINA_TRUE);
+ _edje_physics_body_add(ed, ep, ed->world);
+ _edje_physics_body_props_update(ed, ep, pf, EINA_TRUE);
}
}
else if (ep->body)
@@ -3443,8 +3450,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (((ep->prev_description) &&
(chosen_desc != ep->prev_description)) ||
(pf != p1))
- _edje_physics_body_props_update(
- ep, pf, !pf->physics->ignore_part_pos);
+ _edje_physics_body_props_update(ed, ep, pf, !pf->physics->ignore_part_pos);
}
else
eo_do(ep->object,
@@ -3463,7 +3469,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
evas_obj_size_set(pf->w, pf->h));
}
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
- _edje_entry_real_part_configure(ep);
+ _edje_entry_real_part_configure(ed, ep);
break;
case EDJE_PART_TYPE_TEXT:
/* This is correctly handle in _edje_text_recalc_apply at the moment. */
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index c07beea7b1..a0bc3b38bb 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -314,13 +314,13 @@ _edje_image_name_find(Edje_Edit *eed, int image_id)
}
static void
-_edje_real_part_free(Edje_Real_Part *rp)
+_edje_real_part_free(Edje *ed, Edje_Real_Part *rp)
{
if (!rp) return;
if (rp->object)
{
- _edje_callbacks_del(rp->object, rp->edje);
+ _edje_callbacks_del(rp->object, ed);
evas_object_del(rp->object);
}
@@ -333,7 +333,7 @@ _edje_real_part_free(Edje_Real_Part *rp)
evas_object_clip_unset(rp->typedata.swallow->swallowed_object);
evas_object_data_del(rp->typedata.swallow->swallowed_object, "\377 edje.swallowing_part");
if (rp->part->mouse_events)
- _edje_callbacks_del(rp->typedata.swallow->swallowed_object, rp->edje);
+ _edje_callbacks_del(rp->typedata.swallow->swallowed_object, ed);
if (rp->part->type == EDJE_PART_TYPE_GROUP ||
rp->part->type == EDJE_PART_TYPE_EXTERNAL)
@@ -360,7 +360,7 @@ _edje_real_part_free(Edje_Real_Part *rp)
if (rp->param2) free(rp->param2->set);
eina_mempool_free(_edje_real_part_state_mp, rp->param2);
- _edje_unref(rp->edje);
+ _edje_unref(ed);
eina_mempool_free(_edje_real_part_mp, rp);
}
@@ -2069,8 +2069,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
ep->other.desc_count = 0;
/* Init Edje_Real_Part */
- rp->edje = ed;
- _edje_ref(rp->edje);
+ _edje_ref(ed);
rp->part = ep;
if (ep->type == EDJE_PART_TYPE_RECTANGLE)
@@ -2126,7 +2125,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
Evas_Object *child;
child = _edje_external_type_add(source, evas_object_evas_get(ed->obj), ed->obj, NULL, name);
if (child)
- _edje_real_part_swallow(rp, child, EINA_TRUE);
+ _edje_real_part_swallow(ed, rp, child, EINA_TRUE);
}
evas_object_clip_set(rp->object, ed->base->clipper);
evas_object_show(ed->base->clipper);
@@ -2267,7 +2266,7 @@ edje_edit_part_del(Evas_Object *obj, const char* part)
eina_mempool_free(ce->mp.part, ep);
/* Free Edje_Real_Part */
- _edje_real_part_free(rp);
+ _edje_real_part_free(ed, rp);
/* if all parts are gone, hide the clipper */
if (ed->table_parts_size == 0)
@@ -2667,7 +2666,7 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source
rp->part->source = eina_stringshare_add(source);
child_obj = edje_object_add(ed->base->evas);
edje_object_file_set(child_obj, ed->file->path, source);
- _edje_real_part_swallow(rp, child_obj, EINA_TRUE);
+ _edje_real_part_swallow(ed, rp, child_obj, EINA_TRUE);
}
else
rp->part->source = NULL;
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 75f37b1438..1dfe2cbf5b 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -14,11 +14,12 @@ typedef struct _Anchor Anchor;
static void _edje_entry_imf_cursor_location_set(Entry *en);
static void _edje_entry_imf_cursor_info_set(Entry *en);
static void _range_del_emit(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Entry *en);
-static void _text_filter_format_prepend(Entry *en, Evas_Textblock_Cursor *c, const char *text);
+static void _text_filter_format_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c, const char *text);
struct _Entry
{
Edje_Real_Part *rp;
+ Edje *ed;
Evas_Object *cursor_bg;
Evas_Object *cursor_fg;
Evas_Textblock_Cursor *cursor;
@@ -96,20 +97,24 @@ _preedit_del(Entry *en)
}
static void
-_edje_entry_focus_in_cb(void *data, Evas_Object *o EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
+_edje_entry_focus_in_cb(void *data, Evas_Object *o, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
{
Edje_Real_Part *rp;
Entry *en;
+ Edje *ed;
rp = data;
if ((!rp) || (rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
- if (!rp->typedata.text->entry_data || !rp->edje || !rp->edje->obj) return;
+ if (!rp->typedata.text->entry_data) return;
+
+ ed = _edje_fetch(o);
+ if (ed) return ;
en = rp->typedata.text->entry_data;
if (!en || !en->imf_context) return;
- if (evas_object_focus_get(rp->edje->obj))
+ if (evas_object_focus_get(ed->obj))
{
ecore_imf_context_reset(en->imf_context);
ecore_imf_context_focus_in(en->imf_context);
@@ -192,7 +197,7 @@ _edje_focus_out_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED
}
static Edje_Entry_Change_Info *
-_text_filter_markup_prepend_internal(Entry *en, Evas_Textblock_Cursor *c,
+_text_filter_markup_prepend_internal(Edje *ed, Entry *en, Evas_Textblock_Cursor *c,
char *text,
const char *fmtpre, const char *fmtpost,
Eina_Bool clearsel, Eina_Bool changeinfo)
@@ -200,11 +205,11 @@ _text_filter_markup_prepend_internal(Entry *en, Evas_Textblock_Cursor *c,
Edje_Markup_Filter_Callback *cb;
Eina_List *l;
- EINA_LIST_FOREACH(en->rp->edje->markup_filter_callbacks, l, cb)
+ EINA_LIST_FOREACH(ed->markup_filter_callbacks, l, cb)
{
if (!strcmp(cb->part, en->rp->part->name))
{
- cb->func(cb->data, en->rp->edje->obj, cb->part, &text);
+ cb->func(cb->data, ed->obj, cb->part, &text);
if (!text) break;
}
}
@@ -230,22 +235,22 @@ _text_filter_markup_prepend_internal(Entry *en, Evas_Textblock_Cursor *c,
}
if ((clearsel) && (en->have_selection))
{
- _range_del_emit(en->rp->edje, en->cursor, en->rp->object, en);
+ _range_del_emit(ed, en->cursor, en->rp->object, en);
if (info) info->merge = EINA_TRUE;
}
if (info) info->change.insert.pos =
evas_textblock_cursor_pos_get(en->cursor);
- if (fmtpre) _text_filter_format_prepend(en, en->cursor, fmtpre);
+ if (fmtpre) _text_filter_format_prepend(ed, en, en->cursor, fmtpre);
evas_object_textblock_text_markup_prepend(c, text);
free(text);
- if (fmtpost) _text_filter_format_prepend(en, en->cursor, fmtpost);
+ if (fmtpost) _text_filter_format_prepend(ed, en, en->cursor, fmtpost);
return info;
}
return NULL;
}
static Edje_Entry_Change_Info *
-_text_filter_text_prepend(Entry *en, Evas_Textblock_Cursor *c,
+_text_filter_text_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c,
const char *text,
const char *fmtpre, const char *fmtpost,
Eina_Bool clearsel, Eina_Bool changeinfo)
@@ -256,11 +261,11 @@ _text_filter_text_prepend(Entry *en, Evas_Textblock_Cursor *c,
EINA_SAFETY_ON_NULL_RETURN_VAL(text, NULL);
text2 = strdup(text);
- EINA_LIST_FOREACH(en->rp->edje->text_insert_filter_callbacks, l, cb)
+ EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb)
{
if (!strcmp(cb->part, en->rp->part->name))
{
- cb->func(cb->data, en->rp->edje->obj, cb->part, EDJE_TEXT_FILTER_TEXT, &text2);
+ cb->func(cb->data, ed->obj, cb->part, EDJE_TEXT_FILTER_TEXT, &text2);
if (!text2) break;
}
}
@@ -272,7 +277,7 @@ _text_filter_text_prepend(Entry *en, Evas_Textblock_Cursor *c,
markup_text = evas_textblock_text_utf8_to_markup(NULL, text2);
free(text2);
if (markup_text)
- info = _text_filter_markup_prepend_internal(en, c, markup_text,
+ info = _text_filter_markup_prepend_internal(ed, en, c, markup_text,
fmtpre, fmtpost,
clearsel, changeinfo);
return info;
@@ -281,7 +286,7 @@ _text_filter_text_prepend(Entry *en, Evas_Textblock_Cursor *c,
}
static void
-_text_filter_format_prepend(Entry *en, Evas_Textblock_Cursor *c, const char *text)
+_text_filter_format_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c, const char *text)
{
char *text2;
Edje_Text_Insert_Filter_Callback *cb;
@@ -289,11 +294,11 @@ _text_filter_format_prepend(Entry *en, Evas_Textblock_Cursor *c, const char *tex
EINA_SAFETY_ON_NULL_RETURN(text);
text2 = strdup(text);
- EINA_LIST_FOREACH(en->rp->edje->text_insert_filter_callbacks, l, cb)
+ EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb)
{
if (!strcmp(cb->part, en->rp->part->name))
{
- cb->func(cb->data, en->rp->edje->obj, cb->part, EDJE_TEXT_FILTER_FORMAT, &text2);
+ cb->func(cb->data, ed->obj, cb->part, EDJE_TEXT_FILTER_FORMAT, &text2);
if (!text2) break;
}
}
@@ -353,14 +358,14 @@ _text_filter_format_prepend(Entry *en, Evas_Textblock_Cursor *c, const char *tex
}
free(text2);
if (markup_text)
- _text_filter_markup_prepend_internal(en, c, markup_text,
+ _text_filter_markup_prepend_internal(ed, en, c, markup_text,
NULL, NULL,
EINA_FALSE, EINA_FALSE);
}
}
static Edje_Entry_Change_Info *
-_text_filter_markup_prepend(Entry *en, Evas_Textblock_Cursor *c,
+_text_filter_markup_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c,
const char *text,
const char *fmtpre, const char *fmtpost,
Eina_Bool clearsel, Eina_Bool changeinfo)
@@ -371,11 +376,11 @@ _text_filter_markup_prepend(Entry *en, Evas_Textblock_Cursor *c,
EINA_SAFETY_ON_NULL_RETURN_VAL(text, NULL);
text2 = strdup(text);
- EINA_LIST_FOREACH(en->rp->edje->text_insert_filter_callbacks, l, cb)
+ EINA_LIST_FOREACH(ed->text_insert_filter_callbacks, l, cb)
{
if (!strcmp(cb->part, en->rp->part->name))
{
- cb->func(cb->data, en->rp->edje->obj, cb->part, EDJE_TEXT_FILTER_MARKUP, &text2);
+ cb->func(cb->data, ed->obj, cb->part, EDJE_TEXT_FILTER_MARKUP, &text2);
if (!text2) break;
}
}
@@ -383,7 +388,7 @@ _text_filter_markup_prepend(Entry *en, Evas_Textblock_Cursor *c,
{
Edje_Entry_Change_Info *info;
- info = _text_filter_markup_prepend_internal(en, c, text2,
+ info = _text_filter_markup_prepend_internal(ed, en, c, text2,
fmtpre, fmtpost,
clearsel, changeinfo);
return info;
@@ -525,7 +530,8 @@ _sel_start(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
}
static void
-_sel_enable(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Entry *en)
+_sel_enable(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED,
+ Evas_Object *o EINA_UNUSED, Entry *en)
{
if (en->have_selection) return;
en->have_selection = EINA_TRUE;
@@ -534,15 +540,15 @@ _sel_enable(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, En
free(en->selection);
en->selection = NULL;
}
- _edje_emit(en->rp->edje, "selection,start", en->rp->part->name);
+ _edje_emit(ed, "selection,start", en->rp->part->name);
}
static void
-_sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
+_sel_extend(Edje *ed, Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
{
if (!en->sel_end) return;
_edje_entry_imf_context_reset(en->rp);
- _sel_enable(c, o, en);
+ _sel_enable(ed, c, o, en);
if (!evas_textblock_cursor_compare(c, en->sel_end)) return;
evas_textblock_cursor_copy(c, en->sel_end);
@@ -553,15 +559,15 @@ _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
free(en->selection);
en->selection = NULL;
}
- _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name);
+ _edje_emit(ed, "selection,changed", en->rp->part->name);
}
static void
-_sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
+_sel_preextend(Edje *ed, Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
{
if (!en->sel_end) return;
_edje_entry_imf_context_reset(en->rp);
- _sel_enable(c, o, en);
+ _sel_enable(ed, c, o, en);
if (!evas_textblock_cursor_compare(c, en->sel_start)) return;
evas_textblock_cursor_copy(c, en->sel_start);
@@ -572,11 +578,11 @@ _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
free(en->selection);
en->selection = NULL;
}
- _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name);
+ _edje_emit(ed, "selection,changed", en->rp->part->name);
}
static void
-_sel_clear(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Entry *en)
+_sel_clear(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Entry *en)
{
en->had_sel = EINA_FALSE;
if (en->sel_start)
@@ -604,12 +610,12 @@ _sel_clear(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Ent
if (en->have_selection)
{
en->have_selection = EINA_FALSE;
- _edje_emit(en->rp->edje, "selection,cleared", en->rp->part->name);
+ _edje_emit(ed, "selection,cleared", en->rp->part->name);
}
}
static void
-_sel_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
+_sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
{
Eina_List *range = NULL, *l;
Sel *sel;
@@ -640,25 +646,25 @@ _sel_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
sel = calloc(1, sizeof(Sel));
en->sel = eina_list_append(en->sel, sel);
- ob = edje_object_add(en->rp->edje->base->evas);
- edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source);
+ ob = edje_object_add(ed->base->evas);
+ edje_object_file_set(ob, ed->path, en->rp->part->source);
evas_object_smart_member_add(ob, smart);
evas_object_stack_below(ob, o);
evas_object_clip_set(ob, clip);
evas_object_pass_events_set(ob, EINA_TRUE);
evas_object_show(ob);
sel->obj_bg = ob;
- _edje_subobj_register(en->rp->edje, sel->obj_bg);
+ _edje_subobj_register(ed, sel->obj_bg);
- ob = edje_object_add(en->rp->edje->base->evas);
- edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source2);
+ ob = edje_object_add(ed->base->evas);
+ edje_object_file_set(ob, ed->path, en->rp->part->source2);
evas_object_smart_member_add(ob, smart);
evas_object_stack_above(ob, o);
evas_object_clip_set(ob, clip);
evas_object_pass_events_set(ob, EINA_TRUE);
evas_object_show(ob);
sel->obj_fg = ob;
- _edje_subobj_register(en->rp->edje, sel->obj_fg);
+ _edje_subobj_register(ed, sel->obj_fg);
}
}
}
@@ -706,6 +712,7 @@ _edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
size_t len;
int ignored;
Entry *en;
+ Edje *ed = an->en->ed;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -713,6 +720,7 @@ _edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) &&
(en->select_allow))
return;
+
ignored = rp->part->ignore_flags & ev->event_flags;
if ((!ev->event_flags) || (!ignored))
{
@@ -726,7 +734,7 @@ _edje_anchor_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
snprintf(buf, len, "anchor,mouse,down,%i,%s,double", ev->button, n);
else
snprintf(buf, len, "anchor,mouse,down,%i,%s", ev->button, n);
- _edje_emit(rp->edje, buf, rp->part->name);
+ _edje_emit(ed, buf, rp->part->name);
}
}
@@ -740,9 +748,11 @@ _edje_anchor_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
size_t len;
int ignored;
Entry *en;
+ Edje *ed = an->en->ed;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
+
en = rp->typedata.text->entry_data;
ignored = rp->part->ignore_flags & ev->event_flags;
n = an->name;
@@ -755,13 +765,13 @@ _edje_anchor_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
if ((!ev->event_flags) || (!ignored))
{
snprintf(buf, len, "anchor,mouse,up,%i,%s", ev->button, n);
- _edje_emit(rp->edje, buf, rp->part->name);
+ _edje_emit(ed, buf, rp->part->name);
}
}
if ((rp->still_in) && (rp->clicked_button == ev->button) && (!ignored))
{
snprintf(buf, len, "anchor,mouse,clicked,%i,%s", ev->button, n);
- _edje_emit(rp->edje, buf, rp->part->name);
+ _edje_emit(ed, buf, rp->part->name);
}
}
@@ -775,6 +785,7 @@ _edje_anchor_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
size_t len;
int ignored;
Entry *en;
+ Edje *ed = an->en->ed;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -782,6 +793,7 @@ _edje_anchor_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) &&
(en->select_allow))
return;
+
ignored = rp->part->ignore_flags & ev->event_flags;
if ((!ev->event_flags) || (!ignored))
{
@@ -790,7 +802,7 @@ _edje_anchor_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
len = 200 + strlen(n);
buf = alloca(len);
snprintf(buf, len, "anchor,mouse,move,%s", n);
- _edje_emit(rp->edje, buf, rp->part->name);
+ _edje_emit(ed, buf, rp->part->name);
}
}
@@ -800,6 +812,7 @@ _edje_anchor_mouse_in_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
Anchor *an = data;
Evas_Event_Mouse_In *ev = event_info;
Edje_Real_Part *rp = an->en->rp;
+ Edje *ed = an->en->ed;
char *buf, *n;
size_t len;
int ignored;
@@ -812,7 +825,7 @@ _edje_anchor_mouse_in_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
len = 200 + strlen(n);
buf = alloca(len);
snprintf(buf, len, "anchor,mouse,in,%s", n);
- _edje_emit(rp->edje, buf, rp->part->name);
+ _edje_emit(ed, buf, rp->part->name);
}
}
@@ -825,6 +838,7 @@ _edje_anchor_mouse_out_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA
char *buf, *n;
size_t len;
int ignored;
+ Edje *ed = an->en->ed;
ignored = rp->part->ignore_flags & ev->event_flags;
if ((!ev->event_flags) || (!ignored))
@@ -834,18 +848,19 @@ _edje_anchor_mouse_out_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA
len = 200 + strlen(n);
buf = alloca(len);
snprintf(buf, len, "anchor,mouse,out,%s", n);
- _edje_emit(rp->edje, buf, rp->part->name);
+ _edje_emit(ed, buf, rp->part->name);
}
}
static void
-_anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
+_anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Entry *en)
{
Eina_List *l, *ll, *range = NULL;
Evas_Coord x, y, w, h;
Evas_Object *smart, *clip;
Sel *sel;
Anchor *an;
+ Edje *ed = en->ed;
smart = evas_object_smart_parent_get(o);
clip = evas_object_clip_get(o);
@@ -873,10 +888,10 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
sel = calloc(1, sizeof(Sel));
an->sel = eina_list_append(an->sel, sel);
- if (en->rp->edje->item_provider.func)
+ if (ed->item_provider.func)
{
- ob = en->rp->edje->item_provider.func
- (en->rp->edje->item_provider.data, smart,
+ ob = ed->item_provider.func
+ (ed->item_provider.data, smart,
en->rp->part->name, an->name);
evas_object_smart_member_add(ob, smart);
evas_object_stack_above(ob, o);
@@ -909,27 +924,27 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
sel = calloc(1, sizeof(Sel));
an->sel = eina_list_append(an->sel, sel);
- ob = edje_object_add(en->rp->edje->base->evas);
- edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source5);
+ ob = edje_object_add(ed->base->evas);
+ edje_object_file_set(ob, ed->path, en->rp->part->source5);
evas_object_smart_member_add(ob, smart);
evas_object_stack_below(ob, o);
evas_object_clip_set(ob, clip);
evas_object_pass_events_set(ob, EINA_TRUE);
evas_object_show(ob);
sel->obj_bg = ob;
- _edje_subobj_register(en->rp->edje, sel->obj_bg);
+ _edje_subobj_register(ed, sel->obj_bg);
- ob = edje_object_add(en->rp->edje->base->evas);
- edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source6);
+ ob = edje_object_add(ed->base->evas);
+ edje_object_file_set(ob, ed->path, en->rp->part->source6);
evas_object_smart_member_add(ob, smart);
evas_object_stack_above(ob, o);
evas_object_clip_set(ob, clip);
evas_object_pass_events_set(ob, EINA_TRUE);
evas_object_show(ob);
sel->obj_fg = ob;
- _edje_subobj_register(en->rp->edje, sel->obj_fg);
+ _edje_subobj_register(ed, sel->obj_fg);
- ob = evas_object_rectangle_add(en->rp->edje->base->evas);
+ ob = evas_object_rectangle_add(ed->base->evas);
evas_object_color_set(ob, 0, 0, 0, 0);
evas_object_smart_member_add(ob, smart);
evas_object_stack_above(ob, o);
@@ -1149,14 +1164,14 @@ _range_del_emit(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o E
_edje_emit_full(ed, "entry,changed,user", en->rp->part->name, info,
_free_entry_change_info);
noop:
- _sel_clear(en->cursor, en->rp->object, en);
+ _sel_clear(ed, en->cursor, en->rp->object, en);
}
//static void
//_range_del(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED, Entry *en)
//{
// evas_textblock_cursor_range_delete(en->sel_start, en->sel_end);
-// _sel_clear(en->cursor, en->rp->object, en);
+// _sel_clear(ed, en->cursor, en->rp->object, en);
//}
static void
@@ -1194,7 +1209,7 @@ _delete_emit(Edje *ed, Evas_Textblock_Cursor *c, Entry *en, size_t pos,
}
static void
-_edje_entry_hide_visible_password(Edje_Real_Part *rp)
+_edje_entry_hide_visible_password(Edje *ed, Edje_Real_Part *rp)
{
const Evas_Object_Textblock_Node_Format *node;
node = evas_textblock_node_format_first_get(rp->object);
@@ -1211,15 +1226,15 @@ _edje_entry_hide_visible_password(Edje_Real_Part *rp)
}
}
}
- _edje_entry_real_part_configure(rp);
- _edje_emit(rp->edje, "entry,changed", rp->part->name);
+ _edje_entry_real_part_configure(ed, rp);
+ _edje_emit(ed, "entry,changed", rp->part->name);
}
static Eina_Bool
_password_timer_cb(void *data)
{
Entry *en = (Entry *)data;
- _edje_entry_hide_visible_password(en->rp);
+ _edje_entry_hide_visible_password(en->ed, en->rp);
en->pw_timer = NULL;
return ECORE_CALLBACK_CANCEL;
}
@@ -1331,18 +1346,18 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->select_allow)
{
if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_curs_up(en->cursor, rp->object, en);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
_edje_emit(ed, "entry,key,up", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(ed, "cursor,changed,manual", rp->part->name);
}
else if (!strcmp(ev->keyname, "Down") ||
(!strcmp(ev->keyname, "KP_Down") && !ev->string))
@@ -1353,18 +1368,18 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->select_allow)
{
if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_curs_down(en->cursor, rp->object, en);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
_edje_emit(ed, "entry,key,down", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(ed, "cursor,changed,manual", rp->part->name);
}
else if (!strcmp(ev->keyname, "Left") ||
(!strcmp(ev->keyname, "KP_Left") && !ev->string))
@@ -1372,19 +1387,19 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_compose_seq_reset(en);
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_start(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
evas_textblock_cursor_char_prev(en->cursor);
/* If control is pressed, go to the start of the word */
if (control) evas_textblock_cursor_word_start(en->cursor);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_edje_emit(ed, "entry,key,left", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(ed, "cursor,changed,manual", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
else if (!strcmp(ev->keyname, "Right") ||
@@ -1393,19 +1408,19 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_compose_seq_reset(en);
if (en->select_allow)
{
- if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_start(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
/* If control is pressed, go to the end of the word */
if (control) evas_textblock_cursor_word_end(en->cursor);
evas_textblock_cursor_char_next(en->cursor);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_edje_emit(ed, "entry,key,right", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(ed, "cursor,changed,manual", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
else if (!strcmp(ev->keyname, "BackSpace"))
@@ -1419,7 +1434,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_textblock_cursor_char_prev(en->cursor);
evas_textblock_cursor_word_start(en->cursor);
- _sel_preextend(en->cursor, rp->object, en);
+ _sel_preextend(ed, en->cursor, rp->object, en);
_range_del_emit(ed, en->cursor, rp->object, en);
}
@@ -1441,7 +1456,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
}
}
}
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(ed, en->cursor, rp->object, en);
_anchors_get(en->cursor, rp->object, en);
_edje_emit(ed, "entry,key,backspace", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1458,7 +1473,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_textblock_cursor_word_end(en->cursor);
evas_textblock_cursor_char_next(en->cursor);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(ed, en->cursor, rp->object, en);
_range_del_emit(ed, en->cursor, rp->object, en);
}
@@ -1477,7 +1492,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_delete_emit(ed, en->cursor, en, old_cur_pos, EINA_FALSE);
}
}
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(ed, en->cursor, rp->object, en);
_anchors_get(en->cursor, rp->object, en);
_edje_emit(ed, "entry,key,delete", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1490,7 +1505,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->select_allow)
{
if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
if ((control) && (multiline))
_curs_start(en->cursor, rp->object, en);
@@ -1498,7 +1513,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_curs_lin_start(en->cursor, rp->object, en);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
}
_edje_emit(ed, "entry,key,home", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1511,7 +1526,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->select_allow)
{
if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
if ((control) && (multiline))
_curs_end(en->cursor, rp->object, en);
@@ -1519,7 +1534,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_curs_lin_end(en->cursor, rp->object, en);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
}
_edje_emit(ed, "entry,key,end", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1582,7 +1597,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
else if ((control) && (!shift) && (!strcmp(ev->keyname, "w")))
{
_compose_seq_reset(en);
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(ed, en->cursor, rp->object, en);
// select current word?
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
}
@@ -1609,7 +1624,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
info->change.insert.pos =
evas_textblock_cursor_pos_get(en->cursor);
info->change.insert.content = eina_stringshare_add("<tab/>");
- _text_filter_format_prepend(en, en->cursor, "tab");
+ _text_filter_format_prepend(ed, en, en->cursor, "tab");
_anchors_get(en->cursor, rp->object, en);
_edje_emit(ed, "entry,changed", rp->part->name);
_edje_emit_full(ed, "entry,changed,user", rp->part->name,
@@ -1632,13 +1647,13 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->select_allow)
{
if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_curs_jump_line_by(en->cursor, rp->object, en, -10);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_edje_emit(ed, "entry,key,pgup", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1650,13 +1665,13 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (en->select_allow)
{
if (shift) _sel_start(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_curs_jump_line_by(en->cursor, rp->object, en, 10);
if (en->select_allow)
{
- if (shift) _sel_extend(en->cursor, rp->object, en);
- else _sel_clear(en->cursor, rp->object, en);
+ if (shift) _sel_extend(ed, en->cursor, rp->object, en);
+ else _sel_clear(ed, en->cursor, rp->object, en);
}
_edje_emit(ed, "entry,key,pgdn", rp->part->name);
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
@@ -1680,12 +1695,12 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if (shift ||
evas_object_textblock_legacy_newline_get(rp->object))
{
- _text_filter_format_prepend(en, en->cursor, "br");
+ _text_filter_format_prepend(ed, en, en->cursor, "br");
info->change.insert.content = eina_stringshare_add("<br/>");
}
else
{
- _text_filter_format_prepend(en, en->cursor, "ps");
+ _text_filter_format_prepend(ed, en, en->cursor, "ps");
info->change.insert.content = eina_stringshare_add("<ps/>");
}
_anchors_get(en->cursor, rp->object, en);
@@ -1738,8 +1753,8 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) &&
_edje_password_show_last)
{
- _edje_entry_hide_visible_password(en->rp);
- info = _text_filter_text_prepend(en, en->cursor, string,
+ _edje_entry_hide_visible_password(ed, en->rp);
+ info = _text_filter_text_prepend(ed, en, en->cursor, string,
"+ password=off",
"- password",
EINA_TRUE, EINA_TRUE);
@@ -1756,7 +1771,7 @@ _edje_key_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
}
}
else
- info = _text_filter_text_prepend(en, en->cursor, string,
+ info = _text_filter_text_prepend(ed, en, en->cursor, string,
NULL, NULL,
EINA_TRUE, EINA_TRUE);
_anchors_get(en->cursor, rp->object, en);
@@ -1778,7 +1793,7 @@ end:
_edje_emit(ed, "cursor,changed", rp->part->name);
_edje_entry_imf_cursor_info_set(en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(ed, rp);
}
static void
@@ -1887,19 +1902,19 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
evas_textblock_cursor_line_char_first(en->cursor);
else
evas_textblock_cursor_line_char_last(en->cursor);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
}
else
{
en->have_selection = EINA_FALSE;
en->selecting = EINA_FALSE;
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
tc = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_copy(en->cursor, tc);
evas_textblock_cursor_line_char_first(en->cursor);
_sel_start(en->cursor, rp->object, en);
evas_textblock_cursor_line_char_last(en->cursor);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
}
goto end;
}
@@ -1916,20 +1931,20 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
evas_textblock_cursor_word_end(en->cursor);
evas_textblock_cursor_char_next(en->cursor);
}
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
}
else
{
en->have_selection = EINA_FALSE;
en->selecting = EINA_FALSE;
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
tc = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_copy(en->cursor, tc);
evas_textblock_cursor_word_start(en->cursor);
_sel_start(en->cursor, rp->object, en);
evas_textblock_cursor_word_end(en->cursor);
evas_textblock_cursor_char_next(en->cursor);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
}
goto end;
}
@@ -1982,7 +1997,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
(rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT))
{
if (shift)
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
else
{
Eina_List *first, *last;
@@ -2005,7 +2020,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
d2 = d * d;
d = (r2->y + (r2->h / 2)) - cy;
d2 += d * d;
- sc = rp->edje->scale;
+ sc = en->ed->scale;
if (sc == ZERO) sc = _edje_scale;
d = (Evas_Coord)MUL(FROM_INT(20), sc); // FIXME: maxing number!
d = d * d;
@@ -2031,11 +2046,11 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
else
{
if ((en->have_selection) && (shift))
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
else
{
en->selecting = EINA_TRUE;
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
if (en->select_allow)
{
_sel_start(en->cursor, rp->object, en);
@@ -2046,16 +2061,16 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
end:
if (evas_textblock_cursor_compare(tc, en->cursor))
{
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed,manual", rp->part->name);
}
evas_textblock_cursor_free(tc);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
if (ev->button == 2)
{
- _edje_emit(rp->edje, "entry,paste,request", rp->part->name);
- _edje_emit(rp->edje, "entry,paste,request,1", rp->part->name);
+ _edje_emit(en->ed, "entry,paste,request", rp->part->name);
+ _edje_emit(en->ed, "entry,paste,request,1", rp->part->name);
}
}
@@ -2145,12 +2160,12 @@ _edje_part_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
if (en->had_sel)
{
if (en->select_mod_end)
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
else if (en->select_mod_start)
- _sel_preextend(en->cursor, rp->object, en);
+ _sel_preextend(en->ed, en->cursor, rp->object, en);
}
else
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
//evas_textblock_cursor_copy(en->cursor, en->sel_end);
}
}
@@ -2164,15 +2179,15 @@ _edje_part_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
}
if (evas_textblock_cursor_compare(tc, en->cursor))
{
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed,manual", rp->part->name);
}
_edje_entry_imf_cursor_info_set(en);
evas_textblock_cursor_free(tc);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
static void
@@ -2184,6 +2199,7 @@ _edje_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
Entry *en;
Evas_Coord x, y, w, h;
Evas_Textblock_Cursor *tc;
+
if ((!rp) || (!ev)) return;
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
@@ -2243,33 +2259,33 @@ _edje_part_mouse_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
if (en->had_sel)
{
if (en->select_mod_end)
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
else if (en->select_mod_start)
- _sel_preextend(en->cursor, rp->object, en);
+ _sel_preextend(en->ed, en->cursor, rp->object, en);
}
else
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
}
}
else
{
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
}
if (en->select_allow)
{
if (evas_textblock_cursor_compare(en->sel_start, en->sel_end) != 0)
- _sel_enable(en->cursor, rp->object, en);
+ _sel_enable(en->ed, en->cursor, rp->object, en);
if (en->have_selection)
- _sel_update(en->cursor, rp->object, en);
+ _sel_update(en->ed, en->cursor, rp->object, en);
}
if (evas_textblock_cursor_compare(tc, en->cursor))
{
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed,manual", rp->part->name);
}
evas_textblock_cursor_free(tc);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
}
@@ -2335,7 +2351,7 @@ _edje_entry_shutdown(Edje *ed)
}
void
-_edje_entry_real_part_init(Edje_Real_Part *rp)
+_edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
{
Entry *en;
#ifdef HAVE_ECORE_IMF
@@ -2349,6 +2365,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
if (!en) return;
rp->typedata.text->entry_data = en;
en->rp = rp;
+ en->ed = ed;
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_MOVE, _edje_part_move_cb, rp);
@@ -2372,21 +2389,21 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
evas_object_textblock_replace_char_set(rp->object, "*");
}
- en->cursor_bg = edje_object_add(rp->edje->base->evas);
- edje_object_file_set(en->cursor_bg, rp->edje->path, rp->part->source3);
- evas_object_smart_member_add(en->cursor_bg, rp->edje->obj);
+ en->cursor_bg = edje_object_add(ed->base->evas);
+ edje_object_file_set(en->cursor_bg, ed->path, rp->part->source3);
+ evas_object_smart_member_add(en->cursor_bg, ed->obj);
evas_object_stack_below(en->cursor_bg, rp->object);
evas_object_clip_set(en->cursor_bg, evas_object_clip_get(rp->object));
evas_object_pass_events_set(en->cursor_bg, EINA_TRUE);
- _edje_subobj_register(en->rp->edje, en->cursor_bg);
+ _edje_subobj_register(ed, en->cursor_bg);
- en->cursor_fg = edje_object_add(rp->edje->base->evas);
- edje_object_file_set(en->cursor_fg, rp->edje->path, rp->part->source4);
- evas_object_smart_member_add(en->cursor_fg, rp->edje->obj);
+ en->cursor_fg = edje_object_add(ed->base->evas);
+ edje_object_file_set(en->cursor_fg, ed->path, rp->part->source4);
+ evas_object_smart_member_add(en->cursor_fg, ed->obj);
evas_object_stack_above(en->cursor_fg, rp->object);
evas_object_clip_set(en->cursor_fg, evas_object_clip_get(rp->object));
evas_object_pass_events_set(en->cursor_fg, EINA_TRUE);
- _edje_subobj_register(en->rp->edje, en->cursor_fg);
+ _edje_subobj_register(ed, en->cursor_fg);
evas_object_textblock_legacy_newline_set(rp->object, EINA_TRUE);
@@ -2401,8 +2418,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
en->commit_cancel = EINA_FALSE;
- edje_object_signal_callback_add(rp->edje->obj, "focus,part,in", rp->part->name, _edje_entry_focus_in_cb, rp);
- edje_object_signal_callback_add(rp->edje->obj, "focus,part,out", rp->part->name, _edje_entry_focus_out_cb, rp);
+ edje_object_signal_callback_add(ed->obj, "focus,part,in", rp->part->name, _edje_entry_focus_in_cb, rp);
+ edje_object_signal_callback_add(ed->obj, "focus,part,out", rp->part->name, _edje_entry_focus_out_cb, rp);
ctx_id = ecore_imf_context_default_id_get();
if (ctx_id)
@@ -2430,14 +2447,14 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
ecore_imf_context_client_window_set
(en->imf_context,
(void *)ecore_evas_window_get
- (ecore_evas_ecore_evas_get(rp->edje->base->evas)));
- ecore_imf_context_client_canvas_set(en->imf_context, rp->edje->base->evas);
+ (ecore_evas_ecore_evas_get(ed->base->evas)));
+ ecore_imf_context_client_canvas_set(en->imf_context, ed->base->evas);
ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context,
- _edje_entry_imf_retrieve_surrounding_cb, rp->edje);
- ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje);
- ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje);
- ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, rp->edje);
+ _edje_entry_imf_retrieve_surrounding_cb, ed);
+ ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _edje_entry_imf_event_commit_cb, ed);
+ ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, ed);
+ ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, ed);
ecore_imf_context_input_mode_set(en->imf_context,
rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD ?
ECORE_IMF_INPUT_MODE_INVISIBLE : ECORE_IMF_INPUT_MODE_FULL);
@@ -2453,7 +2470,7 @@ done:
}
void
-_edje_entry_real_part_shutdown(Edje_Real_Part *rp)
+_edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp)
{
Entry *en;
@@ -2462,7 +2479,7 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
en = rp->typedata.text->entry_data;
if (!en) return;
rp->typedata.text->entry_data = NULL;
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(ed, en->cursor, rp->object, en);
_anchors_clear(en->cursor, rp->object, en);
#ifdef HAVE_ECORE_IMF
_preedit_clear(en);
@@ -2489,8 +2506,8 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
en->imf_context = NULL;
}
- edje_object_signal_callback_del(rp->edje->obj, "focus,part,in", rp->part->name, _edje_entry_focus_in_cb);
- edje_object_signal_callback_del(rp->edje->obj, "focus,part,out", rp->part->name, _edje_entry_focus_out_cb);
+ edje_object_signal_callback_del(ed->obj, "focus,part,in", rp->part->name, _edje_entry_focus_in_cb);
+ edje_object_signal_callback_del(ed->obj, "focus,part,out", rp->part->name, _edje_entry_focus_out_cb);
}
#endif
_compose_seq_reset(en);
@@ -2499,7 +2516,7 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp)
}
void
-_edje_entry_real_part_configure(Edje_Real_Part *rp)
+_edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp)
{
Evas_Coord x, y, w, h, xx, yy, ww, hh;
Entry *en;
@@ -2520,7 +2537,7 @@ _edje_entry_real_part_configure(Edje_Real_Part *rp)
cur_type = EVAS_TEXTBLOCK_CURSOR_UNDER;
}
- _sel_update(en->cursor, rp->object, en);
+ _sel_update(ed, en->cursor, rp->object, en);
_anchors_update(en->cursor, rp->object, en);
x = y = w = h = -1;
xx = yy = ww = hh = -1;
@@ -2580,18 +2597,18 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text)
if (!en) return;
_edje_entry_imf_context_reset(rp);
// set text as markup
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
evas_object_textblock_text_markup_set(rp->object, text);
_edje_entry_set_cursor_start(rp);
_anchors_get(en->cursor, rp->object, en);
- _edje_emit(rp->edje, "entry,changed", rp->part->name);
+ _edje_emit(en->ed, "entry,changed", rp->part->name);
_edje_entry_imf_cursor_info_set(en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
#if 0
/* Don't emit cursor changed cause it didn't. It's just init to 0. */
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
#endif
}
@@ -2608,15 +2625,15 @@ _edje_entry_text_markup_append(Edje_Real_Part *rp, const char *text)
end_cur = evas_object_textblock_cursor_new(rp->object);
evas_textblock_cursor_paragraph_last(end_cur);
- _text_filter_markup_prepend(en, end_cur, text, NULL, NULL,
+ _text_filter_markup_prepend(en->ed, en, end_cur, text, NULL, NULL,
EINA_TRUE, EINA_FALSE);
evas_textblock_cursor_free(end_cur);
/* We are updating according to the real cursor on purpose */
_anchors_get(en->cursor, rp->object, en);
- _edje_emit(rp->edje, "entry,changed", rp->part->name);
+ _edje_emit(en->ed, "entry,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -2633,14 +2650,14 @@ _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text)
// prepend markup @ cursor pos .. XXX: do we need to do this? maybe not?
// if (en->have_selection)
// _range_del(en->cursor, rp->object, en);
- _text_filter_markup_prepend(en, en->cursor, text, NULL, NULL,
+ _text_filter_markup_prepend(en->ed, en, en->cursor, text, NULL, NULL,
EINA_TRUE, EINA_FALSE);
_anchors_get(en->cursor, rp->object, en);
- _edje_emit(rp->edje, "entry,changed", rp->part->name);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ _edje_emit(en->ed, "entry,changed", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
_edje_entry_imf_cursor_info_set(en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -2680,7 +2697,7 @@ _edje_entry_select_none(Edje_Real_Part *rp)
(!rp->typedata.text)) return;
en = rp->typedata.text->entry_data;
if (!en) return;
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
}
void
@@ -2695,14 +2712,14 @@ _edje_entry_select_all(Edje_Real_Part *rp)
_edje_entry_imf_context_reset(rp);
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
_curs_start(en->cursor, rp->object, en);
- _sel_enable(en->cursor, rp->object, en);
+ _sel_enable(en->ed, en->cursor, rp->object, en);
_sel_start(en->cursor, rp->object, en);
_curs_end(en->cursor, rp->object, en);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -2717,12 +2734,12 @@ _edje_entry_select_begin(Edje_Real_Part *rp)
_edje_entry_imf_context_reset(rp);
- _sel_clear(en->cursor, rp->object, en);
- _sel_enable(en->cursor, rp->object, en);
+ _sel_clear(en->ed, en->cursor, rp->object, en);
+ _sel_enable(en->ed, en->cursor, rp->object, en);
_sel_start(en->cursor, rp->object, en);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -2735,9 +2752,9 @@ _edje_entry_select_extend(Edje_Real_Part *rp)
en = rp->typedata.text->entry_data;
if (!en) return;
_edje_entry_imf_context_reset(rp);
- _sel_extend(en->cursor, rp->object, en);
+ _sel_extend(en->ed, en->cursor, rp->object, en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
const Eina_List *
@@ -2879,19 +2896,19 @@ _edje_entry_user_insert(Edje_Real_Part *rp, const char *text)
(!rp->typedata.text)) return;
en = rp->typedata.text->entry_data;
if (!en) return;
- info = _text_filter_markup_prepend(en, en->cursor, text, NULL, NULL,
+ info = _text_filter_markup_prepend(en->ed, en, en->cursor, text, NULL, NULL,
EINA_TRUE, EINA_TRUE);
_anchors_get(en->cursor, rp->object, en);
if (info)
{
- _edje_emit(rp->edje, "entry,changed", rp->part->name);
- _edje_emit_full(rp->edje, "entry,changed,user", rp->part->name,
+ _edje_emit(en->ed, "entry,changed", rp->part->name);
+ _edje_emit_full(en->ed, "entry,changed,user", rp->part->name,
info, _free_entry_change_info);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
}
_edje_entry_imf_cursor_info_set(en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -2935,7 +2952,7 @@ _edje_entry_select_abort(Edje_Real_Part *rp)
_edje_entry_imf_context_reset(rp);
_edje_entry_imf_cursor_info_set(en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(en->ed, rp);
}
}
@@ -3287,11 +3304,11 @@ _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur)
{
return EINA_FALSE;
}
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
return EINA_TRUE;
}
@@ -3315,12 +3332,12 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur)
else return EINA_FALSE;
}
ok:
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
return EINA_TRUE;
}
@@ -3354,12 +3371,12 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur)
else
evas_textblock_cursor_line_char_last(c);
}
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
return EINA_TRUE;
}
@@ -3392,11 +3409,11 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur)
else
evas_textblock_cursor_line_char_last(c);
}
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
return EINA_TRUE;
}
@@ -3415,11 +3432,11 @@ _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_entry_imf_context_reset(rp);
evas_textblock_cursor_paragraph_first(c);
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -3437,12 +3454,12 @@ _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_entry_imf_context_reset(rp);
_curs_end(c, rp->object, rp->typedata.text->entry_data);
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -3461,12 +3478,12 @@ _edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst)
d = _cursor_get(rp, dst);
if (!d) return;
evas_textblock_cursor_copy(c, d);
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_context_reset(rp);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -3483,12 +3500,12 @@ _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur)
_edje_entry_imf_context_reset(rp);
evas_textblock_cursor_line_char_first(c);
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
}
void
@@ -3504,11 +3521,11 @@ _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur)
if (!c) return;
_edje_entry_imf_context_reset(rp);
evas_textblock_cursor_line_char_last(c);
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
}
Eina_Bool
@@ -3571,11 +3588,11 @@ _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos)
_edje_entry_imf_context_reset(rp);
evas_textblock_cursor_pos_set(c, pos);
- _sel_update(c, rp->object, rp->typedata.text->entry_data);
+ _sel_update(en->ed, c, rp->object, rp->typedata.text->entry_data);
_edje_entry_imf_cursor_info_set(en);
- _edje_emit(rp->edje, "cursor,changed", rp->part->name);
- _edje_entry_real_part_configure(rp);
+ _edje_emit(en->ed, "cursor,changed", rp->part->name);
+ _edje_entry_real_part_configure(en->ed, rp);
}
int
@@ -3775,7 +3792,7 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
{
/* delete selected characters */
_range_del_emit(ed, en->cursor, rp->object, en);
- _sel_clear(en->cursor, rp->object, en);
+ _sel_clear(ed, en->cursor, rp->object, en);
}
}
@@ -3792,11 +3809,11 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) &&
_edje_password_show_last)
- _edje_entry_hide_visible_password(en->rp);
+ _edje_entry_hide_visible_password(ed, en->rp);
if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) &&
_edje_password_show_last && (!en->preedit_start))
{
- info = _text_filter_text_prepend(en, en->cursor, commit_str,
+ info = _text_filter_text_prepend(ed, en, en->cursor, commit_str,
"+ password=off", "- password",
EINA_TRUE, EINA_TRUE);
if (info)
@@ -3813,8 +3830,8 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
}
else
{
- info = _text_filter_text_prepend(en, en->cursor, commit_str,
- NULL, NULL,
+ info = _text_filter_text_prepend(ed, en, en->cursor, commit_str,
+ NULL, NULL,
EINA_TRUE, EINA_TRUE);
}
@@ -3823,13 +3840,13 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
_anchors_get(en->cursor, rp->object, en);
if (info)
{
- _edje_emit(rp->edje, "entry,changed", rp->part->name);
+ _edje_emit(ed, "entry,changed", rp->part->name);
_edje_emit_full(ed, "entry,changed,user", rp->part->name,
info, _free_entry_change_info);
_edje_emit(ed, "cursor,changed", rp->part->name);
}
_edje_entry_imf_cursor_info_set(en);
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(ed, rp);
}
static void
@@ -3920,8 +3937,8 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
{
Edje_Entry_Change_Info *info;
- _edje_entry_hide_visible_password(en->rp);
- info = _text_filter_text_prepend(en, en->cursor,
+ _edje_entry_hide_visible_password(ed, en->rp);
+ info = _text_filter_text_prepend(ed, en, en->cursor,
eina_strbuf_string_get(buf),
"+ password=off",
"- password",
@@ -3939,7 +3956,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
}
}
else
- _text_filter_markup_prepend(en, en->cursor,
+ _text_filter_markup_prepend(ed, en, en->cursor,
eina_strbuf_string_get(buf),
NULL, NULL,
EINA_TRUE, EINA_FALSE);
@@ -3973,7 +3990,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
_edje_entry_imf_cursor_info_set(en);
_anchors_get(en->cursor, rp->object, en);
- _edje_emit(rp->edje, "preedit,changed", rp->part->name);
+ _edje_emit(ed, "preedit,changed", rp->part->name);
_edje_emit(ed, "cursor,changed", rp->part->name);
/* delete attribute list */
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 62eb30db54..b759e44d17 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -516,8 +516,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
return 0;
}
- rp->edje = ed;
- _edje_ref(rp->edje);
+ _edje_ref(ed);
rp->part = ep;
eina_array_push(&parts, rp);
rp->param1.description =
@@ -732,7 +731,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
}
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
- _edje_entry_real_part_init(rp);
+ _edje_entry_real_part_init(ed, rp);
if (!ed->has_entries)
ed->has_entries = EINA_TRUE;
}
@@ -778,7 +777,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
external->external_params, rp->part->name);
if (child_obj)
{
- _edje_real_part_swallow(rp, child_obj, EINA_TRUE);
+ _edje_real_part_swallow(ed, rp, child_obj, EINA_TRUE);
rp->param1.external_params = _edje_external_params_parse(child_obj,
external->external_params);
_edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description);
@@ -864,7 +863,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
group_path = eina_list_append(group_path, group_path_entry);
if (rp->part->type == EDJE_PART_TYPE_GROUP)
{
- _edje_real_part_swallow(rp, child_obj, EINA_FALSE);
+ _edje_real_part_swallow(ed, rp, child_obj, EINA_FALSE);
}
if (!_edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path, nested))
@@ -885,7 +884,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
if (rp->part->type == EDJE_PART_TYPE_GROUP)
{
ed->groups = eina_list_append(ed->groups, _edje_fetch(child_obj));
- _edje_real_part_swallow(rp, child_obj, EINA_TRUE);
+ _edje_real_part_swallow(ed, rp, child_obj, EINA_TRUE);
_edje_subobj_register(ed, child_obj);
source = NULL;
}
@@ -915,12 +914,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
if (rp->part->type == EDJE_PART_TYPE_BOX)
{
- _edje_real_part_box_append(rp, child_obj);
+ _edje_real_part_box_append(ed, rp, child_obj);
evas_object_data_set(child_obj, "\377 edje.box_item", pack_it);
}
else if (rp->part->type == EDJE_PART_TYPE_TABLE)
{
- _edje_real_part_table_pack(rp, child_obj,
+ _edje_real_part_table_pack(ed, rp, child_obj,
pack_it_copy.col, pack_it_copy.row,
pack_it_copy.colspan, pack_it_copy.rowspan);
evas_object_data_set(child_obj, "\377 edje.table_item", pack_it);
@@ -986,7 +985,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
switch (eud->type)
{
case EDJE_USER_SWALLOW:
- edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
+ edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
child = eud->u.swallow.child;
break;
case EDJE_USER_BOX_PACK:
@@ -994,7 +993,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
eud = NULL;
break;
case EDJE_USER_TABLE_PACK:
- edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
+ edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
eud->u.table.col, eud->u.table.row,
eud->u.table.colspan, eud->u.table.rowspan);
child = eud->u.table.child;
@@ -1030,7 +1029,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
boxes = eina_list_sort(boxes, -1, _sort_defined_boxes);
EINA_LIST_FREE(boxes, eud)
{
- edje_object_part_box_append(obj, eud->part, eud->u.box.child);
+ edje_object_part_box_append(obj, eud->part, eud->u.box.child);
_edje_user_definition_remove(eud, eud->u.box.child);
}
}
@@ -1187,7 +1186,7 @@ _edje_object_collect(Edje *ed)
break;
}
}
- _edje_real_part_box_remove(rp, child);
+ _edje_real_part_box_remove(eud->ed, rp, child);
}
}
break;
@@ -1198,7 +1197,7 @@ _edje_object_collect(Edje *ed)
rp = _edje_real_part_recursive_get(ed, eud->part);
if (rp->part->type != EDJE_PART_TYPE_TABLE) continue ;
- _edje_real_part_table_unpack(rp, eud->u.table.child);
+ _edje_real_part_table_unpack(eud->ed, rp, eud->u.table.child);
break;
}
case EDJE_USER_SWALLOW:
@@ -1275,7 +1274,7 @@ _edje_file_del(Edje *ed)
#endif
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
- _edje_entry_real_part_shutdown(rp);
+ _edje_entry_real_part_shutdown(ed, rp);
if ((rp->type == EDJE_RP_TYPE_CONTAINER) &&
(rp->typedata.container))
@@ -1366,7 +1365,7 @@ _edje_file_del(Edje *ed)
}
eina_mempool_free(_edje_real_part_state_mp, rp->custom);
- _edje_unref(rp->edje);
+ _edje_unref(ed);
eina_cow_free(_edje_calc_params_map_cow, rp->param1.p.map);
#ifdef HAVE_EPHYSICS
eina_cow_free(_edje_calc_params_physics_cow, rp->param1.p.physics);
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 452e56dcc4..3e4605b168 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1517,22 +1517,18 @@ struct _Edje_Real_Part_Swallow
struct _Edje_Real_Part
{
- Edje *edje; // 4
+ Edje_Real_Part_State param1; // 32
+ Edje_Real_Part_State *param2, *custom; // 8
Edje_Part *part; // 4
- int x, y, w, h; // 16
- Edje_Rectangle req; // 16
Evas_Object *object; // 4
Evas_Object *nested_smart; // 4
Edje_Real_Part_Drag *drag; // 4
- Edje_Real_Part *events_to; // 4
- FLOAT_T description_pos; // 8
Edje_Part_Description_Common *chosen_description; // 4
- Edje_Real_Part_State param1; // 32
// WITH EDJE_CALC_CACHE: 307
- Edje_Real_Part_State *param2, *custom; // 8
+ Edje_Running_Program *program; // 4
Edje_Calc_Params *current; // 4
+ Edje_Real_Part *events_to; // 4
Edje_Real_Part *clip_to; // 4
- Edje_Running_Program *program; // 4
#ifdef HAVE_EPHYSICS
Edje_Part_Description_Common *prev_description; // 4
EPhysics_Body *body; // 4
@@ -1543,14 +1539,17 @@ struct _Edje_Real_Part
Edje_Real_Part_Container *container;
Edje_Real_Part_Swallow *swallow;
} typedata; // 4
+ FLOAT_T description_pos; // 8
+ Edje_Rectangle req; // 16
+ int x, y, w, h; // 16
int clicked_button; // 4
#ifdef EDJE_CALC_CACHE
int state; // 4
#endif
unsigned char type; // 1
- unsigned char calculated; // 1
- unsigned char calculating; // 1
- unsigned char still_in : 1; // 1
+ unsigned char calculated : 2; // 1
+ unsigned char calculating : 2; // 0
+ unsigned char still_in : 1; // 0
#ifdef EDJE_CALC_CACHE
unsigned char invalidate : 1; // 0
#endif
@@ -2012,7 +2011,7 @@ int _edje_block_break(Edje *ed);
void _edje_block_violate(Edje *ed);
void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
void _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
-void _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow, Eina_Bool hints_update);
+void _edje_real_part_swallow(Edje *ed, Edje_Real_Part *rp, Evas_Object *obj_swallow, Eina_Bool hints_update);
void _edje_real_part_swallow_clear(Edje_Real_Part *rp);
void _edje_box_init(void);
void _edje_box_shutdown(void);
@@ -2023,19 +2022,19 @@ void _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object
Edje_Part_Box_Animation * _edje_box_layout_anim_new(Evas_Object *box);
void _edje_box_layout_free_data(void *data);
-Eina_Bool _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj);
-Eina_Bool _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj);
-Eina_Bool _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
-Eina_Bool _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
-Evas_Object *_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj);
-Evas_Object *_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos);
-Eina_Bool _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear);
-Eina_Bool _edje_real_part_table_pack(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
-Eina_Bool _edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj);
-void _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear);
+Eina_Bool _edje_real_part_box_append(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
+Eina_Bool _edje_real_part_box_prepend(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
+Eina_Bool _edje_real_part_box_insert_before(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
+Eina_Bool _edje_real_part_box_insert_at(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
+Evas_Object *_edje_real_part_box_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
+Evas_Object *_edje_real_part_box_remove_at(Edje *ed, Edje_Real_Part *rp, unsigned int pos);
+Eina_Bool _edje_real_part_box_remove_all(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear);
+Eina_Bool _edje_real_part_table_pack(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
+Eina_Bool _edje_real_part_table_unpack(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
+void _edje_real_part_table_clear(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear);
Evas_Object *_edje_children_get(Edje_Real_Part *rp, const char *partid);
-Eina_Bool _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
+Eina_Bool _edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
char *_edje_text_escape(const char *text);
char *_edje_text_unescape(const char *text);
@@ -2229,9 +2228,9 @@ void _edje_lua_script_only_message(Edje *ed, Edje_Message *em);
void _edje_entry_init(Edje *ed);
void _edje_entry_shutdown(Edje *ed);
-void _edje_entry_real_part_init(Edje_Real_Part *rp);
-void _edje_entry_real_part_shutdown(Edje_Real_Part *rp);
-void _edje_entry_real_part_configure(Edje_Real_Part *rp);
+void _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp);
+void _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp);
+void _edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp);
const char *_edje_entry_selection_get(Edje_Real_Part *rp);
const char *_edje_entry_text_get(Edje_Real_Part *rp);
void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 6d6606b775..5d21c644ce 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -1,8 +1,8 @@
#include "edje_private.h"
static void _edje_emit_cb(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Data *data, Eina_Bool prop);
-static void _edje_param_copy(Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part *dst_part, const char *dst_param);
-static void _edje_param_set(Edje_Real_Part *part, const char *param, const char *value);
+static void _edje_param_copy(Edje *ed, Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part *dst_part, const char *dst_param);
+static void _edje_param_set(Edje *ed, Edje_Real_Part *part, const char *param, const char *value);
int _edje_anim_count = 0;
Ecore_Animator *_edje_timer = NULL;
@@ -873,7 +873,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
src_part = ed->table_parts[pr->param.src % ed->table_parts_size];
dst_part = ed->table_parts[pr->param.dst % ed->table_parts_size];
- _edje_param_copy(src_part, pr->state, dst_part, pr->state2);
+ _edje_param_copy(ed, src_part, pr->state, dst_part, pr->state2);
if (_edje_block_break(ed)) goto break_prog;
// _edje_emit(ed, "program,stop", pr->name);
@@ -888,7 +888,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
if (_edje_block_break(ed)) goto break_prog;
part = ed->table_parts[pr->param.dst % ed->table_parts_size];
- _edje_param_set(part, pr->state, pr->state2);
+ _edje_param_set(ed, part, pr->state, pr->state2);
if (_edje_block_break(ed)) goto break_prog;
// _edje_emit(ed, "program,stop", pr->name);
@@ -1498,7 +1498,7 @@ _edje_param_external_get(Edje_Real_Part *rp, const char *name, Edje_External_Par
/* simulate external properties for native objects */
static Edje_External_Param *
-_edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param *param, void **free_ptr)
+_edje_param_native_get(Edje *ed, Edje_Real_Part *rp, const char *name, Edje_External_Param *param, void **free_ptr)
{
*free_ptr = NULL;
if ((rp->part->type == EDJE_PART_TYPE_TEXT) ||
@@ -1509,7 +1509,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_STRING;
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
param->s = _edje_entry_text_get(rp);
else if ((rp->part->type == EDJE_PART_TYPE_TEXT) &&
@@ -1527,7 +1527,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_STRING;
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
const char *tmp = _edje_entry_text_get(rp);
@@ -1576,7 +1576,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
{
double d;
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
d = TO_DOUBLE(rp->drag->val.x);
if (rp->part->dragable.x < 0) d = 1.0 - d;
param->name = name;
@@ -1588,7 +1588,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
{
double d;
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
d = TO_DOUBLE(rp->drag->val.y);
if (rp->part->dragable.y < 0) d = 1.0 - d;
param->name = name;
@@ -1599,7 +1599,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
if (!strcmp(sub_name, "size_w"))
{
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
param->d = TO_DOUBLE(rp->drag->size.x);
@@ -1607,7 +1607,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
}
if (!strcmp(sub_name, "size_h"))
{
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
param->d = TO_DOUBLE(rp->drag->size.y);
@@ -1616,7 +1616,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
if (!strcmp(sub_name, "step_x"))
{
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
param->d = TO_DOUBLE(rp->drag->step.x);
@@ -1624,7 +1624,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
}
if (!strcmp(sub_name, "step_y"))
{
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
param->d = TO_DOUBLE(rp->drag->step.y);
@@ -1633,7 +1633,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
if (!strcmp(sub_name, "page_x"))
{
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
param->d = TO_DOUBLE(rp->drag->page.x);
@@ -1641,7 +1641,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
}
if (!strcmp(sub_name, "page_y"))
{
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
param->name = name;
param->type = EDJE_EXTERNAL_PARAM_TYPE_DOUBLE;
param->d = TO_DOUBLE(rp->drag->page.y);
@@ -1656,7 +1656,7 @@ _edje_param_native_get(Edje_Real_Part *rp, const char *name, Edje_External_Param
}
static Eina_Bool
-_edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External_Param *param)
+_edje_param_native_set(Edje *ed, Edje_Real_Part *rp, const char *name, const Edje_External_Param *param)
{
if ((rp->part->type == EDJE_PART_TYPE_TEXT) ||
(rp->part->type == EDJE_PART_TYPE_TEXTBLOCK))
@@ -1666,8 +1666,7 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External
if (param->type != EDJE_EXTERNAL_PARAM_TYPE_STRING)
return EINA_FALSE;
- _edje_object_part_text_raw_set
- (rp->edje->obj, rp, rp->part->name, param->s);
+ _edje_object_part_text_raw_set(ed, ed->obj, rp, rp->part->name, param->s);
return EINA_TRUE;
}
if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
@@ -1678,13 +1677,11 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External
return EINA_FALSE;
if (rp->part->type == EDJE_PART_TYPE_TEXT)
- _edje_object_part_text_raw_set
- (rp->edje->obj, rp, rp->part->name, param->s);
+ _edje_object_part_text_raw_set(ed, ed->obj, rp, rp->part->name, param->s);
else
{
char *escaped = _edje_text_escape(param->s);
- _edje_object_part_text_raw_set
- (rp->edje->obj, rp, rp->part->name, escaped);
+ _edje_object_part_text_raw_set(ed, ed->obj, rp, rp->part->name, escaped);
free(escaped);
}
@@ -1725,8 +1722,8 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External
rp->invalidate = 1;
#endif
_edje_dragable_pos_set
- (rp->edje, rp, rp->drag->val.x, rp->drag->val.y);
- _edje_emit(rp->edje, "drag,set", rp->part->name);
+ (ed, rp, rp->drag->val.x, rp->drag->val.y);
+ _edje_emit(ed, "drag,set", rp->part->name);
return EINA_TRUE;
}
if (!strcmp(sub_name, "value_y"))
@@ -1744,8 +1741,8 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External
rp->invalidate = 1;
#endif
_edje_dragable_pos_set
- (rp->edje, rp, rp->drag->val.x, rp->drag->val.y);
- _edje_emit(rp->edje, "drag,set", rp->part->name);
+ (ed, rp, rp->drag->val.x, rp->drag->val.y);
+ _edje_emit(ed, "drag,set", rp->part->name);
return EINA_TRUE;
}
@@ -1754,12 +1751,12 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External
if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
return EINA_FALSE;
rp->drag->size.x = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0));
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc(ed);
return EINA_TRUE;
}
if (!strcmp(sub_name, "size_h"))
@@ -1767,12 +1764,12 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External
if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
return EINA_FALSE;
rp->drag->size.y = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0));
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc(ed);
return EINA_TRUE;
}
@@ -2079,7 +2076,7 @@ _edje_param_validate(const Edje_External_Param *param, const Edje_External_Param
}
static void
-_edje_param_copy(Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part *dst_part, const char *dst_param)
+_edje_param_copy(Edje *ed, Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part *dst_part, const char *dst_param)
{
Edje_External_Param val;
const Edje_External_Param_Info *dst_info;
@@ -2115,7 +2112,7 @@ _edje_param_copy(Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part
}
else
{
- if (!_edje_param_native_get(src_part, src_param, &val, &free_ptr))
+ if (!_edje_param_native_get(ed, src_part, src_param, &val, &free_ptr))
{
ERR("cannot get parameter '%s' of part '%s'",
src_param, src_part->part->name);
@@ -2151,7 +2148,7 @@ _edje_param_copy(Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part
}
else
{
- if (!_edje_param_native_set(dst_part, dst_param, &val))
+ if (!_edje_param_native_set(ed, dst_part, dst_param, &val))
{
ERR("failed to set parameter '%s' (%s) of part '%s'",
dst_param, edje_external_param_type_str(dst_info->type),
@@ -2165,7 +2162,7 @@ _edje_param_copy(Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part
}
static void
-_edje_param_set(Edje_Real_Part *part, const char *param, const char *value)
+_edje_param_set(Edje *ed, Edje_Real_Part *part, const char *param, const char *value)
{
Edje_External_Param val;
const Edje_External_Param_Info *info;
@@ -2218,7 +2215,7 @@ _edje_param_set(Edje_Real_Part *part, const char *param, const char *value)
}
else
{
- if (!_edje_param_native_set(part, param, &val))
+ if (!_edje_param_native_set(ed, part, param, &val))
{
ERR("failed to set parameter '%s' (%s) of part '%s'",
param, edje_external_param_type_str(info->type),
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 9ee44cd33b..61ff75a85e 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -184,7 +184,7 @@ _edje_smart_move(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
ed->x + ep->x,
ed->y + ep->y);
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
- _edje_entry_real_part_configure(ep);
+ _edje_entry_real_part_configure(ed, ep);
if ((ep->type == EDJE_RP_TYPE_SWALLOW) &&
(ep->typedata.swallow))
{
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 83baf0dc94..d401bf1123 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -47,8 +47,7 @@ static Eina_Bool _edje_text_class_list_foreach(const Eina_Hash *hash, const void
static void _edje_object_image_preload_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _edje_object_signal_preload_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _edje_user_def_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *child EINA_UNUSED, void *einfo EINA_UNUSED);
-static void _edje_table_child_remove(Edje_Real_Part *rp, Evas_Object *child);
-static void _edje_box_child_remove(Edje_Real_Part *rp, Evas_Object *child);
+static void _edje_child_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child);
Edje_Real_Part *_edje_real_part_recursive_get_helper(const Edje *ed, char **path);
@@ -103,23 +102,23 @@ _edje_user_definition_free(Edje_User_Defined *eud)
rp->typedata.swallow->swallow_params.max.w = 0;
rp->typedata.swallow->swallow_params.max.h = 0;
}
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
+ eud->ed->dirty = EINA_TRUE;
+ eud->ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(eud->ed);
}
break;
case EDJE_USER_BOX_PACK:
child = eud->u.box.child;
rp = _edje_real_part_recursive_get(eud->ed, eud->part);
- _edje_box_child_remove(rp, child);
+ _edje_child_remove(eud->ed, rp, child);
break;
case EDJE_USER_TABLE_PACK:
child = eud->u.table.child;
rp = _edje_real_part_recursive_get(eud->ed, eud->part);
- _edje_table_child_remove(rp, child);
+ _edje_child_remove(eud->ed, rp, child);
break;
case EDJE_USER_STRING:
case EDJE_USER_DRAG_STEP:
@@ -1285,7 +1284,7 @@ _text_change_cb_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
}
Eina_Bool
-_edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text)
+_edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text)
{
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return EINA_TRUE;
@@ -1303,20 +1302,20 @@ _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char
_edje_entry_text_markup_set(rp, text);
else
if (text) rp->typedata.text->text = eina_stringshare_add(text);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->recalc_hints = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->recalc_hints = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
- if (rp->edje->text_change.func)
- rp->edje->text_change.func(rp->edje->text_change.data, obj, part);
+ _edje_recalc(ed);
+ if (ed->text_change.func)
+ ed->text_change.func(ed->text_change.data, obj, part);
return EINA_TRUE;
}
Eina_Bool
-_edje_object_part_text_raw_append(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text)
+_edje_object_part_text_raw_append(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text)
{
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return EINA_TRUE;
@@ -1341,14 +1340,14 @@ _edje_object_part_text_raw_append(Evas_Object *obj, Edje_Real_Part *rp, const ch
eina_stringshare_replace(&rp->typedata.text->text, text);
}
}
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = 1;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
- if (rp->edje->text_change.func)
- rp->edje->text_change.func(rp->edje->text_change.data, obj, part);
+ _edje_recalc(ed);
+ if (ed->text_change.func)
+ ed->text_change.func(ed->text_change.data, obj, part);
return EINA_TRUE;
}
@@ -1498,7 +1497,7 @@ _part_text_set(Eo *obj, void *_pd, va_list *list)
if (ret) *ret = EINA_TRUE;
return;
}
- r = _edje_object_part_text_raw_set(obj, rp, part, text);
+ r = _edje_object_part_text_raw_set(ed, obj, rp, part, text);
_edje_user_define_string(ed, part, rp->typedata.text->text);
if (ret) *ret = r;
}
@@ -1625,15 +1624,14 @@ _part_text_escaped_set(Eo *obj, void *_pd, va_list *list)
}
p++;
}
- int_ret = _edje_object_part_text_raw_set
- (obj, rp, part, eina_strbuf_string_get(sbuf));
+ int_ret = _edje_object_part_text_raw_set(ed, obj, rp, part, eina_strbuf_string_get(sbuf));
_edje_user_define_string(ed, part, rp->typedata.text->text);
eina_strbuf_free(sbuf);
if (ret) *ret = int_ret;
return;
}
if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return;
- int_ret = _edje_object_part_text_raw_set(obj, rp, part, text);
+ int_ret = _edje_object_part_text_raw_set(ed, obj, rp, part, text);
_edje_user_define_string(ed, part, rp->typedata.text->text);
if (ret) *ret = int_ret;
}
@@ -1773,12 +1771,12 @@ _part_text_unescaped_set(Eo *obj, void *_pd, va_list *list)
if ((rp->type != EDJE_RP_TYPE_TEXT) ||
(!rp->typedata.text)) return;
if (rp->part->type == EDJE_PART_TYPE_TEXT)
- int_ret = _edje_object_part_text_raw_set(obj, rp, part, text_to_escape);
+ int_ret = _edje_object_part_text_raw_set(ed, obj, rp, part, text_to_escape);
else if (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
{
char *text = _edje_text_escape(text_to_escape);
- int_ret = _edje_object_part_text_raw_set(obj, rp, part, text);
+ int_ret = _edje_object_part_text_raw_set(ed, obj, rp, part, text);
free(text);
}
_edje_user_define_string(ed, part, rp->typedata.text->text);
@@ -1922,15 +1920,15 @@ _part_text_insert(Eo *obj, void *_pd, va_list *list)
if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return;
if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return;
_edje_entry_text_markup_insert(rp, text);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->recalc_hints = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->recalc_hints = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
- if (rp->edje->text_change.func)
- rp->edje->text_change.func(rp->edje->text_change.data, obj, part);
+ _edje_recalc(ed);
+ if (ed->text_change.func)
+ ed->text_change.func(ed->text_change.data, obj, part);
}
EAPI void
@@ -1952,16 +1950,16 @@ _part_text_append(Eo *obj, void *_pd, va_list *list)
rp = _edje_real_part_recursive_get(ed, part);
if (!rp) return;
if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return;
- _edje_object_part_text_raw_append(obj, rp, part, text);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->recalc_hints = EINA_TRUE;
+ _edje_object_part_text_raw_append(ed, obj, rp, part, text);
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->recalc_hints = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
- if (rp->edje->text_change.func)
- rp->edje->text_change.func(rp->edje->text_change.data, obj, part);
+ _edje_recalc(ed);
+ if (ed->text_change.func)
+ ed->text_change.func(ed->text_change.data, obj, part);
}
EAPI const Eina_List *
@@ -2101,8 +2099,8 @@ _part_text_cursor_geometry_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
{
_edje_entry_cursor_geometry_get(rp, x, y, w, h);
- if (x) *x -= rp->edje->x;
- if (y) *y -= rp->edje->y;
+ if (x) *x -= ed->x;
+ if (y) *y -= ed->y;
}
}
@@ -3386,7 +3384,7 @@ _part_swallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (rp)
{
/* The object is already swallowed somewhere, unswallow it first */
- edje_object_part_unswallow(rp->edje->obj, obj_swallow);
+ edje_object_part_unswallow(ed->obj, obj_swallow);
}
rp = _edje_real_part_recursive_get(ed, part);
@@ -3402,7 +3400,7 @@ _part_swallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
}
if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
(!rp->typedata.swallow)) return;
- _edje_real_part_swallow(rp, obj_swallow, EINA_TRUE);
+ _edje_real_part_swallow(ed, rp, obj_swallow, EINA_TRUE);
if (rp->typedata.swallow->swallowed_object)
{
@@ -3705,6 +3703,7 @@ void
_part_unswallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
Evas_Object *obj_swallow = va_arg(*list, Evas_Object *);
+ Edje *ed = _pd;
Edje_Real_Part *rp;
if (!obj_swallow) return;
@@ -3728,8 +3727,6 @@ _part_unswallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (obj)
{
- Edje *ed = _pd;
-
if (!ed && obj)
{
ERR("edje_object_part_unswallow called on a non Edje object ('%s').",
@@ -3752,12 +3749,12 @@ _part_unswallow(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
rp->typedata.swallow->swallow_params.min.h = 0;
rp->typedata.swallow->swallow_params.max.w = 0;
rp->typedata.swallow->swallow_params.max.h = 0;
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc_do(rp->edje);
+ _edje_recalc_do(ed);
return;
}
}
@@ -4286,8 +4283,8 @@ _part_drag_value_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_dragable_pos_set(rp->edje, rp, rp->drag->val.x, rp->drag->val.y);
- _edje_emit(rp->edje, "drag,set", rp->part->name);
+ _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
+ _edje_emit(ed, "drag,set", rp->part->name);
if (ret) *ret = EINA_TRUE;
}
@@ -4394,12 +4391,12 @@ _part_drag_size_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
}
rp->drag->size.x = FROM_DOUBLE(dw);
rp->drag->size.y = FROM_DOUBLE(dh);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc(ed);
if (ret) *ret = EINA_TRUE;
}
@@ -4703,8 +4700,8 @@ _part_drag_step(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_dragable_pos_set(rp->edje, rp, rp->drag->val.x, rp->drag->val.y);
- _edje_emit(rp->edje, "drag,step", rp->part->name);
+ _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
+ _edje_emit(ed, "drag,step", rp->part->name);
if (ret) *ret = EINA_TRUE;
}
@@ -4768,8 +4765,8 @@ _part_drag_page(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_dragable_pos_set(rp->edje, rp, rp->drag->val.x, rp->drag->val.y);
- _edje_emit(rp->edje, "drag,page", rp->part->name);
+ _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
+ _edje_emit(ed, "drag,page", rp->part->name);
if (ret) *ret = EINA_TRUE;
}
@@ -4815,7 +4812,7 @@ _part_box_append(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- if (_edje_real_part_box_append(rp, child))
+ if (_edje_real_part_box_append(ed, rp, child))
{
Edje_User_Defined *eud;
@@ -4854,7 +4851,7 @@ _part_box_prepend(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- if (_edje_real_part_box_prepend(rp, child))
+ if (_edje_real_part_box_prepend(ed, rp, child))
{
Edje_User_Defined *eud;
@@ -4893,7 +4890,7 @@ _part_box_insert_before(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- if (_edje_real_part_box_insert_before(rp, child, reference))
+ if (_edje_real_part_box_insert_before(ed, rp, child, reference))
{
Edje_User_Defined *eud;
@@ -4932,7 +4929,7 @@ _part_box_insert_at(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- if (_edje_real_part_box_insert_at(rp, child, pos))
+ if (_edje_real_part_box_insert_at(ed, rp, child, pos))
{
Edje_User_Defined *eud;
@@ -4971,7 +4968,7 @@ _part_box_remove(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- r = _edje_real_part_box_remove(rp, child);
+ r = _edje_real_part_box_remove(ed, rp, child);
if (r)
{
@@ -5015,7 +5012,7 @@ _part_box_remove_at(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- r = _edje_real_part_box_remove_at(rp, pos);
+ r = _edje_real_part_box_remove_at(ed, rp, pos);
if (r)
{
@@ -5058,7 +5055,7 @@ _part_box_remove_all(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_BOX) return;
- if (_edje_real_part_box_remove_all(rp, clear))
+ if (_edje_real_part_box_remove_all(ed, rp, clear))
{
if (ret) *ret = EINA_TRUE;
Edje_User_Defined *eud;
@@ -5105,48 +5102,73 @@ _access_part_list_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
}
static void
-_edje_box_child_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *child EINA_UNUSED, void *einfo EINA_UNUSED)
+_edje_child_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *child, void *einfo EINA_UNUSED)
{
Edje_Real_Part *rp = data;
+ Edje_User_Defined *eud;
+ Eina_List *l;
+ Edje *ed = evas_object_data_get(child, ".edje");
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
+ EINA_LIST_FOREACH(ed->user_defined, l, eud)
+ if (rp->part->type == EDJE_PART_TYPE_BOX)
+ {
+ if (eud->type == EDJE_USER_BOX_PACK &&
+ eud->u.box.child == child &&
+ !strcmp(rp->part->name, eud->part))
+ {
+ _edje_user_definition_free(eud);
+ break;
+ }
+ }
+ else if (rp->part->type == EDJE_PART_TYPE_TABLE)
+ {
+ if (eud->type == EDJE_USER_TABLE_PACK &&
+ eud->u.table.child == child &&
+ !strcmp(rp->part->name, eud->part))
+ {
+ _edje_user_definition_free(eud);
+ break;
+ }
+ }
+
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc(ed);
}
static void
-_edje_box_child_add(Edje_Real_Part *rp, Evas_Object *child)
+_edje_child_add(Edje *ed, Edje_Real_Part *rp, Evas_Object *child)
{
- evas_object_event_callback_add
- (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp);
+ evas_object_event_callback_add(child, EVAS_CALLBACK_DEL, _edje_child_del_cb, rp);
+ evas_object_data_set(child, ".edje", ed);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc(ed);
}
static void
-_edje_box_child_remove(Edje_Real_Part *rp, Evas_Object *child)
+_edje_child_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child)
{
- evas_object_event_callback_del_full
- (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp);
+ evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, _edje_child_del_cb, rp);
+ evas_object_data_del(child, ".edje");
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
- _edje_recalc(rp->edje);
+ _edje_recalc(ed);
}
Eina_Bool
-_edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj)
+_edje_real_part_box_append(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj)
{
Evas_Object_Box_Option *opt;
@@ -5159,13 +5181,13 @@ _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj)
return EINA_FALSE;
}
- _edje_box_child_add(rp, child_obj);
+ _edje_child_add(ed, rp, child_obj);
return EINA_TRUE;
}
Eina_Bool
-_edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj)
+_edje_real_part_box_prepend(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj)
{
Evas_Object_Box_Option *opt;
@@ -5178,13 +5200,13 @@ _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj)
return EINA_FALSE;
}
- _edje_box_child_add(rp, child_obj);
+ _edje_child_add(ed, rp, child_obj);
return EINA_TRUE;
}
Eina_Bool
-_edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref)
+_edje_real_part_box_insert_before(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref)
{
Evas_Object_Box_Option *opt;
@@ -5197,13 +5219,13 @@ _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, co
return EINA_FALSE;
}
- _edje_box_child_add(rp, child_obj);
+ _edje_child_add(ed, rp, child_obj);
return EINA_TRUE;
}
Eina_Bool
-_edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos)
+_edje_real_part_box_insert_at(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos)
{
Evas_Object_Box_Option *opt;
@@ -5216,23 +5238,23 @@ _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsign
return EINA_FALSE;
}
- _edje_box_child_add(rp, child_obj);
+ _edje_child_add(ed, rp, child_obj);
return EINA_TRUE;
}
Evas_Object *
-_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj)
+_edje_real_part_box_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj)
{
if (evas_object_data_get(child_obj, "\377 edje.box_item")) return NULL;
if (!evas_object_box_remove(rp->object, child_obj)) return NULL;
_edje_box_layout_remove_child(rp, child_obj);
- _edje_box_child_remove(rp, child_obj);
+ _edje_child_remove(ed, rp, child_obj);
return child_obj;
}
Evas_Object *
-_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos)
+_edje_real_part_box_remove_at(Edje *ed, Edje_Real_Part *rp, unsigned int pos)
{
Evas_Object_Box_Option *opt;
Evas_Object_Box_Data *priv;
@@ -5245,12 +5267,12 @@ _edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos)
if (evas_object_data_get(child_obj, "\377 edje.box_item")) return NULL;
if (!evas_object_box_remove_at(rp->object, pos)) return NULL;
_edje_box_layout_remove_child(rp, child_obj);
- _edje_box_child_remove(rp, child_obj);
+ _edje_child_remove(ed, rp, child_obj);
return child_obj;
}
Eina_Bool
-_edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear)
+_edje_real_part_box_remove_all(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear)
{
Eina_List *children;
int i = 0;
@@ -5264,7 +5286,7 @@ _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear)
else
{
_edje_box_layout_remove_child(rp, child_obj);
- _edje_box_child_remove(rp, child_obj);
+ _edje_child_remove(ed, rp, child_obj);
if (!evas_object_box_remove_at(rp->object, i))
return EINA_FALSE;
if (clear)
@@ -5275,71 +5297,6 @@ _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear)
return EINA_TRUE;
}
-static void
-_edje_table_child_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *child, void *einfo EINA_UNUSED)
-{
- Edje_User_Defined *eud;
- Eina_List *l;
- Edje_Real_Part *rp = data;
-
- EINA_LIST_FOREACH(rp->edje->user_defined, l, eud)
- if (rp->part->type == EDJE_PART_TYPE_BOX)
- {
- if (eud->type == EDJE_USER_BOX_PACK &&
- eud->u.box.child == child &&
- !strcmp(rp->part->name, eud->part))
- {
- _edje_user_definition_free(eud);
- break;
- }
- }
- else if (rp->part->type == EDJE_PART_TYPE_TABLE)
- {
- if (eud->type == EDJE_USER_TABLE_PACK &&
- eud->u.table.child == child &&
- !strcmp(rp->part->name, eud->part))
- {
- _edje_user_definition_free(eud);
- break;
- }
- }
-
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
-#ifdef EDJE_CALC_CACHE
- rp->invalidate = 1;
-#endif
- _edje_recalc(rp->edje);
-}
-
-static void
-_edje_table_child_add(Edje_Real_Part *rp, Evas_Object *child)
-{
- evas_object_event_callback_add
- (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp);
-
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
-#ifdef EDJE_CALC_CACHE
- rp->invalidate = 1;
-#endif
- _edje_recalc(rp->edje);
-}
-
-static void
-_edje_table_child_remove(Edje_Real_Part *rp, Evas_Object *child)
-{
- evas_object_event_callback_del_full
- (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp);
-
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
-#ifdef EDJE_CALC_CACHE
- rp->invalidate = 1;
-#endif
- _edje_recalc(rp->edje);
-}
-
EAPI Evas_Object *
edje_object_part_table_child_get(const Evas_Object *obj, const char *part, unsigned int col, unsigned int row)
{
@@ -5399,7 +5356,7 @@ _part_table_pack(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_TABLE) return;
- if (_edje_real_part_table_pack(rp, child_obj, col, row, colspan, rowspan))
+ if (_edje_real_part_table_pack(ed, rp, child_obj, col, row, colspan, rowspan))
{
if (ret) *ret = EINA_TRUE;
eud = _edje_user_definition_new(EDJE_USER_TABLE_PACK, part, ed);
@@ -5440,7 +5397,7 @@ _part_table_unpack(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_TABLE) return;
- if (_edje_real_part_table_unpack(rp, child_obj))
+ if (_edje_real_part_table_unpack(ed, rp, child_obj))
{
if (ret) *ret = EINA_TRUE;
Edje_User_Defined *eud;
@@ -5512,7 +5469,7 @@ _part_table_clear(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_TABLE) return;
- _edje_real_part_table_clear(rp, clear);
+ _edje_real_part_table_clear(ed, rp, clear);
if (ret) *ret = EINA_TRUE;
}
@@ -5850,29 +5807,29 @@ _update_hints_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
}
Eina_Bool
-_edje_real_part_table_pack(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
+_edje_real_part_table_pack(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
{
Eina_Bool ret =
evas_object_table_pack(rp->object, child_obj, col, row, colspan, rowspan);
- _edje_table_child_add(rp, child_obj);
+ _edje_child_add(ed, rp, child_obj);
return ret;
}
Eina_Bool
-_edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj)
+_edje_real_part_table_unpack(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj)
{
Eina_Bool ret = evas_object_table_unpack(rp->object, child_obj);
if (ret)
- _edje_table_child_remove(rp, child_obj);
+ _edje_child_remove(ed, rp, child_obj);
return ret;
}
void
-_edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear)
+_edje_real_part_table_clear(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear)
{
Eina_List *children;
@@ -5881,10 +5838,10 @@ _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear)
{
Evas_Object *child_obj = children->data;
- _edje_table_child_remove(rp, child_obj);
+ _edje_child_remove(ed, rp, child_obj);
if (!evas_object_data_get(child_obj, "\377 edje.table_item"))
{
- evas_object_table_unpack(rp->object, child_obj);
+ evas_object_table_unpack(rp->object, child_obj);
if (clear)
evas_object_del(child_obj);
}
@@ -6292,15 +6249,15 @@ _edje_block_violate(Edje *ed)
}
void
-_edje_object_part_swallow_free_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_edje_object_part_swallow_free_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
- Edje_Real_Part *rp;
Edje_User_Defined *eud;
Eina_List *l;
+ Edje *ed;
- rp = data;
+ ed = evas_object_data_get(obj, ".edje");
- EINA_LIST_FOREACH(rp->edje->user_defined, l, eud)
+ EINA_LIST_FOREACH(ed->user_defined, l, eud)
if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj)
{
_edje_user_definition_free(eud);
@@ -6389,16 +6346,19 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
}
void
-_edje_object_part_swallow_changed_hints_cb(void *data, EINA_UNUSED Evas *e, EINA_UNUSED Evas_Object *obj, EINA_UNUSED void *event_info)
+_edje_object_part_swallow_changed_hints_cb(void *data, EINA_UNUSED Evas *e, Evas_Object *obj, EINA_UNUSED void *event_info)
{
Edje_Real_Part *rp;
+ Edje *ed;
rp = data;
+ ed = evas_object_data_get(obj, ".edje");
+
_edje_real_part_swallow_hints_update(rp);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->recalc_hints = EINA_TRUE;
- _edje_recalc(rp->edje);
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->recalc_hints = EINA_TRUE;
+ _edje_recalc(ed);
return;
}
@@ -6428,7 +6388,8 @@ _edje_object_part_swallow_image_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_
}
void
-_edje_real_part_swallow(Edje_Real_Part *rp,
+_edje_real_part_swallow(Edje *ed,
+ Edje_Real_Part *rp,
Evas_Object *obj_swallow,
Eina_Bool hints_update)
{
@@ -6438,16 +6399,16 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
{
if (rp->typedata.swallow->swallowed_object != obj_swallow)
{
- edje_object_part_unswallow(rp->edje->obj, rp->typedata.swallow->swallowed_object);
+ edje_object_part_unswallow(ed->obj, rp->typedata.swallow->swallowed_object);
}
else
{
if (hints_update)
_edje_real_part_swallow_hints_update(rp);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->recalc_hints = EINA_TRUE;
- _edje_recalc(rp->edje);
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->recalc_hints = EINA_TRUE;
+ _edje_recalc(ed);
return;
}
}
@@ -6456,10 +6417,10 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
#endif
if (!obj_swallow) return;
rp->typedata.swallow->swallowed_object = obj_swallow;
- evas_object_smart_member_add(rp->typedata.swallow->swallowed_object, rp->edje->obj);
+ evas_object_smart_member_add(rp->typedata.swallow->swallowed_object, ed->obj);
if (rp->clip_to)
evas_object_clip_set(rp->typedata.swallow->swallowed_object, rp->clip_to->object);
- else evas_object_clip_set(rp->typedata.swallow->swallowed_object, rp->edje->base->clipper);
+ else evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base->clipper);
evas_object_stack_above(rp->typedata.swallow->swallowed_object, rp->object);
evas_object_event_callback_add(rp->typedata.swallow->swallowed_object,
EVAS_CALLBACK_DEL,
@@ -6469,6 +6430,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_edje_object_part_swallow_changed_hints_cb,
rp);
+ evas_object_data_set(rp->typedata.swallow->swallowed_object, ".edje", ed);
//If the map is enabled, uv should be updated when image size is changed.
if (eo_isa(rp->typedata.swallow->swallowed_object, EVAS_OBJ_IMAGE_CLASS))
@@ -6481,7 +6443,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
if (rp->part->mouse_events)
{
- _edje_callbacks_add(obj_swallow, rp->edje, rp);
+ _edje_callbacks_add(obj_swallow, ed, rp);
if (rp->part->repeat_events)
evas_object_repeat_events_set(obj_swallow, 1);
if (rp->part->pointer_mode != EVAS_OBJECT_POINTER_MODE_AUTOGRAB)
@@ -6490,20 +6452,22 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
}
else
evas_object_pass_events_set(obj_swallow, 1);
- _edje_callbacks_focus_add(rp->typedata.swallow->swallowed_object, rp->edje, rp);
+ _edje_callbacks_focus_add(rp->typedata.swallow->swallowed_object, ed, rp);
if (rp->part->precise_is_inside)
evas_object_precise_is_inside_set(obj_swallow, 1);
- rp->edje->dirty = EINA_TRUE;
- rp->edje->recalc_call = EINA_TRUE;
- rp->edje->recalc_hints = EINA_TRUE;
- _edje_recalc(rp->edje);
+ ed->dirty = EINA_TRUE;
+ ed->recalc_call = EINA_TRUE;
+ ed->recalc_hints = EINA_TRUE;
+ _edje_recalc(ed);
}
void
_edje_real_part_swallow_clear(Edje_Real_Part *rp)
{
+ Edje *ed;
+
if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
(!rp->typedata.swallow)) return;
if (!rp->typedata.swallow->swallowed_object) return;
@@ -6516,6 +6480,7 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp)
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_edje_object_part_swallow_changed_hints_cb,
rp);
+ ed = evas_object_data_del(rp->typedata.swallow->swallowed_object, ".edje");
if (eo_isa(rp->typedata.swallow->swallowed_object, EVAS_OBJ_IMAGE_CLASS))
evas_object_event_callback_del_full(rp->typedata.swallow->swallowed_object,
EVAS_CALLBACK_IMAGE_RESIZE,
@@ -6524,8 +6489,8 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp)
evas_object_clip_unset(rp->typedata.swallow->swallowed_object);
evas_object_data_del(rp->typedata.swallow->swallowed_object, "\377 edje.swallowing_part");
if (rp->part->mouse_events)
- _edje_callbacks_del(rp->typedata.swallow->swallowed_object, rp->edje);
- _edje_callbacks_focus_del(rp->typedata.swallow->swallowed_object, rp->edje);
+ _edje_callbacks_del(rp->typedata.swallow->swallowed_object, ed);
+ _edje_callbacks_focus_del(rp->typedata.swallow->swallowed_object, ed);
rp->typedata.swallow->swallowed_object = NULL;
}