aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Evas.am2
-rw-r--r--src/lib/edje/edje_edit.c2
-rw-r--r--src/lib/edje/edje_util.c2
-rw-r--r--src/lib/elementary/efl_ui_grid_static.c2
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.c2
-rw-r--r--src/lib/elementary/elm_layout.c2
-rw-r--r--src/lib/evas/Evas_Eo.h2
-rw-r--r--src/lib/evas/Evas_Legacy.h9
-rw-r--r--src/lib/evas/canvas/efl_canvas_object.eo7
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo5
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.c6
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.eo4
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.eo2
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c24
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.eo2
-rw-r--r--src/lib/evas/canvas/evas_common_interface.c3
-rw-r--r--src/lib/evas/canvas/evas_common_interface.eo15
-rw-r--r--src/lib/evas/canvas/evas_main.c9
-rw-r--r--src/lib/evas/canvas/evas_object_main.c27
-rw-r--r--src/tests/edje/edje_test_edje.c8
-rw-r--r--src/tests/elementary/elm_test_layout.c4
27 files changed, 76 insertions, 75 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index b740914c4a..d861ab661b 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -8,7 +8,6 @@ evas_eolian_pub_files = \
lib/evas/canvas/efl_canvas_text.eo \
lib/evas/canvas/efl_canvas_text_cursor.eo \
lib/evas/canvas/efl_canvas_group.eo \
- lib/evas/canvas/evas_common_interface.eo \
lib/evas/canvas/evas_canvas.eo \
lib/evas/canvas/efl_canvas_image_internal.eo \
lib/evas/canvas/efl_ui_draggable.eo \
@@ -153,7 +152,6 @@ lib_evas_libevas_la_SOURCES += \
lib/evas/canvas/common_interfaces.c \
lib/evas/canvas/evas_callbacks.c \
lib/evas/canvas/evas_clip.c \
-lib/evas/canvas/evas_common_interface.c \
lib/evas/canvas/evas_data.c \
lib/evas/canvas/evas_device.c \
lib/evas/canvas/evas_events.c \
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index ded6c81e1b..e4f3c2adf7 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -353,7 +353,7 @@ _edje_real_part_free(Edje *ed, Edje_Real_Part *rp)
if ((rp->type == EDJE_RP_TYPE_SWALLOW) && (rp->typedata.swallow)
&& (rp->typedata.swallow->swallowed_object))
{
- eo_parent_set(rp->typedata.swallow->swallowed_object, evas_common_evas_get(ed->obj));
+ eo_parent_set(rp->typedata.swallow->swallowed_object, evas_object_evas_get(ed->obj));
evas_object_smart_member_del(rp->typedata.swallow->swallowed_object);
evas_object_event_callback_del(rp->typedata.swallow->swallowed_object,
EVAS_CALLBACK_FREE, _edje_object_part_swallow_free_cb);
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index caae67b060..fead840163 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -5101,7 +5101,7 @@ _eo_unparent_helper(Eo *child, Eo *parent)
{
if (eo_parent_get(child) == parent)
{
- eo_parent_set(child, evas_common_evas_get(parent));
+ eo_parent_set(child, evas_object_evas_get(parent));
}
}
diff --git a/src/lib/elementary/efl_ui_grid_static.c b/src/lib/elementary/efl_ui_grid_static.c
index 8069f01be3..05855abfea 100644
--- a/src/lib/elementary/efl_ui_grid_static.c
+++ b/src/lib/elementary/efl_ui_grid_static.c
@@ -35,7 +35,7 @@ _efl_ui_grid_static_efl_pack_layout_layout_do(Eo_Class *klass EINA_UNUSED,
gd = eo_data_scope_get(obj, EFL_UI_GRID_CLASS);
if (!gd->items) return;
- e = evas_common_evas_get(obj);
+ e = evas_object_evas_get(obj);
eo_event_freeze(e);
efl_gfx_position_get(obj, &x, &y);
diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c
index 0286727f88..a856403c86 100644
--- a/src/lib/elementary/efl_ui_internal_text_interactive.c
+++ b/src/lib/elementary/efl_ui_internal_text_interactive.c
@@ -1299,7 +1299,7 @@ _efl_ui_internal_text_interactive_eo_base_finalize(Eo *obj, Efl_Ui_Internal_Text
{
const char *ctx_id;
const Ecore_IMF_Context_Info *ctx_info;
- Evas *evas = evas_common_evas_get(obj);
+ Evas *evas = evas_object_evas_get(obj);
// _need_imf();
en->commit_cancel = EINA_FALSE;
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index 4ffc97e1fd..ef601fb577 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -667,7 +667,7 @@ _eo_unparent_helper(Eo *child, Eo *parent)
{
if (eo_parent_get(child) == parent)
{
- eo_parent_set(child, evas_common_evas_get(parent));
+ eo_parent_set(child, evas_object_evas_get(parent));
}
}
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 3af5ca00f6..02a993f426 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -62,8 +62,6 @@
* @}
*/
-#include "canvas/evas_common_interface.eo.h"
-
#include "canvas/efl_canvas_object.eo.h"
#endif /* EFL_EO_API_SUPPORT */
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index f1ba3e1559..4e75bff330 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1471,10 +1471,17 @@ EAPI Evas_Render_Op evas_object_render_op_get(const Evas_Object *obj);
*/
EAPI Eina_Bool evas_object_static_clip_get(const Evas_Object *obj);
-#include "canvas/evas_common_interface.eo.legacy.h"
#include "canvas/efl_canvas_object.eo.legacy.h"
/**
+ * @brief Get the Evas to which this object belongs to
+ *
+ * The object may be an evas object, an elementary object or window, or an
+ * evas 3D / VG object.
+ */
+EAPI Evas *evas_object_evas_get(const Eo *obj);
+
+/**
* @}
*/
diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo
index 63fa0b9d42..adb66ef39d 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -1,9 +1,8 @@
import evas_types;
import efl_text_types;
-abstract Efl.Canvas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx,
- Efl.Gfx.Stack, Efl.Animator, Efl.Input.Interface,
- Efl.Gfx.Size.Hint)
+abstract Efl.Canvas.Object (Eo.Base, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator,
+ Efl.Input.Interface, Efl.Gfx.Size.Hint)
{
legacy_prefix: evas_object;
data: Evas_Object_Protected_Data;
@@ -671,7 +670,7 @@ abstract Efl.Canvas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx,
Eo.Base.constructor;
Eo.Base.destructor;
Eo.Base.dbg_info_get;
- Evas.Common_Interface.evas.get;
+ Eo.Base.provider_find;
Efl.Gfx.visible.set;
Efl.Gfx.visible.get;
Efl.Gfx.color.set;
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index a2cbb0131e..03a180b39a 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1,8 +1,7 @@
import evas_types;
import efl_event_types;
-class Evas.Canvas (Eo.Base, Efl.Canvas, Evas.Common_Interface, Efl.Animator,
- Efl.Input.Interface)
+class Evas.Canvas (Eo.Base, Efl.Canvas, Efl.Animator, Efl.Input.Interface)
{
legacy_prefix: evas;
data: Evas_Public_Data;
@@ -1195,7 +1194,7 @@ class Evas.Canvas (Eo.Base, Efl.Canvas, Evas.Common_Interface, Efl.Animator,
Eo.Base.destructor;
Eo.Base.event_thaw;
Eo.Base.event_freeze;
- Evas.Common_Interface.evas.get;
+ Eo.Base.provider_find;
}
events {
render,flush,pre @beta;
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.eo b/src/lib/evas/canvas/evas_canvas3d_camera.eo
index b74ce3596e..4ac3b0deb9 100644
--- a/src/lib/evas/canvas/evas_canvas3d_camera.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_camera.eo
@@ -1,6 +1,6 @@
import evas_types;
-class Evas.Canvas3D.Camera (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Camera (Evas.Canvas3D.Object)
{
data: Evas_Canvas3D_Camera_Data;
methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.eo b/src/lib/evas/canvas/evas_canvas3d_light.eo
index e65090c538..464ab8ee5f 100644
--- a/src/lib/evas/canvas/evas_canvas3d_light.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_light.eo
@@ -1,6 +1,6 @@
import evas_types;
-class Evas.Canvas3D.Light (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Light (Evas.Canvas3D.Object)
{
data: Evas_Canvas3D_Light_Data;
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.eo b/src/lib/evas/canvas/evas_canvas3d_material.eo
index 45813d0a34..72871fcc00 100644
--- a/src/lib/evas/canvas/evas_canvas3d_material.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_material.eo
@@ -1,4 +1,4 @@
-class Evas.Canvas3D.Material (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Material (Evas.Canvas3D.Object)
{
data: Evas_Canvas3D_Material_Data;
methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.eo b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
index 9064f25c37..a15edf48f5 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
@@ -1,7 +1,7 @@
import eina_types;
import evas_types;
-class Evas.Canvas3D.Mesh (Evas.Canvas3D.Object, Evas.Common_Interface, Efl.File)
+class Evas.Canvas3D.Mesh (Evas.Canvas3D.Object, Efl.File)
{
data: Evas_Canvas3D_Mesh_Data;
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.eo b/src/lib/evas/canvas/evas_canvas3d_node.eo
index 78ac2c98b5..2ffcbac3dc 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_node.eo
@@ -1,6 +1,6 @@
import evas_types;
-class Evas.Canvas3D.Node (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Node (Evas.Canvas3D.Object)
{
data: Evas_Canvas3D_Node_Data;
methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_object.c b/src/lib/evas/canvas/evas_canvas3d_object.c
index 04b03190f7..b6b197dc0b 100644
--- a/src/lib/evas/canvas/evas_canvas3d_object.c
+++ b/src/lib/evas/canvas/evas_canvas3d_object.c
@@ -17,9 +17,11 @@ _evas_canvas3d_object_eo_base_constructor(Eo *obj, Evas_Canvas3D_Object_Data *pd
}
EOLIAN static Evas *
- _evas_canvas3d_object_evas_common_interface_evas_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Object_Data *pd)
+ _evas_canvas3d_object_eo_base_provider_find(Eo *obj, Evas_Canvas3D_Object_Data *pd, const Eo_Class *klass)
{
- return pd->evas;
+ if (klass == EVAS_CANVAS_CLASS)
+ return pd->evas;
+ return eo_provider_find(eo_super(obj, MY_CLASS), klass);
}
EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_canvas3d_object.eo b/src/lib/evas/canvas/evas_canvas3d_object.eo
index 82202744cc..e4db9c0e3d 100644
--- a/src/lib/evas/canvas/evas_canvas3d_object.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_object.eo
@@ -1,6 +1,6 @@
import evas_types;
-class Evas.Canvas3D.Object (Eo.Base, Evas.Common_Interface)
+class Evas.Canvas3D.Object (Eo.Base)
{
data: Evas_Canvas3D_Object_Data;
methods {
@@ -68,7 +68,7 @@ class Evas.Canvas3D.Object (Eo.Base, Evas.Common_Interface)
Eo.Base.constructor;
Eo.Base.event_callback_priority_add;
Eo.Base.event_callback_del;
- Evas.Common_Interface.evas.get;
+ Eo.Base.provider_find;
}
events {
clicked; [[Clicked Event.]]
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.eo b/src/lib/evas/canvas/evas_canvas3d_primitive.eo
index 89d9529a73..005ff55ea4 100644
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_primitive.eo
@@ -1,6 +1,6 @@
import evas_types;
-class Evas.Canvas3D.Primitive (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Primitive (Evas.Canvas3D.Object)
{
data: Evas_Canvas3D_Primitive_Data;
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.eo b/src/lib/evas/canvas/evas_canvas3d_scene.eo
index b1f0c17979..80762074eb 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.eo
@@ -1,6 +1,6 @@
import evas_types;
-class Evas.Canvas3D.Scene (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Scene (Evas.Canvas3D.Object)
{
data: Evas_Canvas3D_Scene_Data;
methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index dd9e737141..abfc79b3cf 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -54,7 +54,7 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
{
/* Code taken from _proxy_subrender() in file evas_object_image.c */
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
Evas_Canvas3D_Texture_Data *pd = eo_data_scope_get(obj, MY_CLASS);
Evas_Object_Protected_Data *source;
@@ -165,7 +165,7 @@ _texture_fini(Evas_Canvas3D_Texture *obj)
void *data = NULL;
Evas_Canvas3D_Material_Data *material = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Canvas3D_Texture_Data *pd = eo_data_scope_get(obj, MY_CLASS);
if (pd->engine_data)
@@ -224,7 +224,7 @@ _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D
if (pd->source)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
Evas_Object_Protected_Data *src = eo_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS);
@@ -343,7 +343,7 @@ _evas_canvas3d_texture_data_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd,
{
Eo *evas = NULL;
void *image = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (!pd->engine_data && e->engine.func->texture_new)
@@ -378,7 +378,7 @@ _evas_canvas3d_texture_file_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, const c
Eo *evas = NULL;
void *image;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (!pd->engine_data && e->engine.func->texture_new)
@@ -406,7 +406,7 @@ EAPI void
_evas_canvas3d_texture_source_set(Eo *obj , Evas_Canvas3D_Texture_Data *pd, Evas_Object *source)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
Evas_Object_Protected_Data *src;
@@ -483,7 +483,7 @@ _evas_canvas3d_texture_color_format_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D
{
Evas_Colorspace format = -1;
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (e->engine.func->image_colorspace_get &&
@@ -502,7 +502,7 @@ EOLIAN static void
_evas_canvas3d_texture_size_get(const Eo *obj, Evas_Canvas3D_Texture_Data *pd, int *w, int *h)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (e->engine.func->texture_size_get)
{
@@ -515,7 +515,7 @@ EOLIAN static void
_evas_canvas3d_texture_wrap_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (e->engine.func->texture_wrap_set)
{
@@ -529,7 +529,7 @@ EOLIAN static void
_evas_canvas3d_texture_wrap_get(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (e->engine.func->texture_wrap_set)
{
@@ -542,7 +542,7 @@ EOLIAN static void
_evas_canvas3d_texture_filter_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (e->engine.func->texture_filter_set)
{
@@ -556,7 +556,7 @@ EOLIAN static void
_evas_canvas3d_texture_filter_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Texture_Filter *min, Evas_Canvas3D_Texture_Filter *mag)
{
Eo *evas = NULL;
- evas = evas_common_evas_get(obj);
+ evas = evas_object_evas_get(obj);
Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
if (e->engine.func->texture_filter_get)
{
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.eo b/src/lib/evas/canvas/evas_canvas3d_texture.eo
index 7d74e620a7..af187adf67 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.eo
@@ -1,6 +1,6 @@
type @extern Evas_Colorspace: int; /* FIXME: Need to get emile migrated. */
-class Evas.Canvas3D.Texture (Evas.Canvas3D.Object, Evas.Common_Interface)
+class Evas.Canvas3D.Texture (Evas.Canvas3D.Object)
{
data : Evas_Canvas3D_Texture_Data;
methods {
diff --git a/src/lib/evas/canvas/evas_common_interface.c b/src/lib/evas/canvas/evas_common_interface.c
deleted file mode 100644
index eb90b0ba2f..0000000000
--- a/src/lib/evas/canvas/evas_common_interface.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include "canvas/evas_common_interface.eo.c"
diff --git a/src/lib/evas/canvas/evas_common_interface.eo b/src/lib/evas/canvas/evas_common_interface.eo
deleted file mode 100644
index 2e7310c9ad..0000000000
--- a/src/lib/evas/canvas/evas_common_interface.eo
+++ /dev/null
@@ -1,15 +0,0 @@
-interface Evas.Common_Interface ()
-{
- eo_prefix: evas_common;
- methods {
- @property evas {
- get {
- legacy: evas_object_evas_get;
- }
- values {
- /* FIXME: This is actually wrong, should return Evas. */
- ret: Evas.Common_Interface;
- }
- }
- }
-}
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 3e967044bf..f2c9b444b7 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -586,10 +586,13 @@ evas_data_argb_unpremul(unsigned int *data, unsigned int len)
evas_common_convert_argb_unpremul(data, len);
}
-EOLIAN static Evas *
-_evas_canvas_evas_common_interface_evas_get(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED)
+EOLIAN static Eo *
+_evas_canvas_eo_base_provider_find(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED,
+ const Eo_Class *klass)
{
- return (Evas *)eo_e;
+ if (klass == EVAS_CANVAS_CLASS)
+ return eo_e;
+ return eo_provider_find(eo_super(eo_e, MY_CLASS), klass);
}
Ector_Surface *
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 08005e1da7..6d26b77176 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -151,16 +151,18 @@ EOLIAN static Eo *
_efl_canvas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
Eo *parent = NULL;
+ Evas *evas;
eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
efl_canvas_object_type_set(eo_obj, MY_CLASS_NAME);
eo_manual_free_set(eo_obj, EINA_TRUE);
parent = eo_parent_get(eo_obj);
+ evas = evas_object_evas_get(parent);
- if (!obj || !_init_cow() || !eo_isa(parent, EVAS_COMMON_INTERFACE_INTERFACE))
+ if (!obj || !_init_cow() || !evas)
{
- ERR("Failed");
+ ERR("Failed to create a canvas object (evas: %p)", evas);
return NULL;
}
@@ -173,7 +175,7 @@ _efl_canvas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *o
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));
+ evas_object_inject(eo_obj, obj, evas);
eo_event_callback_array_add(eo_obj, event_catcher_watch(), obj);
@@ -1912,11 +1914,15 @@ _efl_canvas_object_eo_base_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Data *
}
}
-EOLIAN static Evas *
-_efl_canvas_object_evas_common_interface_evas_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
+EOLIAN static Eo *
+_efl_canvas_object_eo_base_provider_find(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, const Eo_Class *klass)
{
- if ((obj->delete_me) || (!obj->layer)) return NULL;
- return obj->layer->evas->evas;
+ if (klass == EVAS_CANVAS_CLASS)
+ {
+ if ((obj->delete_me) || (!obj->layer)) return NULL;
+ return obj->layer->evas->evas;
+ }
+ return eo_provider_find(eo_super(eo_obj, MY_CLASS), klass);
}
EOLIAN Evas_Object*
@@ -2166,6 +2172,7 @@ _efl_canvas_object_legacy_ctor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
obj->legacy = EINA_TRUE;
}
+
/* legacy */
EAPI const char *
@@ -2275,4 +2282,10 @@ evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
efl_gfx_size_hint_align_get(obj, x, y);
}
+EAPI Evas *
+evas_object_evas_get(const Eo *eo_obj)
+{
+ return eo_provider_find((Eo *) eo_obj, EVAS_CANVAS_CLASS);
+}
+
#include "canvas/efl_canvas_object.eo.c"
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index e3dfd65489..1a62a8daef 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -366,7 +366,7 @@ START_TEST(edje_test_swallows)
ck_assert_ptr_eq(eo_parent_get(o1), ly);
edje_object_part_unswallow(ly, o1);
- ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
+ ck_assert_ptr_eq(eo_parent_get(o1), evas_object_evas_get(o1));
fail_if(!edje_object_part_swallow(ly, "swallow", o1));
ck_assert_ptr_eq(eo_parent_get(o1), ly);
@@ -375,7 +375,7 @@ START_TEST(edje_test_swallows)
fail_if(!edje_object_part_swallow(ly, "swallow", o2));
ck_assert_ptr_eq(eo_parent_get(o2), ly);
/* o1 is deleted at this point. */
- ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
+ ck_assert_ptr_eq(eo_parent_get(o1), evas_object_evas_get(o1));
EDJE_TEST_FREE_EVAS();
}
@@ -397,7 +397,7 @@ START_TEST(edje_test_swallows_eoapi)
ck_assert_ptr_eq(eo_parent_get(o1), ly);
efl_content_remove(ly, o1);
- ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
+ ck_assert_ptr_eq(eo_parent_get(o1), evas_object_evas_get(o1));
fail_if(!efl_content_set(efl_part(ly, "swallow"), o1));
ck_assert_ptr_eq(eo_parent_get(o1), ly);
@@ -406,7 +406,7 @@ START_TEST(edje_test_swallows_eoapi)
fail_if(!efl_content_set(efl_part(ly, "swallow"), o2));
ck_assert_ptr_eq(eo_parent_get(o2), ly);
/* o1 is deleted at this point. */
- ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
+ ck_assert_ptr_eq(eo_parent_get(o1), evas_object_evas_get(o1));
EDJE_TEST_FREE_EVAS();
}
diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c
index 7c0ba94e33..f4f9b0d7fb 100644
--- a/src/tests/elementary/elm_test_layout.c
+++ b/src/tests/elementary/elm_test_layout.c
@@ -42,7 +42,7 @@ START_TEST(elm_layout_swallows)
ck_assert_ptr_eq(eo_parent_get(bt), ly);
bt = efl_content_unset(efl_part(ly, "element1"));
- ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt));
+ ck_assert_ptr_eq(eo_parent_get(bt), evas_object_evas_get(bt));
fail_if(!efl_content_set(efl_part(ly, "element1"), bt));
ck_assert_ptr_eq(eo_parent_get(bt), ly);
@@ -51,7 +51,7 @@ START_TEST(elm_layout_swallows)
fail_if(!efl_content_set(efl_part(ly, "element1"), bt2));
ck_assert_ptr_eq(eo_parent_get(bt2), ly);
/* bt is deleted at this point. */
- ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt));
+ ck_assert_ptr_eq(eo_parent_get(bt), evas_object_evas_get(bt));
elm_shutdown();
}