summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-06 15:14:07 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 09:57:05 +0900
commit46001cde383997bd440c1d39e95ed8ffec7074cf (patch)
tree942af55c68f3a059b4207d114d9bb289ab09bf85
parent7e2382853ee54a7e0a92a14cde52b1de5fa7313a (diff)
downloadefl-46001cde383997bd440c1d39e95ed8ffec7074cf.tar.gz
edje: Remove use of smart clipped data
This removes dependency on a legacy structure. Edje object does not change the smart data, unlike evas box and grid.
-rw-r--r--src/lib/edje/edje_calc.c6
-rw-r--r--src/lib/edje/edje_edit.c42
-rw-r--r--src/lib/edje/edje_embryo.c6
-rw-r--r--src/lib/edje/edje_entry.c36
-rw-r--r--src/lib/edje/edje_load.c50
-rw-r--r--src/lib/edje/edje_lua2.c2
-rw-r--r--src/lib/edje/edje_main.c9
-rw-r--r--src/lib/edje/edje_private.h10
-rw-r--r--src/lib/edje/edje_smart.c5
-rw-r--r--src/lib/edje/edje_util.c2
10 files changed, 78 insertions, 90 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 4ec2d0288a..8c811478b7 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -5286,7 +5286,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
else if (ep->part->clip_to_id >= 0)
evas_object_clip_set(ep->object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object);
else
- evas_object_clip_set(ep->object, ed->base->clipper);
+ evas_object_clip_set(ep->object, ed->base.clipper);
}
break;
@@ -5424,7 +5424,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE:
{
Eo *primitive = NULL;
- primitive = efl_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
+ primitive = efl_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base.evas);
evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
_edje_calc_params_need_type_node(pf);
@@ -5554,7 +5554,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
else if (ep->part->clip_to_id >= 0)
evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object);
else
- evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->base->clipper);
+ evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->base.clipper);
}
if (pf->visible)
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 16839baea5..f12eeb355c 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -541,7 +541,7 @@ _edje_import_image_file(Edje *ed, const char *path, int id)
int bytes;
/* Try to load the file */
- im = evas_object_image_add(ed->base->evas);
+ im = evas_object_image_add(ed->base.evas);
if (!im) return EINA_FALSE;
evas_object_image_file_set(im, path, NULL);
@@ -1015,7 +1015,7 @@ _edje_edit_group_references_update(Evas_Object *obj, const char *old_group_name,
// pc = ed->collection;
- part_obj = edje_edit_object_add(ed->base->evas);
+ part_obj = edje_edit_object_add(ed->base.evas);
old = eina_stringshare_add(old_group_name);
@@ -1144,7 +1144,7 @@ _delete_play_actions(Evas_Object *obj, const char *name, int action_type, Eet_Fi
if (pce->group_alias)
continue;
- eeo = edje_edit_object_add(ed->base->evas);
+ eeo = edje_edit_object_add(ed->base.evas);
if (!efl_isa(eeo, EDJE_OBJECT_CLASS))
return EINA_FALSE;
@@ -3227,23 +3227,23 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
rp->part = ep;
if (ep->type == EDJE_PART_TYPE_RECTANGLE)
- rp->object = evas_object_rectangle_add(ed->base->evas);
+ rp->object = evas_object_rectangle_add(ed->base.evas);
else if (ep->type == EDJE_PART_TYPE_VECTOR)
{
rp->type = EDJE_PART_TYPE_VECTOR;
rp->typedata.vector = calloc(1, sizeof(Edje_Real_Part_Vector));
if (rp->typedata.vector)
rp->typedata.vector->cur.svg_id = -1;
- rp->object = evas_object_vg_add(ed->base->evas);
+ rp->object = evas_object_vg_add(ed->base.evas);
}
else if (ep->type == EDJE_PART_TYPE_IMAGE || ep->type == EDJE_PART_TYPE_PROXY)
- rp->object = evas_object_image_add(ed->base->evas);
+ rp->object = evas_object_image_add(ed->base.evas);
else if (ep->type == EDJE_PART_TYPE_TEXT)
{
rp->type = EDJE_RP_TYPE_TEXT;
rp->typedata.text = calloc(1, sizeof(Edje_Real_Part_Text));
_edje_text_part_on_add(ed, rp);
- rp->object = evas_object_text_add(ed->base->evas);
+ rp->object = evas_object_text_add(ed->base.evas);
evas_object_text_font_source_set(rp->object, ed->path);
}
else if (ep->type == EDJE_PART_TYPE_SWALLOW ||
@@ -3252,7 +3252,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
{
rp->type = EDJE_RP_TYPE_SWALLOW;
rp->typedata.swallow = calloc(1, sizeof(Edje_Real_Part_Swallow));
- rp->object = evas_object_rectangle_add(ed->base->evas);
+ rp->object = evas_object_rectangle_add(ed->base.evas);
evas_object_color_set(rp->object, 0, 0, 0, 0);
evas_object_pass_events_set(rp->object, 1);
evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
@@ -3261,20 +3261,20 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
{
rp->type = EDJE_RP_TYPE_TEXT;
rp->typedata.text = calloc(1, sizeof(Edje_Real_Part_Text));
- rp->object = evas_object_textblock_add(ed->base->evas);
+ rp->object = evas_object_textblock_add(ed->base.evas);
}
else if (ep->type == EDJE_PART_TYPE_BOX)
{
rp->type = EDJE_RP_TYPE_CONTAINER;
rp->typedata.container = calloc(1, sizeof(Edje_Real_Part_Container));
- rp->object = evas_object_box_add(ed->base->evas);
+ rp->object = evas_object_box_add(ed->base.evas);
rp->typedata.container->anim = _edje_box_layout_anim_new(rp->object);
}
else if (ep->type == EDJE_PART_TYPE_TABLE)
{
rp->type = EDJE_RP_TYPE_CONTAINER;
rp->typedata.container = calloc(1, sizeof(Edje_Real_Part_Container));
- rp->object = evas_object_table_add(ed->base->evas);
+ rp->object = evas_object_table_add(ed->base.evas);
}
else if (ep->type != EDJE_PART_TYPE_SPACER)
ERR("wrong part type %i!", ep->type);
@@ -3314,8 +3314,8 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
if (child)
_edje_real_part_swallow(ed, rp, child, EINA_TRUE);
}
- evas_object_clip_set(rp->object, ed->base->clipper);
- evas_object_show(ed->base->clipper);
+ evas_object_clip_set(rp->object, ed->base.clipper);
+ evas_object_show(ed->base.clipper);
}
/* Update table_parts */
@@ -3393,7 +3393,7 @@ edje_edit_part_del(Evas_Object *obj, const char *part)
if (real->part->clip_to_id == rp->part->id)
{
- evas_object_clip_set(real->object, ed->base->clipper);
+ evas_object_clip_set(real->object, ed->base.clipper);
real->part->clip_to_id = -1;
}
if (real->drag && real->drag->confine_to == rp)
@@ -3461,7 +3461,7 @@ edje_edit_part_del(Evas_Object *obj, const char *part)
/* if all parts are gone, hide the clipper */
if (ed->table_parts_size == 0)
- evas_object_hide(ed->base->clipper);
+ evas_object_hide(ed->base.clipper);
edje_object_calc_force(obj);
@@ -3819,10 +3819,10 @@ edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_
/* unset clipping */
if (!clip_to)
{
- evas_object_clip_set(rp->object, ed->base->clipper);
+ evas_object_clip_set(rp->object, ed->base.clipper);
if ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
(rp->typedata.swallow) && (rp->typedata.swallow->swallowed_object))
- evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base->clipper);
+ evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base.clipper);
rp->part->clip_to_id = -1;
@@ -4144,7 +4144,7 @@ _check_recursive_reference(Edje *ed, const char *source, Eina_List *group_path,
pce = eina_hash_find(ed->file->collection, source);
/* forcing collection load into memory */
- Evas_Object *part_obj = edje_edit_object_add(ed->base->evas);
+ Evas_Object *part_obj = edje_edit_object_add(ed->base.evas);
edje_object_file_set(part_obj, ed->file->path, pce->entry);
/* Go through every part to find parts with type GROUP */
part_list = edje_edit_parts_list_get(part_obj);
@@ -4206,7 +4206,7 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source
}
if (source)
{
- child_obj = edje_object_add(ed->base->evas);
+ child_obj = edje_object_add(ed->base.evas);
edje_object_file_set(child_obj, ed->file->path, source);
_edje_real_part_swallow(ed, rp, child_obj, EINA_TRUE);
}
@@ -15929,7 +15929,7 @@ _edje_generate_source_of_group(Edje *ed, Edje_Part_Collection_Directory_Entry *p
const char *aliased;
double base_scale;
- obj = edje_edit_object_add(ed->base->evas);
+ obj = edje_edit_object_add(ed->base.evas);
if (!edje_object_file_set(obj, ed->file->path, group)) return EINA_FALSE;
ef = _edje_edit_eet_open(ed, EET_FILE_MODE_READ);
@@ -16661,7 +16661,7 @@ edje_edit_clean_save_as(Evas_Object *obj, const char *new_file_name)
/* copying groups */
Edje_Part_Collection_Directory_Entry *ce;
Evas_Object *part_obj;
- part_obj = edje_edit_object_add(ed->base->evas);
+ part_obj = edje_edit_object_add(ed->base.evas);
Eina_Iterator *it = eina_hash_iterator_data_new(ed->file->collection);
EINA_ITERATOR_FOREACH(it, ce)
{
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 4f6812f71b..f72899153a 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -892,7 +892,7 @@ _edje_embryo_fn_get_mouse(Embryo_Program *ep, Embryo_Cell *params)
CHKPARAM(2);
ed = embryo_program_data_get(ep);
- evas_pointer_canvas_xy_get(ed->base->evas, &x, &y);
+ evas_pointer_canvas_xy_get(ed->base.evas, &x, &y);
x -= ed->x;
y -= ed->y;
SETINT((int)x, params[1]);
@@ -908,7 +908,7 @@ _edje_embryo_fn_get_mouse_buttons(Embryo_Program *ep, Embryo_Cell *params)
CHKPARAM(0);
ed = embryo_program_data_get(ep);
- return evas_pointer_button_down_mask_get(ed->base->evas);
+ return evas_pointer_button_down_mask_get(ed->base.evas);
}
/* emit(sig[], src[]) */
@@ -3788,7 +3788,7 @@ _edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params)
rp = ed->table_parts[part_id % ed->table_parts_size];
if (!rp) return 0;
- new_obj = edje_object_add(ed->base->evas);
+ new_obj = edje_object_add(ed->base.evas);
if (!new_obj) return 0;
if (!edje_object_file_set(new_obj, ed->file->path, group_name))
diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index 403c946705..c58883667e 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -730,7 +730,7 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
en->sel = eina_list_append(en->sel, sel);
if (en->rp->part->source)
{
- ob = edje_object_add(ed->base->evas);
+ 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);
@@ -743,7 +743,7 @@ _sel_update(Edje *ed, Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entr
if (en->rp->part->source2)
{
- ob = edje_object_add(ed->base->evas);
+ 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);
@@ -1123,7 +1123,7 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
clip = evas_object_clip_get(o);
x = y = w = h = -1;
evas_object_geometry_get(o, &x, &y, &w, &h);
- evas_output_viewport_get(en->ed->base->evas, &vx, &vy, &vw, &vh);
+ evas_output_viewport_get(en->ed->base.evas, &vx, &vy, &vw, &vh);
tvw = vx + vw;
tvh = vy + vh;
@@ -1234,7 +1234,7 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
an->sel = eina_list_append(an->sel, sel);
if (en->rp->part->source5)
{
- ob = edje_object_add(ed->base->evas);
+ 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);
@@ -1246,7 +1246,7 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
if (en->rp->part->source6)
{
- ob = edje_object_add(ed->base->evas);
+ 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);
@@ -1256,7 +1256,7 @@ _anchors_update(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o, Entry *en)
_edje_subobj_register(ed, sel->obj_fg);
}
- ob = evas_object_rectangle_add(ed->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);
@@ -1327,7 +1327,7 @@ _anchors_update_check(Edje *ed, Edje_Real_Part *rp)
x = y = w = h = -1;
vx = vy = vw = vh = -1;
evas_object_geometry_get(rp->object, &x, &y, &w, &h);
- evas_output_viewport_get(ed->base->evas, &vx, &vy, &vw, &vh);
+ evas_output_viewport_get(ed->base.evas, &vx, &vy, &vw, &vh);
if (((y + h) <= vy) || (y >= (vy + vh)))
anchors_updated = EINA_TRUE;
else if (((x + w) <= vx) || (x >= (vx + vw)))
@@ -2875,9 +2875,9 @@ _edje_entry_init(Edje *ed)
_edje_key_down_cb, ed);
evas_object_event_callback_add(ed->obj, EVAS_CALLBACK_KEY_UP,
_edje_key_up_cb, ed);
- efl_event_callback_add(ed->base->evas, EFL_CANVAS_EVENT_FOCUS_IN,
+ efl_event_callback_add(ed->base.evas, EFL_CANVAS_EVENT_FOCUS_IN,
_evas_focus_in_cb, ed);
- efl_event_callback_add(ed->base->evas, EFL_CANVAS_EVENT_FOCUS_OUT,
+ efl_event_callback_add(ed->base.evas, EFL_CANVAS_EVENT_FOCUS_OUT,
_evas_focus_out_cb, ed);
}
@@ -2896,9 +2896,9 @@ _edje_entry_shutdown(Edje *ed)
_edje_key_down_cb);
evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_UP,
_edje_key_up_cb);
- efl_event_callback_del(ed->base->evas, EFL_CANVAS_EVENT_FOCUS_IN,
+ efl_event_callback_del(ed->base.evas, EFL_CANVAS_EVENT_FOCUS_IN,
_evas_focus_in_cb, ed);
- efl_event_callback_del(ed->base->evas, EFL_CANVAS_EVENT_FOCUS_OUT,
+ efl_event_callback_del(ed->base.evas, EFL_CANVAS_EVENT_FOCUS_OUT,
_evas_focus_out_cb, ed);
}
@@ -2928,7 +2928,7 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_MOUSE_DOWN, _edje_part_mouse_down_cb, rp);
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_MOUSE_UP, _edje_part_mouse_up_cb, rp);
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_MOUSE_MOVE, _edje_part_mouse_move_cb, rp);
- evas_event_callback_add(ed->base->evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb, rp);
+ evas_event_callback_add(ed->base.evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb, rp);
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
en->select_allow = EINA_TRUE;
@@ -2948,7 +2948,7 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
if (rp->part->source3)
{
- en->cursor_bg = edje_object_add(ed->base->evas);
+ 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);
@@ -2958,7 +2958,7 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
}
if (rp->part->source4)
{
- en->cursor_fg = edje_object_add(ed->base->evas);
+ 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);
@@ -2969,7 +2969,7 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
/* A proxy to the main cursor. */
if (rp->part->cursor_mode == EDJE_ENTRY_CURSOR_MODE_BEFORE)
{
- en->cursor_fg2 = edje_object_add(ed->base->evas);
+ en->cursor_fg2 = edje_object_add(ed->base.evas);
edje_object_file_set(en->cursor_fg2, ed->path, rp->part->source4);
evas_object_smart_member_add(en->cursor_fg2, ed->obj);
evas_object_stack_above(en->cursor_fg2, rp->object);
@@ -3026,8 +3026,8 @@ _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp)
ecore_imf_context_client_window_set
(en->imf_context,
(void *)ecore_evas_window_get
- (ecore_evas_ecore_evas_get(ed->base->evas)));
- ecore_imf_context_client_canvas_set(en->imf_context, ed->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, ed);
@@ -3086,7 +3086,7 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp)
en->pw_timer = NULL;
}
- evas_event_callback_del_full(ed->base->evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb, rp);
+ evas_event_callback_del_full(ed->base.evas, EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE, _canvas_viewport_resize_cb, rp);
#ifdef HAVE_ECORE_IMF
if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE)
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 03689c0f4e..f1e5fc1d53 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -1031,26 +1031,26 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
switch (ep->type)
{
case EDJE_PART_TYPE_RECTANGLE:
- rp->object = evas_object_rectangle_add(ed->base->evas);
+ rp->object = evas_object_rectangle_add(ed->base.evas);
break;
case EDJE_PART_TYPE_VECTOR:
- rp->object = evas_object_vg_add(ed->base->evas);
+ rp->object = evas_object_vg_add(ed->base.evas);
break;
case EDJE_PART_TYPE_PROXY:
case EDJE_PART_TYPE_IMAGE:
- rp->object = evas_object_image_add(ed->base->evas);
+ rp->object = evas_object_image_add(ed->base.evas);
break;
case EDJE_PART_TYPE_SNAPSHOT:
- rp->object = evas_object_image_filled_add(ed->base->evas);
+ rp->object = evas_object_image_filled_add(ed->base.evas);
evas_object_image_snapshot_set(rp->object, EINA_TRUE);
break;
case EDJE_PART_TYPE_TEXT:
_edje_text_part_on_add(ed, rp);
- rp->object = evas_object_text_add(ed->base->evas);
+ rp->object = evas_object_text_add(ed->base.evas);
evas_object_text_font_source_set(rp->object, ed->path);
break;
@@ -1064,7 +1064,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
case EDJE_PART_TYPE_EXTERNAL:
if (ep->type == EDJE_PART_TYPE_EXTERNAL)
externals = eina_list_append(externals, rp);
- rp->object = evas_object_rectangle_add(ed->base->evas);
+ rp->object = evas_object_rectangle_add(ed->base.evas);
evas_object_color_set(rp->object, 0, 0, 0, 0);
evas_object_pass_events_set(rp->object, 1);
evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
@@ -1074,18 +1074,18 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
case EDJE_PART_TYPE_TEXTBLOCK:
_edje_textblock_styles_add(ed, rp);
textblocks = eina_list_append(textblocks, rp);
- rp->object = evas_object_textblock_add(ed->base->evas);
+ rp->object = evas_object_textblock_add(ed->base.evas);
break;
case EDJE_PART_TYPE_BOX:
sources = eina_list_append(sources, rp);
- rp->object = evas_object_box_add(ed->base->evas);
+ rp->object = evas_object_box_add(ed->base.evas);
rp->typedata.container->anim = _edje_box_layout_anim_new(rp->object);
break;
case EDJE_PART_TYPE_TABLE:
sources = eina_list_append(sources, rp);
- rp->object = evas_object_table_add(ed->base->evas);
+ rp->object = evas_object_table_add(ed->base.evas);
break;
case EDJE_PART_TYPE_GRADIENT:
@@ -1103,9 +1103,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
Evas_Canvas3D_Material *material = NULL;
Edje_Part_Description_Mesh_Node *pd_mesh_node;
- rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH));
- mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
+ mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, ed->base.evas);
evas_canvas3d_node_mesh_add(rp->node, mesh);
pd_mesh_node = (Edje_Part_Description_Mesh_Node*) rp->chosen_description;
@@ -1119,13 +1119,13 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
evas_canvas3d_mesh_frame_add(mesh, 0);
}
- material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
+ material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base.evas);
evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured)
{
Evas_Canvas3D_Texture *texture = NULL;
- texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
+ texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base.evas);
evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
}
rp->object = NULL;
@@ -1136,8 +1136,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
{
Evas_Canvas3D_Light *light = NULL;
- rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- light = efl_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
+ rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light = efl_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base.evas);
evas_canvas3d_node_light_set(rp->node, light);
rp->object = NULL;
@@ -1148,13 +1148,13 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
{
Evas_Canvas3D_Camera *camera = NULL;
- rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- camera = efl_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
+ rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera = efl_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base.evas);
evas_canvas3d_node_camera_set(rp->node, camera);
- rp->object = evas_object_image_filled_add(ed->base->evas);
+ rp->object = evas_object_image_filled_add(ed->base.evas);
- Eo* viewport = efl_add(EFL_CANVAS_SCENE3D_CLASS, ed->base->evas);
+ Eo* viewport = efl_add(EFL_CANVAS_SCENE3D_CLASS, ed->base.evas);
evas_object_image_source_set(rp->object, viewport);
evas_object_show(viewport);
evas_object_event_callback_add(rp->object, EVAS_CALLBACK_DEL, _evas_object_viewport_del, viewport);
@@ -1240,7 +1240,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
efl_canvas_object_precise_is_inside_set(rp->object, ep->precise_is_inside);
}
if (rp->part->clip_to_id < 0)
- evas_object_clip_set(rp->object, ed->base->clipper);
+ evas_object_clip_set(rp->object, ed->base.clipper);
}
}
if (n > 0)
@@ -1365,9 +1365,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
#ifdef EDJE_CALC_CACHE
ed->all_part_change = EINA_TRUE;
#endif
- if ((evas_object_clipees_has(ed->base->clipper)) &&
+ if ((evas_object_clipees_has(ed->base.clipper)) &&
(evas_object_visible_get(obj)))
- evas_object_show(ed->base->clipper);
+ evas_object_show(ed->base.clipper);
/* instantiate 'internal swallows' */
EINA_LIST_FREE(externals, rp)
@@ -1465,7 +1465,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
do
{
- child_obj = edje_object_add(ed->base->evas);
+ child_obj = edje_object_add(ed->base.evas);
edje_object_mirrored_set(child_obj, edje_object_mirrored_get(ed->obj));
group_path = eina_list_append(group_path, group_path_entry);
@@ -3016,11 +3016,11 @@ edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene)
}
if (*root_node == NULL)
- *root_node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas,
+ *root_node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas,
evas_canvas3d_node_constructor(efl_added, EVAS_CANVAS3D_NODE_TYPE_NODE));
if (scene == NULL)
- scene = efl_add(EVAS_CANVAS3D_SCENE_CLASS, ed->base->evas);
+ scene = efl_add(EVAS_CANVAS3D_SCENE_CLASS, ed->base.evas);
if ((*root_node == NULL) || (scene == NULL))
{
diff --git a/src/lib/edje/edje_lua2.c b/src/lib/edje/edje_lua2.c
index 1e824ecfd5..b8a66c67c7 100644
--- a/src/lib/edje/edje_lua2.c
+++ b/src/lib/edje/edje_lua2.c
@@ -1538,7 +1538,7 @@ static void
_elua_polish_evas_object(Edje *ed, Edje_Lua_Evas_Object *elo)
{
evas_object_smart_member_add(elo->evas_obj, ed->obj);
- evas_object_clip_set(elo->evas_obj, ed->base->clipper);
+ evas_object_clip_set(elo->evas_obj, ed->base.clipper);
evas_object_move(elo->evas_obj, ed->x, ed->y);
evas_object_resize(elo->evas_obj, 0, 0);
evas_object_data_set(elo->evas_obj, ELO, elo);
diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c
index 21d609ecd9..3c6adeb840 100644
--- a/src/lib/edje/edje_main.c
+++ b/src/lib/edje/edje_main.c
@@ -322,15 +322,6 @@ _edje_del(Edje *ed)
}
void
-_edje_clean_objects(Edje *ed)
-{
- evas_object_del(ed->base->clipper);
- ed->base->evas = NULL;
- ed->obj = NULL;
- ed->base->clipper = NULL;
-}
-
-void
_edje_ref(Edje *ed)
{
if (ed->references <= 0) return;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 3c9916a35d..89867977a1 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1663,13 +1663,12 @@ struct _Edje_Signal_Source_Char
struct _Edje
{
- Evas_Object_Smart_Clipped_Data *base;
- /* This contains (or should):
- Evas_Object *clipper; // a big rect to clip this Edje to
- Evas *evas; // the Evas this Edje belongs to
- */
EINA_INLIST;
+ struct {
+ Evas_Object *clipper;
+ Evas *evas;
+ } base;
const char *path;
const char *group;
const char *parent;
@@ -2501,7 +2500,6 @@ void _edje_collection_free_part_description_free(int type,
void _edje_del(Edje *ed);
void _edje_ref(Edje *ed);
void _edje_unref(Edje *ed);
-void _edje_clean_objects(Edje *ed);
void _edje_ref(Edje *ed);
void _edje_unref(Edje *ed);
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 4d12f7e7a2..843bb90f9b 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -33,7 +33,8 @@ _edje_object_efl_object_constructor(Eo *obj, Edje *ed)
efl_canvas_group_clipped_set(obj, EINA_TRUE);
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
- ed->base = evas_object_smart_data_get(obj);
+ ed->base.evas = efl_provider_find(obj, EVAS_CANVAS_CLASS);
+ ed->base.clipper = (Evas_Object *) efl_canvas_group_clipper_get(obj);
ed->duration_scale = 1.0;
_edje_lib_ref();
@@ -55,7 +56,6 @@ _edje_object_efl_object_destructor(Eo *obj, Edje *class_data)
class_data->file_obj = NULL;
}
efl_destructor(efl_super(obj, MY_CLASS));
- efl_data_unref(obj, class_data->base);
}
EOLIAN static Eina_Strbuf *
@@ -161,7 +161,6 @@ _edje_object_efl_canvas_group_group_del(Eo *obj, Edje *ed)
#endif
if (ed->persp) edje_object_perspective_set(obj, NULL);
_edje_file_del(ed);
- _edje_clean_objects(ed);
_edje_unref(ed);
_edje_lib_unref();
efl_canvas_group_del(efl_super(obj, MY_CLASS));
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 2c0249cec9..d14ce87977 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -5645,7 +5645,7 @@ _edje_real_part_swallow(Edje *ed,
clip_to = ed->table_parts[rp->part->clip_to_id % ed->table_parts_size];
evas_object_clip_set(rp->typedata.swallow->swallowed_object, clip_to->object);
}
- else evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base->clipper);
+ else evas_object_clip_set(rp->typedata.swallow->swallowed_object, ed->base.clipper);
//FIXME: I'm not sure why Edje Nested is a parent of the rp->object here. Is it normal case?
if (evas_object_smart_parent_get(rp->object) == ed->obj)
evas_object_stack_above(rp->typedata.swallow->swallowed_object, rp->object);