evas: enforce legacy parent to be the canvas.

This commit is contained in:
Cedric Bail 2018-05-08 17:37:30 -07:00 committed by Cedric BAIL
parent f44511d0f9
commit c2e8b492b1
15 changed files with 16 additions and 16 deletions

View File

@ -289,7 +289,7 @@ _edje_edit_efl_file_mmap_set(Eo *obj, Edje_Edit *eed, const Eina_File *mmap, con
EAPI Evas_Object *
edje_edit_object_add(Evas *evas)
{
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -21,7 +21,7 @@ EAPI Evas_Object *
edje_object_add(Evas *evas)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -230,7 +230,7 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int
EAPI Evas_Object *
emotion_object_add(Evas *evas)
{
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -404,7 +404,7 @@ EAPI Evas_Object *
evas_object_event_grabber_add(Evas *eo_e)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
return efl_add(MY_CLASS, eo_e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(eo_e), efl_canvas_object_legacy_ctor(efl_added));
}
#include "efl_canvas_event_grabber.eo.c"

View File

@ -128,7 +128,7 @@ evas_object_vg_add(Evas *e)
return NULL;
MAGIC_CHECK_END();
// TODO: Ask backend to return the main Ector_Surface
return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Efl_VG *

View File

@ -26,7 +26,7 @@ EAPI Evas_Object *
evas_object_image_add(Evas *eo_e)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
return efl_add(EVAS_IMAGE_CLASS, eo_e,
return efl_add(EVAS_IMAGE_CLASS, evas_find(eo_e),
efl_gfx_fill_auto_set(efl_added, EINA_FALSE),
efl_canvas_object_legacy_ctor(efl_added));
}
@ -35,7 +35,7 @@ EAPI Evas_Object *
evas_object_image_filled_add(Evas *eo_e)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
return efl_add(EVAS_IMAGE_CLASS, eo_e,
return efl_add(EVAS_IMAGE_CLASS, evas_find(eo_e),
efl_canvas_object_legacy_ctor(efl_added));
}

View File

@ -478,7 +478,7 @@ evas_object_box_add(Evas *evas)
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -276,7 +276,7 @@ evas_object_grid_add(Evas *evas)
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -97,7 +97,7 @@ evas_object_line_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(EVAS_LINE_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(EVAS_LINE_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static void

View File

@ -87,7 +87,7 @@ evas_object_polygon_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -95,7 +95,7 @@ evas_object_rectangle_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(EFL_CANVAS_RECTANGLE_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -676,7 +676,7 @@ evas_object_smart_add(Evas *eo_e, Evas_Smart *s)
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
eo_obj = efl_add(EFL_CANVAS_GROUP_CLASS, eo_e, efl_canvas_object_legacy_ctor(efl_added));
eo_obj = efl_add(EFL_CANVAS_GROUP_CLASS, evas_find(eo_e), efl_canvas_object_legacy_ctor(efl_added));
evas_object_smart_attach(eo_obj, s);
return eo_obj;
}

View File

@ -982,7 +982,7 @@ evas_object_table_add(Evas *evas)
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(MY_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(MY_CLASS, evas_find(evas), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -379,7 +379,7 @@ evas_object_text_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(EVAS_TEXT_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(EVAS_TEXT_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *

View File

@ -902,7 +902,7 @@ evas_object_textgrid_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return efl_add(EVAS_TEXTGRID_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
return efl_add(EVAS_TEXTGRID_CLASS, evas_find(e), efl_canvas_object_legacy_ctor(efl_added));
}
EOLIAN static Eo *