aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2015-06-11 09:58:09 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-11 09:58:13 +0200
commited01a32c136aaba8fb23a12afaf334b4c47fc62e (patch)
tree55b460bae129537eb90928c5e0174a8ebc246a29
parentevas - eo canvas events - move viewport to last to match enums in legacy (diff)
downloadefl-ed01a32c136aaba8fb23a12afaf334b4c47fc62e.tar.gz
evas: move evas_object_inject to super's ctor
Summary: As we always call evas_object_inject in every Evas Object's ctcor, it seems sensible to move this repeated bit of code to the super (Evas.Object). Test Plan: Expedite, Elementary_Test and pretty much everything Reviewers: cedric, raster Subscribers: JackDanielZ, cedric Differential Revision: https://phab.enlightenment.org/D2665 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/evas/canvas/evas_object_image.c6
-rw-r--r--src/lib/evas/canvas/evas_object_line.c3
-rw-r--r--src/lib/evas/canvas/evas_object_main.c2
-rw-r--r--src/lib/evas/canvas/evas_object_polygon.c3
-rw-r--r--src/lib/evas/canvas/evas_object_rectangle.c6
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c3
-rw-r--r--src/lib/evas/canvas/evas_object_text.c5
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c4
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c6
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c4
10 files changed, 2 insertions, 40 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index b3e067cf41..f5535fe3bd 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -346,17 +346,11 @@ EOLIAN static Eo *
_evas_image_eo_base_constructor(Eo *eo_obj, Evas_Image_Data *o)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
- Evas *eo_e;
- Eo *parent = NULL;
Evas_Colorspace cspace;
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
- eo_do(eo_obj, parent = eo_parent_get());
- eo_e = evas_object_evas_get(parent);
-
evas_object_image_init(eo_obj);
- evas_object_inject(eo_obj, obj, eo_e);
if (!_init_cow())
return NULL;
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index df9570af22..dc3882b04c 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -219,14 +219,11 @@ _evas_line_eo_base_constructor(Eo *eo_obj, Evas_Line_Data *class_data EINA_UNUSE
{
Evas_Object_Protected_Data *obj;
Evas_Line_Data *o;
- Eo *parent = NULL;
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_line_init(eo_obj);
- eo_do(eo_obj, parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
o = class_data;
/* alloc obj private data */
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index f6adda729f..21a107c2a1 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -108,6 +108,8 @@ _evas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
obj->data_3d = eina_cow_alloc(evas_object_3d_cow);
obj->mask = eina_cow_alloc(evas_object_mask_cow);
+ evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
+
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c
index 4e5c6361f1..40bf934ae8 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -105,14 +105,11 @@ EOLIAN static Eo *
_evas_polygon_eo_base_constructor(Eo *eo_obj, Evas_Polygon_Data *class_data EINA_UNUSED)
{
Evas_Object_Protected_Data *obj;
- Eo *parent = NULL;
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_polygon_init(eo_obj);
- eo_do(eo_obj, parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c
index 8f603e6daa..0de959c962 100644
--- a/src/lib/evas/canvas/evas_object_rectangle.c
+++ b/src/lib/evas/canvas/evas_object_rectangle.c
@@ -100,16 +100,10 @@ evas_object_rectangle_add(Evas *e)
EOLIAN static Eo *
_evas_rectangle_eo_base_constructor(Eo *eo_obj, Evas_Rectangle_Data *class_data EINA_UNUSED)
{
- Eo *parent = NULL;
-
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_rectangle_init(eo_obj);
- eo_do(eo_obj, parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
-
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 357e718784..6506e246da 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -546,7 +546,6 @@ _evas_object_smart_eo_base_constructor(Eo *eo_obj, Evas_Smart_Data *class_data E
{
Evas_Object_Protected_Data *obj;
Evas_Smart_Data *smart;
- Eo *parent = NULL;
smart = class_data;
smart->object = eo_obj;
@@ -555,8 +554,6 @@ _evas_object_smart_eo_base_constructor(Eo *eo_obj, Evas_Smart_Data *class_data E
evas_object_smart_init(eo_obj);
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
- eo_do(eo_obj, parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
eo_do(eo_obj,
evas_obj_type_set(MY_CLASS_NAME_LEGACY),
evas_obj_smart_add());
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index c28e8a91e7..d7ee55e049 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -370,11 +370,6 @@ _evas_text_eo_base_constructor(Eo *eo_obj, Evas_Text_Data *o)
{
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
evas_object_text_init(eo_obj);
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
- Eo *parent = NULL;
-
- eo_do(eo_obj, parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
o->cur.filter = eina_cow_alloc(evas_object_filter_cow);
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 054d9d1c92..6a5648e8ca 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -5808,7 +5808,6 @@ _evas_textblock_eo_base_constructor(Eo *eo_obj, Evas_Textblock_Data *class_data
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
Evas_Textblock_Data *o;
- Eo *eo_parent = NULL;
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
@@ -5822,9 +5821,6 @@ _evas_textblock_eo_base_constructor(Eo *eo_obj, Evas_Textblock_Data *class_data
_format_command_init();
evas_object_textblock_init(eo_obj);
- eo_do(eo_obj, eo_parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent));
-
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index 7dbb739570..c84d0f38d7 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -1064,16 +1064,10 @@ evas_object_textgrid_add(Evas *e)
EOLIAN static Eo *
_evas_textgrid_eo_base_constructor(Eo *eo_obj, Evas_Textgrid_Data *class_data EINA_UNUSED)
{
- Eo *eo_parent = NULL;
-
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_textgrid_init(eo_obj);
- eo_do(eo_obj, eo_parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent));
-
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c
index 0e3eaa76d0..9cc81e45c8 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -102,7 +102,6 @@ Eo *
_evas_vg_eo_base_constructor(Eo *eo_obj, Evas_VG_Data *pd)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
- Eo *parent = NULL;
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
@@ -115,9 +114,6 @@ _evas_vg_eo_base_constructor(Eo *eo_obj, Evas_VG_Data *pd)
pd->root = eo_add(EFL_VG_ROOT_NODE_CLASS, eo_obj);
eo_ref(pd->root);
- eo_do(eo_obj, parent = eo_parent_get());
- evas_object_inject(eo_obj, obj, evas_object_evas_get(parent));
-
return eo_obj;
}