summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas')
-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
17 files changed, 57 insertions, 59 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo
index 63fa0b9..adb66ef 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -1,9 +1,8 @@
1import evas_types; 1import evas_types;
2import efl_text_types; 2import efl_text_types;
3 3
4abstract Efl.Canvas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx, 4abstract Efl.Canvas.Object (Eo.Base, Efl.Gfx, Efl.Gfx.Stack, Efl.Animator,
5 Efl.Gfx.Stack, Efl.Animator, Efl.Input.Interface, 5 Efl.Input.Interface, Efl.Gfx.Size.Hint)
6 Efl.Gfx.Size.Hint)
7{ 6{
8 legacy_prefix: evas_object; 7 legacy_prefix: evas_object;
9 data: Evas_Object_Protected_Data; 8 data: Evas_Object_Protected_Data;
@@ -671,7 +670,7 @@ abstract Efl.Canvas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx,
671 Eo.Base.constructor; 670 Eo.Base.constructor;
672 Eo.Base.destructor; 671 Eo.Base.destructor;
673 Eo.Base.dbg_info_get; 672 Eo.Base.dbg_info_get;
674 Evas.Common_Interface.evas.get; 673 Eo.Base.provider_find;
675 Efl.Gfx.visible.set; 674 Efl.Gfx.visible.set;
676 Efl.Gfx.visible.get; 675 Efl.Gfx.visible.get;
677 Efl.Gfx.color.set; 676 Efl.Gfx.color.set;
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index a2cbb01..03a180b 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1,8 +1,7 @@
1import evas_types; 1import evas_types;
2import efl_event_types; 2import efl_event_types;
3 3
4class Evas.Canvas (Eo.Base, Efl.Canvas, Evas.Common_Interface, Efl.Animator, 4class Evas.Canvas (Eo.Base, Efl.Canvas, Efl.Animator, Efl.Input.Interface)
5 Efl.Input.Interface)
6{ 5{
7 legacy_prefix: evas; 6 legacy_prefix: evas;
8 data: Evas_Public_Data; 7 data: Evas_Public_Data;
@@ -1195,7 +1194,7 @@ class Evas.Canvas (Eo.Base, Efl.Canvas, Evas.Common_Interface, Efl.Animator,
1195 Eo.Base.destructor; 1194 Eo.Base.destructor;
1196 Eo.Base.event_thaw; 1195 Eo.Base.event_thaw;
1197 Eo.Base.event_freeze; 1196 Eo.Base.event_freeze;
1198 Evas.Common_Interface.evas.get; 1197 Eo.Base.provider_find;
1199 } 1198 }
1200 events { 1199 events {
1201 render,flush,pre @beta; 1200 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 b74ce35..4ac3b0d 100644
--- a/src/lib/evas/canvas/evas_canvas3d_camera.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_camera.eo
@@ -1,6 +1,6 @@
1import evas_types; 1import evas_types;
2 2
3class Evas.Canvas3D.Camera (Evas.Canvas3D.Object, Evas.Common_Interface) 3class Evas.Canvas3D.Camera (Evas.Canvas3D.Object)
4{ 4{
5 data: Evas_Canvas3D_Camera_Data; 5 data: Evas_Canvas3D_Camera_Data;
6 methods { 6 methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.eo b/src/lib/evas/canvas/evas_canvas3d_light.eo
index e65090c..464ab8e 100644
--- a/src/lib/evas/canvas/evas_canvas3d_light.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_light.eo
@@ -1,6 +1,6 @@
1import evas_types; 1import evas_types;
2 2
3class Evas.Canvas3D.Light (Evas.Canvas3D.Object, Evas.Common_Interface) 3class Evas.Canvas3D.Light (Evas.Canvas3D.Object)
4{ 4{
5 data: Evas_Canvas3D_Light_Data; 5 data: Evas_Canvas3D_Light_Data;
6 6
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.eo b/src/lib/evas/canvas/evas_canvas3d_material.eo
index 45813d0..72871fc 100644
--- a/src/lib/evas/canvas/evas_canvas3d_material.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_material.eo
@@ -1,4 +1,4 @@
1class Evas.Canvas3D.Material (Evas.Canvas3D.Object, Evas.Common_Interface) 1class Evas.Canvas3D.Material (Evas.Canvas3D.Object)
2{ 2{
3 data: Evas_Canvas3D_Material_Data; 3 data: Evas_Canvas3D_Material_Data;
4 methods { 4 methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.eo b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
index 9064f25..a15edf4 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
@@ -1,7 +1,7 @@
1import eina_types; 1import eina_types;
2import evas_types; 2import evas_types;
3 3
4class Evas.Canvas3D.Mesh (Evas.Canvas3D.Object, Evas.Common_Interface, Efl.File) 4class Evas.Canvas3D.Mesh (Evas.Canvas3D.Object, Efl.File)
5{ 5{
6 data: Evas_Canvas3D_Mesh_Data; 6 data: Evas_Canvas3D_Mesh_Data;
7 7
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.eo b/src/lib/evas/canvas/evas_canvas3d_node.eo
index 78ac2c9..2ffcbac 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_node.eo
@@ -1,6 +1,6 @@
1import evas_types; 1import evas_types;
2 2
3class Evas.Canvas3D.Node (Evas.Canvas3D.Object, Evas.Common_Interface) 3class Evas.Canvas3D.Node (Evas.Canvas3D.Object)
4{ 4{
5 data: Evas_Canvas3D_Node_Data; 5 data: Evas_Canvas3D_Node_Data;
6 methods { 6 methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_object.c b/src/lib/evas/canvas/evas_canvas3d_object.c
index 04b0319..b6b197d 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
17} 17}
18 18
19EOLIAN static Evas * 19EOLIAN static Evas *
20 _evas_canvas3d_object_evas_common_interface_evas_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Object_Data *pd) 20 _evas_canvas3d_object_eo_base_provider_find(Eo *obj, Evas_Canvas3D_Object_Data *pd, const Eo_Class *klass)
21{ 21{
22 return pd->evas; 22 if (klass == EVAS_CANVAS_CLASS)
23 return pd->evas;
24 return eo_provider_find(eo_super(obj, MY_CLASS), klass);
23} 25}
24 26
25EOLIAN static void 27EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_canvas3d_object.eo b/src/lib/evas/canvas/evas_canvas3d_object.eo
index 8220274..e4db9c0 100644
--- a/src/lib/evas/canvas/evas_canvas3d_object.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_object.eo
@@ -1,6 +1,6 @@
1import evas_types; 1import evas_types;
2 2
3class Evas.Canvas3D.Object (Eo.Base, Evas.Common_Interface) 3class Evas.Canvas3D.Object (Eo.Base)
4{ 4{
5 data: Evas_Canvas3D_Object_Data; 5 data: Evas_Canvas3D_Object_Data;
6 methods { 6 methods {
@@ -68,7 +68,7 @@ class Evas.Canvas3D.Object (Eo.Base, Evas.Common_Interface)
68 Eo.Base.constructor; 68 Eo.Base.constructor;
69 Eo.Base.event_callback_priority_add; 69 Eo.Base.event_callback_priority_add;
70 Eo.Base.event_callback_del; 70 Eo.Base.event_callback_del;
71 Evas.Common_Interface.evas.get; 71 Eo.Base.provider_find;
72 } 72 }
73 events { 73 events {
74 clicked; [[Clicked Event.]] 74 clicked; [[Clicked Event.]]
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.eo b/src/lib/evas/canvas/evas_canvas3d_primitive.eo
index 89d9529..005ff55 100644
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_primitive.eo
@@ -1,6 +1,6 @@
1import evas_types; 1import evas_types;
2 2
3class Evas.Canvas3D.Primitive (Evas.Canvas3D.Object, Evas.Common_Interface) 3class Evas.Canvas3D.Primitive (Evas.Canvas3D.Object)
4{ 4{
5 data: Evas_Canvas3D_Primitive_Data; 5 data: Evas_Canvas3D_Primitive_Data;
6 6
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.eo b/src/lib/evas/canvas/evas_canvas3d_scene.eo
index b1f0c17..8076207 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.eo
@@ -1,6 +1,6 @@
1import evas_types; 1import evas_types;
2 2
3class Evas.Canvas3D.Scene (Evas.Canvas3D.Object, Evas.Common_Interface) 3class Evas.Canvas3D.Scene (Evas.Canvas3D.Object)
4{ 4{
5 data: Evas_Canvas3D_Scene_Data; 5 data: Evas_Canvas3D_Scene_Data;
6 methods { 6 methods {
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index dd9e737..abfc79b 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)
54{ 54{
55 /* Code taken from _proxy_subrender() in file evas_object_image.c */ 55 /* Code taken from _proxy_subrender() in file evas_object_image.c */
56 Eo *evas = NULL; 56 Eo *evas = NULL;
57 evas = evas_common_evas_get(obj); 57 evas = evas_object_evas_get(obj);
58 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 58 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
59 Evas_Canvas3D_Texture_Data *pd = eo_data_scope_get(obj, MY_CLASS); 59 Evas_Canvas3D_Texture_Data *pd = eo_data_scope_get(obj, MY_CLASS);
60 Evas_Object_Protected_Data *source; 60 Evas_Object_Protected_Data *source;
@@ -165,7 +165,7 @@ _texture_fini(Evas_Canvas3D_Texture *obj)
165 void *data = NULL; 165 void *data = NULL;
166 Evas_Canvas3D_Material_Data *material = NULL; 166 Evas_Canvas3D_Material_Data *material = NULL;
167 167
168 evas = evas_common_evas_get(obj); 168 evas = evas_object_evas_get(obj);
169 Evas_Canvas3D_Texture_Data *pd = eo_data_scope_get(obj, MY_CLASS); 169 Evas_Canvas3D_Texture_Data *pd = eo_data_scope_get(obj, MY_CLASS);
170 170
171 if (pd->engine_data) 171 if (pd->engine_data)
@@ -224,7 +224,7 @@ _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, Evas_Canvas3D
224 if (pd->source) 224 if (pd->source)
225 { 225 {
226 Eo *evas = NULL; 226 Eo *evas = NULL;
227 evas = evas_common_evas_get(obj); 227 evas = evas_object_evas_get(obj);
228 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 228 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
229 Evas_Object_Protected_Data *src = eo_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS); 229 Evas_Object_Protected_Data *src = eo_data_scope_get(pd->source, EFL_CANVAS_OBJECT_CLASS);
230 230
@@ -343,7 +343,7 @@ _evas_canvas3d_texture_data_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd,
343{ 343{
344 Eo *evas = NULL; 344 Eo *evas = NULL;
345 void *image = NULL; 345 void *image = NULL;
346 evas = evas_common_evas_get(obj); 346 evas = evas_object_evas_get(obj);
347 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 347 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
348 348
349 if (!pd->engine_data && e->engine.func->texture_new) 349 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
378 Eo *evas = NULL; 378 Eo *evas = NULL;
379 void *image; 379 void *image;
380 380
381 evas = evas_common_evas_get(obj); 381 evas = evas_object_evas_get(obj);
382 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 382 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
383 383
384 if (!pd->engine_data && e->engine.func->texture_new) 384 if (!pd->engine_data && e->engine.func->texture_new)
@@ -406,7 +406,7 @@ EAPI void
406_evas_canvas3d_texture_source_set(Eo *obj , Evas_Canvas3D_Texture_Data *pd, Evas_Object *source) 406_evas_canvas3d_texture_source_set(Eo *obj , Evas_Canvas3D_Texture_Data *pd, Evas_Object *source)
407{ 407{
408 Eo *evas = NULL; 408 Eo *evas = NULL;
409 evas = evas_common_evas_get(obj); 409 evas = evas_object_evas_get(obj);
410 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 410 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
411 Evas_Object_Protected_Data *src; 411 Evas_Object_Protected_Data *src;
412 412
@@ -483,7 +483,7 @@ _evas_canvas3d_texture_color_format_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D
483{ 483{
484 Evas_Colorspace format = -1; 484 Evas_Colorspace format = -1;
485 Eo *evas = NULL; 485 Eo *evas = NULL;
486 evas = evas_common_evas_get(obj); 486 evas = evas_object_evas_get(obj);
487 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 487 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
488 488
489 if (e->engine.func->image_colorspace_get && 489 if (e->engine.func->image_colorspace_get &&
@@ -502,7 +502,7 @@ EOLIAN static void
502_evas_canvas3d_texture_size_get(const Eo *obj, Evas_Canvas3D_Texture_Data *pd, int *w, int *h) 502_evas_canvas3d_texture_size_get(const Eo *obj, Evas_Canvas3D_Texture_Data *pd, int *w, int *h)
503{ 503{
504 Eo *evas = NULL; 504 Eo *evas = NULL;
505 evas = evas_common_evas_get(obj); 505 evas = evas_object_evas_get(obj);
506 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 506 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
507 if (e->engine.func->texture_size_get) 507 if (e->engine.func->texture_size_get)
508 { 508 {
@@ -515,7 +515,7 @@ EOLIAN static void
515_evas_canvas3d_texture_wrap_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t) 515_evas_canvas3d_texture_wrap_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode s, Evas_Canvas3D_Wrap_Mode t)
516{ 516{
517 Eo *evas = NULL; 517 Eo *evas = NULL;
518 evas = evas_common_evas_get(obj); 518 evas = evas_object_evas_get(obj);
519 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 519 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
520 if (e->engine.func->texture_wrap_set) 520 if (e->engine.func->texture_wrap_set)
521 { 521 {
@@ -529,7 +529,7 @@ EOLIAN static void
529_evas_canvas3d_texture_wrap_get(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t) 529_evas_canvas3d_texture_wrap_get(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Wrap_Mode *s, Evas_Canvas3D_Wrap_Mode *t)
530{ 530{
531 Eo *evas = NULL; 531 Eo *evas = NULL;
532 evas = evas_common_evas_get(obj); 532 evas = evas_object_evas_get(obj);
533 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 533 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
534 if (e->engine.func->texture_wrap_set) 534 if (e->engine.func->texture_wrap_set)
535 { 535 {
@@ -542,7 +542,7 @@ EOLIAN static void
542_evas_canvas3d_texture_filter_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag) 542_evas_canvas3d_texture_filter_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd, Evas_Canvas3D_Texture_Filter min, Evas_Canvas3D_Texture_Filter mag)
543{ 543{
544 Eo *evas = NULL; 544 Eo *evas = NULL;
545 evas = evas_common_evas_get(obj); 545 evas = evas_object_evas_get(obj);
546 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 546 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
547 if (e->engine.func->texture_filter_set) 547 if (e->engine.func->texture_filter_set)
548 { 548 {
@@ -556,7 +556,7 @@ EOLIAN static void
556_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) 556_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)
557{ 557{
558 Eo *evas = NULL; 558 Eo *evas = NULL;
559 evas = evas_common_evas_get(obj); 559 evas = evas_object_evas_get(obj);
560 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS); 560 Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CANVAS_CLASS);
561 if (e->engine.func->texture_filter_get) 561 if (e->engine.func->texture_filter_get)
562 { 562 {
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.eo b/src/lib/evas/canvas/evas_canvas3d_texture.eo
index 7d74e62..af187ad 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.eo
@@ -1,6 +1,6 @@
1type @extern Evas_Colorspace: int; /* FIXME: Need to get emile migrated. */ 1type @extern Evas_Colorspace: int; /* FIXME: Need to get emile migrated. */
2 2
3class Evas.Canvas3D.Texture (Evas.Canvas3D.Object, Evas.Common_Interface) 3class Evas.Canvas3D.Texture (Evas.Canvas3D.Object)
4{ 4{
5 data : Evas_Canvas3D_Texture_Data; 5 data : Evas_Canvas3D_Texture_Data;
6 methods { 6 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 eb90b0b..0000000
--- a/src/lib/evas/canvas/evas_common_interface.c
+++ /dev/null
@@ -1,3 +0,0 @@
1#include "evas_common_private.h"
2#include "evas_private.h"
3#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 2e7310c..0000000
--- a/src/lib/evas/canvas/evas_common_interface.eo
+++ /dev/null
@@ -1,15 +0,0 @@
1interface Evas.Common_Interface ()
2{
3 eo_prefix: evas_common;
4 methods {
5 @property evas {
6 get {
7 legacy: evas_object_evas_get;
8 }
9 values {
10 /* FIXME: This is actually wrong, should return Evas. */
11 ret: Evas.Common_Interface;
12 }
13 }
14 }
15}
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 3e96704..f2c9b44 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)
586 evas_common_convert_argb_unpremul(data, len); 586 evas_common_convert_argb_unpremul(data, len);
587} 587}
588 588
589EOLIAN static Evas * 589EOLIAN static Eo *
590_evas_canvas_evas_common_interface_evas_get(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED) 590_evas_canvas_eo_base_provider_find(Eo *eo_e, Evas_Public_Data *e EINA_UNUSED,
591 const Eo_Class *klass)
591{ 592{
592 return (Evas *)eo_e; 593 if (klass == EVAS_CANVAS_CLASS)
594 return eo_e;
595 return eo_provider_find(eo_super(eo_e, MY_CLASS), klass);
593} 596}
594 597
595Ector_Surface * 598Ector_Surface *
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 08005e1..6d26b77 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 *
151_efl_canvas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj) 151_efl_canvas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
152{ 152{
153 Eo *parent = NULL; 153 Eo *parent = NULL;
154 Evas *evas;
154 155
155 eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS)); 156 eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
156 efl_canvas_object_type_set(eo_obj, MY_CLASS_NAME); 157 efl_canvas_object_type_set(eo_obj, MY_CLASS_NAME);
157 eo_manual_free_set(eo_obj, EINA_TRUE); 158 eo_manual_free_set(eo_obj, EINA_TRUE);
158 159
159 parent = eo_parent_get(eo_obj); 160 parent = eo_parent_get(eo_obj);
161 evas = evas_object_evas_get(parent);
160 162
161 if (!obj || !_init_cow() || !eo_isa(parent, EVAS_COMMON_INTERFACE_INTERFACE)) 163 if (!obj || !_init_cow() || !evas)
162 { 164 {
163 ERR("Failed"); 165 ERR("Failed to create a canvas object (evas: %p)", evas);
164 return NULL; 166 return NULL;
165 } 167 }
166 168
@@ -173,7 +175,7 @@ _efl_canvas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *o
173 obj->data_3d = eina_cow_alloc(evas_object_3d_cow); 175 obj->data_3d = eina_cow_alloc(evas_object_3d_cow);
174 obj->mask = eina_cow_alloc(evas_object_mask_cow); 176 obj->mask = eina_cow_alloc(evas_object_mask_cow);
175 177
176 evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); 178 evas_object_inject(eo_obj, obj, evas);
177 179
178 eo_event_callback_array_add(eo_obj, event_catcher_watch(), obj); 180 eo_event_callback_array_add(eo_obj, event_catcher_watch(), obj);
179 181
@@ -1912,11 +1914,15 @@ _efl_canvas_object_eo_base_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Data *
1912 } 1914 }
1913} 1915}
1914 1916
1915EOLIAN static Evas * 1917EOLIAN static Eo *
1916_efl_canvas_object_evas_common_interface_evas_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) 1918_efl_canvas_object_eo_base_provider_find(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, const Eo_Class *klass)
1917{ 1919{
1918 if ((obj->delete_me) || (!obj->layer)) return NULL; 1920 if (klass == EVAS_CANVAS_CLASS)
1919 return obj->layer->evas->evas; 1921 {
1922 if ((obj->delete_me) || (!obj->layer)) return NULL;
1923 return obj->layer->evas->evas;
1924 }
1925 return eo_provider_find(eo_super(eo_obj, MY_CLASS), klass);
1920} 1926}
1921 1927
1922EOLIAN Evas_Object* 1928EOLIAN Evas_Object*
@@ -2166,6 +2172,7 @@ _efl_canvas_object_legacy_ctor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
2166 obj->legacy = EINA_TRUE; 2172 obj->legacy = EINA_TRUE;
2167} 2173}
2168 2174
2175
2169/* legacy */ 2176/* legacy */
2170 2177
2171EAPI const char * 2178EAPI const char *
@@ -2275,4 +2282,10 @@ evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
2275 efl_gfx_size_hint_align_get(obj, x, y); 2282 efl_gfx_size_hint_align_get(obj, x, y);
2276} 2283}
2277 2284
2285EAPI Evas *
2286evas_object_evas_get(const Eo *eo_obj)
2287{
2288 return eo_provider_find((Eo *) eo_obj, EVAS_CANVAS_CLASS);
2289}
2290
2278#include "canvas/efl_canvas_object.eo.c" 2291#include "canvas/efl_canvas_object.eo.c"