summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-07 14:00:43 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-07 14:50:31 +0900
commitd39bbc149113da5d842f30d046dc04302e54275b (patch)
treebf4fb87d6af59bfd2720a15293362a64ad7f3815 /src/lib
parent6cea4993e0ea7425a1dde2b38bcdb63687a7eaad (diff)
elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set: if the widget is legacy or pure eo we may need to select a different style. So in the constructor we need to know whether we are legacy or eo. Note that calling style_set in finalize only is too late as we would lose information such as efl_text_set() called inside efl_add().
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/efl_ui_bg.c2
-rw-r--r--src/lib/elementary/efl_ui_button.c2
-rw-r--r--src/lib/elementary/efl_ui_check.c2
-rw-r--r--src/lib/elementary/efl_ui_flip.c2
-rw-r--r--src/lib/elementary/efl_ui_frame.c2
-rw-r--r--src/lib/elementary/efl_ui_image.c2
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c2
-rw-r--r--src/lib/elementary/efl_ui_layout.c2
-rw-r--r--src/lib/elementary/efl_ui_multibuttonentry.c2
-rw-r--r--src/lib/elementary/efl_ui_panes.c2
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c2
-rw-r--r--src/lib/elementary/efl_ui_radio.c2
-rw-r--r--src/lib/elementary/efl_ui_slider.c2
-rw-r--r--src/lib/elementary/efl_ui_video.c2
-rw-r--r--src/lib/elementary/efl_ui_win.c44
-rw-r--r--src/lib/elementary/elc_combobox.c27
-rw-r--r--src/lib/elementary/elc_ctxpopup.c2
-rw-r--r--src/lib/elementary/elc_fileselector.c2
-rw-r--r--src/lib/elementary/elc_fileselector_button.c2
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c2
-rw-r--r--src/lib/elementary/elc_hoversel.c2
-rw-r--r--src/lib/elementary/elc_naviframe.c2
-rw-r--r--src/lib/elementary/elc_player.c2
-rw-r--r--src/lib/elementary/elc_popup.c2
-rw-r--r--src/lib/elementary/elm_access.c2
-rw-r--r--src/lib/elementary/elm_actionslider.c2
-rw-r--r--src/lib/elementary/elm_box.c2
-rw-r--r--src/lib/elementary/elm_bubble.c2
-rw-r--r--src/lib/elementary/elm_calendar.c2
-rw-r--r--src/lib/elementary/elm_clock.c2
-rw-r--r--src/lib/elementary/elm_code_widget.c3
-rw-r--r--src/lib/elementary/elm_colorselector.c17
-rw-r--r--src/lib/elementary/elm_conform.c2
-rw-r--r--src/lib/elementary/elm_datetime.c2
-rw-r--r--src/lib/elementary/elm_dayselector.c2
-rw-r--r--src/lib/elementary/elm_diskselector.c2
-rw-r--r--src/lib/elementary/elm_entry.c2
-rw-r--r--src/lib/elementary/elm_flipselector.c2
-rw-r--r--src/lib/elementary/elm_gengrid.c2
-rw-r--r--src/lib/elementary/elm_genlist.c2
-rw-r--r--src/lib/elementary/elm_gesture_layer.c2
-rw-r--r--src/lib/elementary/elm_glview.c10
-rw-r--r--src/lib/elementary/elm_grid.c2
-rw-r--r--src/lib/elementary/elm_hover.c2
-rw-r--r--src/lib/elementary/elm_icon.c2
-rw-r--r--src/lib/elementary/elm_index.c2
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c2
-rw-r--r--src/lib/elementary/elm_inwin.c2
-rw-r--r--src/lib/elementary/elm_label.c2
-rw-r--r--src/lib/elementary/elm_list.c2
-rw-r--r--src/lib/elementary/elm_map.c2
-rw-r--r--src/lib/elementary/elm_mapbuf.c2
-rw-r--r--src/lib/elementary/elm_menu.c2
-rw-r--r--src/lib/elementary/elm_notify.c2
-rw-r--r--src/lib/elementary/elm_panel.c2
-rw-r--r--src/lib/elementary/elm_photo.c2
-rw-r--r--src/lib/elementary/elm_plug.c2
-rw-r--r--src/lib/elementary/elm_prefs.c2
-rw-r--r--src/lib/elementary/elm_route.c2
-rw-r--r--src/lib/elementary/elm_scroller.c2
-rw-r--r--src/lib/elementary/elm_segment_control.c2
-rw-r--r--src/lib/elementary/elm_separator.c2
-rw-r--r--src/lib/elementary/elm_slideshow.c2
-rw-r--r--src/lib/elementary/elm_spinner.c2
-rw-r--r--src/lib/elementary/elm_table.c2
-rw-r--r--src/lib/elementary/elm_thumb.c2
-rw-r--r--src/lib/elementary/elm_toolbar.c2
-rw-r--r--src/lib/elementary/elm_web2.c2
-rw-r--r--src/lib/elementary/elm_widget.c7
-rw-r--r--src/lib/elementary/elm_widget.h12
70 files changed, 126 insertions, 120 deletions
diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c
index 7bb9e8b..73dcdae 100644
--- a/src/lib/elementary/efl_ui_bg.c
+++ b/src/lib/elementary/efl_ui_bg.c
@@ -114,7 +114,7 @@ EAPI Evas_Object *
114elm_bg_add(Evas_Object *parent) 114elm_bg_add(Evas_Object *parent)
115{ 115{
116 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 116 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
117 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 117 return elm_legacy_add(MY_CLASS, parent);
118} 118}
119 119
120EOLIAN static Eo * 120EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index 4576238..d044b4c 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -300,7 +300,7 @@ EAPI Evas_Object *
300elm_button_add(Evas_Object *parent) 300elm_button_add(Evas_Object *parent)
301{ 301{
302 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 302 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
303 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 303 return elm_legacy_add(MY_CLASS, parent);
304} 304}
305 305
306EOLIAN static Eo * 306EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c
index 6a23310..836cc3a 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -314,7 +314,7 @@ EAPI Evas_Object *
314elm_check_add(Evas_Object *parent) 314elm_check_add(Evas_Object *parent)
315{ 315{
316 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 316 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
317 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 317 return elm_legacy_add(MY_CLASS, parent);
318} 318}
319 319
320EOLIAN static Eo * 320EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c
index cdaebad..c001567 100644
--- a/src/lib/elementary/efl_ui_flip.c
+++ b/src/lib/elementary/efl_ui_flip.c
@@ -1866,7 +1866,7 @@ EAPI Evas_Object *
1866elm_flip_add(Evas_Object *parent) 1866elm_flip_add(Evas_Object *parent)
1867{ 1867{
1868 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1868 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1869 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1869 return elm_legacy_add(MY_CLASS, parent);
1870} 1870}
1871 1871
1872EOLIAN static Eo * 1872EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c
index 187b14f..2ca12ad 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -139,7 +139,7 @@ EAPI Evas_Object *
139elm_frame_add(Evas_Object *parent) 139elm_frame_add(Evas_Object *parent)
140{ 140{
141 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 141 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
142 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 142 return elm_legacy_add(MY_CLASS, parent);
143} 143}
144 144
145EOLIAN static Eo * 145EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 871a268..d87b4be 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -850,7 +850,7 @@ EAPI Evas_Object *
850elm_image_add(Evas_Object *parent) 850elm_image_add(Evas_Object *parent)
851{ 851{
852 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 852 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
853 Evas_Object *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 853 Evas_Object *obj = elm_legacy_add(MY_CLASS, parent);
854 EFL_UI_IMAGE_DATA_GET(obj, priv); 854 EFL_UI_IMAGE_DATA_GET(obj, priv);
855 855
856 efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _on_size_hints_changed, priv); 856 efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGE_SIZE_HINTS, _on_size_hints_changed, priv);
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index 84f348a..dc2a5ba 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -2717,7 +2717,7 @@ EAPI Evas_Object *
2717elm_photocam_add(Evas_Object *parent) 2717elm_photocam_add(Evas_Object *parent)
2718{ 2718{
2719 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2719 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2720 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 2720 return elm_legacy_add(MY_CLASS, parent);
2721} 2721}
2722 2722
2723static inline void 2723static inline void
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index f61d72b..e82ef5f 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2050,7 +2050,7 @@ EAPI Evas_Object *
2050elm_layout_add(Evas_Object *parent) 2050elm_layout_add(Evas_Object *parent)
2051{ 2051{
2052 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2052 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2053 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 2053 return elm_legacy_add(MY_CLASS, parent);
2054} 2054}
2055 2055
2056EOLIAN static Eo * 2056EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_multibuttonentry.c b/src/lib/elementary/efl_ui_multibuttonentry.c
index ee019f4..cb489ac 100644
--- a/src/lib/elementary/efl_ui_multibuttonentry.c
+++ b/src/lib/elementary/efl_ui_multibuttonentry.c
@@ -1713,7 +1713,7 @@ EAPI Evas_Object *
1713elm_multibuttonentry_add(Evas_Object *parent) 1713elm_multibuttonentry_add(Evas_Object *parent)
1714{ 1714{
1715 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1715 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1716 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1716 return elm_legacy_add(MY_CLASS, parent);
1717} 1717}
1718 1718
1719static void 1719static void
diff --git a/src/lib/elementary/efl_ui_panes.c b/src/lib/elementary/efl_ui_panes.c
index dea1363..9c46cab 100644
--- a/src/lib/elementary/efl_ui_panes.c
+++ b/src/lib/elementary/efl_ui_panes.c
@@ -578,7 +578,7 @@ EAPI Evas_Object *
578elm_panes_add(Evas_Object *parent) 578elm_panes_add(Evas_Object *parent)
579{ 579{
580 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 580 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
581 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 581 return elm_legacy_add(MY_CLASS, parent);
582} 582}
583 583
584EAPI void 584EAPI void
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index 461869c..67b98b1 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -575,7 +575,7 @@ EAPI Evas_Object *
575elm_progressbar_add(Evas_Object *parent) 575elm_progressbar_add(Evas_Object *parent)
576{ 576{
577 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 577 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
578 Eo *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 578 Eo *obj = elm_legacy_add(MY_CLASS, parent);
579 elm_progressbar_unit_format_set(obj, "%.0f %%"); 579 elm_progressbar_unit_format_set(obj, "%.0f %%");
580 580
581 return obj; 581 return obj;
diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c
index 89d0578..3281fec 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -384,7 +384,7 @@ EAPI Evas_Object *
384elm_radio_add(Evas_Object *parent) 384elm_radio_add(Evas_Object *parent)
385{ 385{
386 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 386 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
387 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 387 return elm_legacy_add(MY_CLASS, parent);
388} 388}
389 389
390EAPI void 390EAPI void
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 2fc9689..919e0b7 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -1483,7 +1483,7 @@ EAPI Evas_Object *
1483elm_slider_add(Evas_Object *parent) 1483elm_slider_add(Evas_Object *parent)
1484{ 1484{
1485 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1485 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1486 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1486 return elm_legacy_add(MY_CLASS, parent);
1487} 1487}
1488 1488
1489EAPI void 1489EAPI void
diff --git a/src/lib/elementary/efl_ui_video.c b/src/lib/elementary/efl_ui_video.c
index 486b13d..3895b1c 100644
--- a/src/lib/elementary/efl_ui_video.c
+++ b/src/lib/elementary/efl_ui_video.c
@@ -256,7 +256,7 @@ EAPI Evas_Object *
256elm_video_add(Evas_Object *parent) 256elm_video_add(Evas_Object *parent)
257{ 257{
258 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 258 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
259 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 259 return elm_legacy_add(MY_CLASS, parent);
260} 260}
261 261
262EOLIAN static Eo * 262EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 87e7e962..1b7ad80 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5342,13 +5342,6 @@ _efl_ui_win_efl_object_finalize(Eo *obj, Efl_Ui_Win_Data *sd)
5342 return obj; 5342 return obj;
5343} 5343}
5344 5344
5345EOLIAN static void
5346_efl_ui_win_efl_canvas_object_legacy_ctor(Eo *obj, Efl_Ui_Win_Data *sd)
5347{
5348 sd->legacy.ctor = EINA_TRUE;
5349 efl_canvas_object_legacy_ctor(efl_super(obj, MY_CLASS));
5350}
5351
5352EOLIAN static Efl_Ui_Focus_Manager* 5345EOLIAN static Efl_Ui_Focus_Manager*
5353_efl_ui_win_elm_widget_focus_manager_create(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root) 5346_efl_ui_win_elm_widget_focus_manager_create(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
5354{ 5347{
@@ -8089,20 +8082,18 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
8089 default: break; 8082 default: break;
8090 } 8083 }
8091 8084
8092 return efl_add(klass, parent, 8085 return elm_legacy_add(klass, parent,
8093 efl_canvas_object_legacy_ctor(efl_added), 8086 efl_ui_win_name_set(efl_added, name),
8094 efl_ui_win_name_set(efl_added, name), 8087 efl_ui_win_type_set(efl_added, type));
8095 efl_ui_win_type_set(efl_added, type));
8096} 8088}
8097 8089
8098EAPI Evas_Object * 8090EAPI Evas_Object *
8099elm_win_fake_add(Ecore_Evas *ee) 8091elm_win_fake_add(Ecore_Evas *ee)
8100{ 8092{
8101 return efl_add(MY_CLASS, NULL, 8093 return elm_legacy_add(MY_CLASS, NULL,
8102 efl_canvas_object_legacy_ctor(efl_added), 8094 _fake_canvas_set(efl_added, ee),
8103 _fake_canvas_set(efl_added, ee), 8095 efl_ui_win_name_set(efl_added, NULL),
8104 efl_ui_win_name_set(efl_added, NULL), 8096 efl_ui_win_type_set(efl_added, ELM_WIN_FAKE));
8105 efl_ui_win_type_set(efl_added, ELM_WIN_FAKE));
8106} 8097}
8107 8098
8108EAPI Evas_Object * 8099EAPI Evas_Object *
@@ -8110,11 +8101,10 @@ elm_win_util_standard_add(const char *name, const char *title)
8110{ 8101{
8111 Evas_Object *win; 8102 Evas_Object *win;
8112 8103
8113 win = efl_add(EFL_UI_WIN_CLASS, NULL, 8104 win = elm_legacy_add(EFL_UI_WIN_CLASS, NULL,
8114 efl_canvas_object_legacy_ctor(efl_added), 8105 efl_text_set(efl_added, title),
8115 efl_text_set(efl_added, title), 8106 efl_ui_win_name_set(efl_added, name),
8116 efl_ui_win_name_set(efl_added, name), 8107 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC));
8117 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC));
8118 if (!win) return NULL; 8108 if (!win) return NULL;
8119 8109
8120 _elm_win_standard_init(win); 8110 _elm_win_standard_init(win);
@@ -8126,11 +8116,10 @@ elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title
8126{ 8116{
8127 Evas_Object *win; 8117 Evas_Object *win;
8128 8118
8129 win = efl_add(EFL_UI_WIN_CLASS, parent, 8119 win = elm_legacy_add(EFL_UI_WIN_CLASS, parent,
8130 efl_canvas_object_legacy_ctor(efl_added), 8120 efl_text_set(efl_added, title),
8131 efl_text_set(efl_added, title), 8121 efl_ui_win_name_set(efl_added, name),
8132 efl_ui_win_name_set(efl_added, name), 8122 efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC));
8133 efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC));
8134 if (!win) return NULL; 8123 if (!win) return NULL;
8135 8124
8136 _elm_win_standard_init(win); 8125 _elm_win_standard_init(win);
@@ -8427,7 +8416,6 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_win, Efl_Ui_Win_Data)
8427 8416
8428#define EFL_UI_WIN_EXTRA_OPS \ 8417#define EFL_UI_WIN_EXTRA_OPS \
8429 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_win), \ 8418 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_win), \
8430 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_win), \ 8419 ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_win)
8431 EFL_OBJECT_OP_FUNC(efl_canvas_object_legacy_ctor, _efl_ui_win_efl_canvas_object_legacy_ctor)
8432 8420
8433#include "efl_ui_win.eo.c" 8421#include "efl_ui_win.eo.c"
diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c
index a7b9e5a..11b4156 100644
--- a/src/lib/elementary/elc_combobox.c
+++ b/src/lib/elementary/elc_combobox.c
@@ -337,16 +337,7 @@ EAPI Evas_Object *
337elm_combobox_add(Evas_Object *parent) 337elm_combobox_add(Evas_Object *parent)
338{ 338{
339 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 339 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
340 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 340 return elm_legacy_add(MY_CLASS, parent);
341}
342
343static inline void
344_hover_ctor(Eo *parent, Eo *hover)
345{
346 ELM_WIDGET_DATA_GET_OR_RETURN(parent, wd);
347 if (wd->legacy)
348 efl_canvas_object_legacy_ctor(hover);
349 efl_gfx_visible_set(hover, EINA_FALSE);
350} 341}
351 342
352EOLIAN static Eo * 343EOLIAN static Eo *
@@ -370,9 +361,19 @@ _elm_combobox_efl_object_constructor(Eo *obj, Elm_Combobox_Data *sd)
370 snprintf(buf, sizeof(buf), "combobox_vertical/%s", elm_widget_style_get(obj)); 361 snprintf(buf, sizeof(buf), "combobox_vertical/%s", elm_widget_style_get(obj));
371 362
372 //hover 363 //hover
373 sd->hover = efl_add(ELM_HOVER_CLASS, sd->hover_parent, 364 if (elm_widget_is_legacy(obj))
374 _hover_ctor(obj, efl_added), 365 {
375 efl_ui_widget_style_set(efl_added, buf)); 366 sd->hover = elm_legacy_add(ELM_HOVER_CLASS, sd->hover_parent,
367 efl_gfx_visible_set(efl_added, EINA_FALSE),
368 efl_ui_widget_style_set(efl_added, buf));
369 }
370 else
371 {
372 sd->hover = efl_add(ELM_HOVER_CLASS, sd->hover_parent,
373 efl_gfx_visible_set(efl_added, EINA_FALSE),
374 efl_ui_widget_style_set(efl_added, buf));
375 }
376
376 evas_object_layer_set(sd->hover, EVAS_LAYER_MAX); 377 evas_object_layer_set(sd->hover, EVAS_LAYER_MAX);
377 efl_ui_mirrored_automatic_set(sd->hover, EINA_FALSE); 378 efl_ui_mirrored_automatic_set(sd->hover, EINA_FALSE);
378 elm_hover_target_set(sd->hover, obj); 379 elm_hover_target_set(sd->hover, obj);
diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c
index c392d8f..bbe9132 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -1110,7 +1110,7 @@ EAPI Evas_Object *
1110elm_ctxpopup_add(Evas_Object *parent) 1110elm_ctxpopup_add(Evas_Object *parent)
1111{ 1111{
1112 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1112 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1113 Evas_Object *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1113 Evas_Object *obj = elm_legacy_add(MY_CLASS, parent);
1114 1114
1115 /* access: parent could be any object such as elm_list which does 1115 /* access: parent could be any object such as elm_list which does
1116 not know elc_ctxpopup as its child object in the focus_next(); */ 1116 not know elc_ctxpopup as its child object in the focus_next(); */
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c
index a9b8d41..3df9845 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -2043,7 +2043,7 @@ EAPI Evas_Object *
2043elm_fileselector_add(Evas_Object *parent) 2043elm_fileselector_add(Evas_Object *parent)
2044{ 2044{
2045 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2045 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2046 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 2046 return elm_legacy_add(MY_CLASS, parent);
2047} 2047}
2048 2048
2049EOLIAN static Eo * 2049EOLIAN static Eo *
diff --git a/src/lib/elementary/elc_fileselector_button.c b/src/lib/elementary/elc_fileselector_button.c
index ef4cd00..52b7789 100644
--- a/src/lib/elementary/elc_fileselector_button.c
+++ b/src/lib/elementary/elc_fileselector_button.c
@@ -262,7 +262,7 @@ EAPI Evas_Object *
262elm_fileselector_button_add(Evas_Object *parent) 262elm_fileselector_button_add(Evas_Object *parent)
263{ 263{
264 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 264 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
265 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 265 return elm_legacy_add(MY_CLASS, parent);
266} 266}
267 267
268EOLIAN static Eo * 268EOLIAN static Eo *
diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c
index d752e49..048be29 100644
--- a/src/lib/elementary/elc_fileselector_entry.c
+++ b/src/lib/elementary/elc_fileselector_entry.c
@@ -331,7 +331,7 @@ EAPI Evas_Object *
331elm_fileselector_entry_add(Evas_Object *parent) 331elm_fileselector_entry_add(Evas_Object *parent)
332{ 332{
333 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 333 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
334 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 334 return elm_legacy_add(MY_CLASS, parent);
335} 335}
336 336
337EOLIAN static Eo * 337EOLIAN static Eo *
diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c
index a81212c..e5cf4ff 100644
--- a/src/lib/elementary/elc_hoversel.c
+++ b/src/lib/elementary/elc_hoversel.c
@@ -685,7 +685,7 @@ EAPI Evas_Object *
685elm_hoversel_add(Evas_Object *parent) 685elm_hoversel_add(Evas_Object *parent)
686{ 686{
687 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 687 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
688 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 688 return elm_legacy_add(MY_CLASS, parent);
689} 689}
690 690
691EOLIAN static Eo * 691EOLIAN static Eo *
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index a56c0cf..97d963e 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -1581,7 +1581,7 @@ EAPI Evas_Object *
1581elm_naviframe_add(Evas_Object *parent) 1581elm_naviframe_add(Evas_Object *parent)
1582{ 1582{
1583 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1583 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1584 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1584 return elm_legacy_add(MY_CLASS, parent);
1585} 1585}
1586 1586
1587EOLIAN static Eo * 1587EOLIAN static Eo *
diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c
index 27645a9..7249bb6 100644
--- a/src/lib/elementary/elc_player.c
+++ b/src/lib/elementary/elc_player.c
@@ -658,7 +658,7 @@ EAPI Evas_Object *
658elm_player_add(Evas_Object *parent) 658elm_player_add(Evas_Object *parent)
659{ 659{
660 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 660 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
661 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 661 return elm_legacy_add(MY_CLASS, parent);
662} 662}
663 663
664EOLIAN static Eo * 664EOLIAN static Eo *
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index fc4f6a4..3a2f221 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -1515,7 +1515,7 @@ EAPI Evas_Object *
1515elm_popup_add(Evas_Object *parent) 1515elm_popup_add(Evas_Object *parent)
1516{ 1516{
1517 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1517 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1518 Evas_Object *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1518 Evas_Object *obj = elm_legacy_add(MY_CLASS, parent);
1519 1519
1520 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 1520 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
1521 wd->highlight_root = EINA_TRUE; 1521 wd->highlight_root = EINA_TRUE;
diff --git a/src/lib/elementary/elm_access.c b/src/lib/elementary/elm_access.c
index fd953d1..47c45a7 100644
--- a/src/lib/elementary/elm_access.c
+++ b/src/lib/elementary/elm_access.c
@@ -1260,7 +1260,7 @@ static Evas_Object *
1260_elm_access_add(Evas_Object *parent) 1260_elm_access_add(Evas_Object *parent)
1261{ 1261{
1262 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1262 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1263 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1263 return elm_legacy_add(MY_CLASS, parent);
1264} 1264}
1265 1265
1266EOLIAN static Eo * 1266EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_actionslider.c b/src/lib/elementary/elm_actionslider.c
index f7ea011..1fdbf29 100644
--- a/src/lib/elementary/elm_actionslider.c
+++ b/src/lib/elementary/elm_actionslider.c
@@ -539,7 +539,7 @@ EAPI Evas_Object *
539elm_actionslider_add(Evas_Object *parent) 539elm_actionslider_add(Evas_Object *parent)
540{ 540{
541 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 541 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
542 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 542 return elm_legacy_add(MY_CLASS, parent);
543} 543}
544 544
545EOLIAN static Eo * 545EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c
index b59705d..6b4a886 100644
--- a/src/lib/elementary/elm_box.c
+++ b/src/lib/elementary/elm_box.c
@@ -366,7 +366,7 @@ EAPI Evas_Object *
366elm_box_add(Evas_Object *parent) 366elm_box_add(Evas_Object *parent)
367{ 367{
368 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 368 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
369 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 369 return elm_legacy_add(MY_CLASS, parent);
370} 370}
371 371
372EOLIAN static Eo * 372EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_bubble.c b/src/lib/elementary/elm_bubble.c
index 915bf43..b46018a 100644
--- a/src/lib/elementary/elm_bubble.c
+++ b/src/lib/elementary/elm_bubble.c
@@ -187,7 +187,7 @@ EAPI Evas_Object *
187elm_bubble_add(Evas_Object *parent) 187elm_bubble_add(Evas_Object *parent)
188{ 188{
189 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 189 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
190 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 190 return elm_legacy_add(MY_CLASS, parent);
191} 191}
192 192
193EOLIAN static Eo * 193EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_calendar.c b/src/lib/elementary/elm_calendar.c
index 5155389..e236bdc 100644
--- a/src/lib/elementary/elm_calendar.c
+++ b/src/lib/elementary/elm_calendar.c
@@ -1602,7 +1602,7 @@ EAPI Evas_Object *
1602elm_calendar_add(Evas_Object *parent) 1602elm_calendar_add(Evas_Object *parent)
1603{ 1603{
1604 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1604 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1605 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1605 return elm_legacy_add(MY_CLASS, parent);
1606} 1606}
1607 1607
1608EOLIAN static Eo * 1608EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_clock.c b/src/lib/elementary/elm_clock.c
index 4a2f528..757363d 100644
--- a/src/lib/elementary/elm_clock.c
+++ b/src/lib/elementary/elm_clock.c
@@ -775,7 +775,7 @@ EAPI Evas_Object *
775elm_clock_add(Evas_Object *parent) 775elm_clock_add(Evas_Object *parent)
776{ 776{
777 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 777 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
778 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 778 return elm_legacy_add(MY_CLASS, parent);
779} 779}
780 780
781EOLIAN static Eo * 781EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index 175bc86..1ce0ffa 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -61,8 +61,7 @@ EAPI Evas_Object *
61elm_code_widget_add(Evas_Object *parent, Elm_Code *code) 61elm_code_widget_add(Evas_Object *parent, Elm_Code *code)
62{ 62{
63 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 63 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
64 return efl_add(MY_CLASS, parent, elm_obj_code_widget_code_set(efl_added, code), 64 return elm_legacy_add(MY_CLASS, parent, elm_obj_code_widget_code_set(efl_added, code));
65 efl_canvas_object_legacy_ctor(efl_added));
66} 65}
67 66
68EOLIAN static Eo * 67EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c
index 710c337..e96ea0a 100644
--- a/src/lib/elementary/elm_colorselector.c
+++ b/src/lib/elementary/elm_colorselector.c
@@ -1882,9 +1882,8 @@ _palette_colors_load(Evas_Object *obj)
1882} 1882}
1883 1883
1884static inline void 1884static inline void
1885_palette_box_prepare(Eo *o, Eina_Bool legacy) 1885_palette_box_prepare(Eo *o)
1886{ 1886{
1887 if (legacy) efl_canvas_object_legacy_ctor(o);
1888 efl_ui_direction_set(o, EFL_UI_DIR_HORIZONTAL); 1887 efl_ui_direction_set(o, EFL_UI_DIR_HORIZONTAL);
1889 efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1888 efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1890 efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); 1889 efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -1903,8 +1902,16 @@ _create_colorpalette(Evas_Object *obj)
1903 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 1902 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
1904 1903
1905 if (sd->palette_box) return; 1904 if (sd->palette_box) return;
1906 sd->palette_box = efl_add(EFL_UI_BOX_FLOW_CLASS, obj, 1905 if (elm_widget_is_legacy(obj))
1907 _palette_box_prepare(efl_added, wd->legacy)); 1906 {
1907 sd->palette_box = elm_legacy_add(EFL_UI_BOX_FLOW_CLASS, obj,
1908 _palette_box_prepare(efl_added));
1909 }
1910 else
1911 {
1912 sd->palette_box = efl_add(EFL_UI_BOX_FLOW_CLASS, obj,
1913 _palette_box_prepare(efl_added));
1914 }
1908 1915
1909 hpadstr = edje_object_data_get(wd->resize_obj, "horizontal_pad"); 1916 hpadstr = edje_object_data_get(wd->resize_obj, "horizontal_pad");
1910 if (hpadstr) h_pad = atoi(hpadstr); 1917 if (hpadstr) h_pad = atoi(hpadstr);
@@ -2259,7 +2266,7 @@ EAPI Evas_Object *
2259elm_colorselector_add(Evas_Object *parent) 2266elm_colorselector_add(Evas_Object *parent)
2260{ 2267{
2261 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2268 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2262 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 2269 return elm_legacy_add(MY_CLASS, parent);
2263} 2270}
2264 2271
2265EOLIAN static Eo * 2272EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c
index 4e88196..55f04de 100644
--- a/src/lib/elementary/elm_conform.c
+++ b/src/lib/elementary/elm_conform.c
@@ -992,7 +992,7 @@ EAPI Evas_Object *
992elm_conformant_add(Evas_Object *parent) 992elm_conformant_add(Evas_Object *parent)
993{ 993{
994 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 994 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
995 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 995 return elm_legacy_add(MY_CLASS, parent);
996} 996}
997 997
998EOLIAN static Eo * 998EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_datetime.c b/src/lib/elementary/elm_datetime.c
index 6c9f34d..fc68f87 100644
--- a/src/lib/elementary/elm_datetime.c
+++ b/src/lib/elementary/elm_datetime.c
@@ -21,7 +21,7 @@ EAPI Evas_Object *
21elm_datetime_add(Evas_Object *parent) 21elm_datetime_add(Evas_Object *parent)
22{ 22{
23 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 23 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
24 return efl_add(EFL_UI_CLOCK_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 24 return elm_legacy_add(EFL_UI_CLOCK_CLASS, parent);
25} 25}
26 26
27EAPI void 27EAPI void
diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c
index ebd038f..68b8dd8 100644
--- a/src/lib/elementary/elm_dayselector.c
+++ b/src/lib/elementary/elm_dayselector.c
@@ -447,7 +447,7 @@ EAPI Evas_Object *
447elm_dayselector_add(Evas_Object *parent) 447elm_dayselector_add(Evas_Object *parent)
448{ 448{
449 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 449 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
450 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 450 return elm_legacy_add(MY_CLASS, parent);
451} 451}
452 452
453EOLIAN static Eo * 453EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c
index ee87733..fe27ed7 100644
--- a/src/lib/elementary/elm_diskselector.c
+++ b/src/lib/elementary/elm_diskselector.c
@@ -1407,7 +1407,7 @@ EAPI Evas_Object *
1407elm_diskselector_add(Evas_Object *parent) 1407elm_diskselector_add(Evas_Object *parent)
1408{ 1408{
1409 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1409 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1410 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1410 return elm_legacy_add(MY_CLASS, parent);
1411} 1411}
1412 1412
1413EOLIAN static Eo * 1413EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index da8782a..c6018fc 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -4005,7 +4005,7 @@ EAPI Evas_Object *
4005elm_entry_add(Evas_Object *parent) 4005elm_entry_add(Evas_Object *parent)
4006{ 4006{
4007 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 4007 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
4008 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 4008 return elm_legacy_add(MY_CLASS, parent);
4009} 4009}
4010 4010
4011static void 4011static void
diff --git a/src/lib/elementary/elm_flipselector.c b/src/lib/elementary/elm_flipselector.c
index bce73f9..cb078c6 100644
--- a/src/lib/elementary/elm_flipselector.c
+++ b/src/lib/elementary/elm_flipselector.c
@@ -654,7 +654,7 @@ EAPI Evas_Object *
654elm_flipselector_add(Evas_Object *parent) 654elm_flipselector_add(Evas_Object *parent)
655{ 655{
656 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 656 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
657 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 657 return elm_legacy_add(MY_CLASS, parent);
658} 658}
659 659
660EAPI void 660EAPI void
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 42ab62b..6923a0b 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -4231,7 +4231,7 @@ EAPI Evas_Object *
4231elm_gengrid_add(Evas_Object *parent) 4231elm_gengrid_add(Evas_Object *parent)
4232{ 4232{
4233 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 4233 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
4234 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 4234 return elm_legacy_add(MY_CLASS, parent);
4235} 4235}
4236 4236
4237static void 4237static void
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 8edbe02..6c77edf 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -5783,7 +5783,7 @@ EAPI Evas_Object *
5783elm_genlist_add(Evas_Object *parent) 5783elm_genlist_add(Evas_Object *parent)
5784{ 5784{
5785 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 5785 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
5786 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 5786 return elm_legacy_add(MY_CLASS, parent);
5787} 5787}
5788 5788
5789EOLIAN static Eo * 5789EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_gesture_layer.c b/src/lib/elementary/elm_gesture_layer.c
index ef28604..d64ff58 100644
--- a/src/lib/elementary/elm_gesture_layer.c
+++ b/src/lib/elementary/elm_gesture_layer.c
@@ -3834,7 +3834,7 @@ EAPI Evas_Object *
3834elm_gesture_layer_add(Evas_Object *parent) 3834elm_gesture_layer_add(Evas_Object *parent)
3835{ 3835{
3836 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 3836 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
3837 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 3837 return elm_legacy_add(MY_CLASS, parent);
3838} 3838}
3839 3839
3840EOLIAN static Eo * 3840EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c
index 5424eb4..d1a96f5 100644
--- a/src/lib/elementary/elm_glview.c
+++ b/src/lib/elementary/elm_glview.c
@@ -339,18 +339,16 @@ EAPI Evas_Object *
339elm_glview_add(Evas_Object *parent) 339elm_glview_add(Evas_Object *parent)
340{ 340{
341 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 341 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
342 return efl_add(MY_CLASS, parent, 342 return elm_legacy_add(MY_CLASS, parent,
343 elm_obj_glview_version_constructor(efl_added, EVAS_GL_GLES_2_X), 343 elm_obj_glview_version_constructor(efl_added, EVAS_GL_GLES_2_X));
344 efl_canvas_object_legacy_ctor(efl_added));
345} 344}
346 345
347EAPI Evas_Object * 346EAPI Evas_Object *
348elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version) 347elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version)
349{ 348{
350 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 349 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
351 return efl_add(MY_CLASS, parent, 350 return elm_legacy_add(MY_CLASS, parent,
352 elm_obj_glview_version_constructor(efl_added, version), 351 elm_obj_glview_version_constructor(efl_added, version));
353 efl_canvas_object_legacy_ctor(efl_added));
354} 352}
355 353
356EOLIAN static void 354EOLIAN static void
diff --git a/src/lib/elementary/elm_grid.c b/src/lib/elementary/elm_grid.c
index bdfb4a5..f189a7d 100644
--- a/src/lib/elementary/elm_grid.c
+++ b/src/lib/elementary/elm_grid.c
@@ -90,7 +90,7 @@ EAPI Evas_Object *
90elm_grid_add(Evas_Object *parent) 90elm_grid_add(Evas_Object *parent)
91{ 91{
92 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 92 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
93 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 93 return elm_legacy_add(MY_CLASS, parent);
94} 94}
95 95
96EOLIAN static Eo * 96EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c
index 696a080..d87df91 100644
--- a/src/lib/elementary/elm_hover.c
+++ b/src/lib/elementary/elm_hover.c
@@ -695,7 +695,7 @@ EAPI Evas_Object *
695elm_hover_add(Evas_Object *parent) 695elm_hover_add(Evas_Object *parent)
696{ 696{
697 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 697 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
698 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 698 return elm_legacy_add(MY_CLASS, parent);
699} 699}
700 700
701EOLIAN static Eo * 701EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index 3515c42..5fdc294 100644
--- a/src/lib/elementary/elm_icon.c
+++ b/src/lib/elementary/elm_icon.c
@@ -604,7 +604,7 @@ EAPI Evas_Object *
604elm_icon_add(Evas_Object *parent) 604elm_icon_add(Evas_Object *parent)
605{ 605{
606 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 606 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
607 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 607 return elm_legacy_add(MY_CLASS, parent);
608} 608}
609 609
610EOLIAN static Eo * 610EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c
index 72b8793..91fb2e3 100644
--- a/src/lib/elementary/elm_index.c
+++ b/src/lib/elementary/elm_index.c
@@ -1189,7 +1189,7 @@ EAPI Evas_Object *
1189elm_index_add(Evas_Object *parent) 1189elm_index_add(Evas_Object *parent)
1190{ 1190{
1191 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1191 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1192 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1192 return elm_legacy_add(MY_CLASS, parent);
1193} 1193}
1194 1194
1195EAPI void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) 1195EAPI void elm_index_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 522deba..8f1371f 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -192,7 +192,7 @@ _elm_pan_content_size_get(Eo *obj EINA_UNUSED, Elm_Pan_Smart_Data *psd, Evas_Coo
192static Evas_Object * 192static Evas_Object *
193_elm_pan_add(Evas *evas) 193_elm_pan_add(Evas *evas)
194{ 194{
195 return efl_add(MY_PAN_CLASS, evas, efl_canvas_object_legacy_ctor(efl_added)); 195 return elm_legacy_add(MY_PAN_CLASS, evas);
196} 196}
197 197
198EOLIAN static Eo * 198EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_inwin.c b/src/lib/elementary/elm_inwin.c
index 76becb4..7e7cb8a 100644
--- a/src/lib/elementary/elm_inwin.c
+++ b/src/lib/elementary/elm_inwin.c
@@ -74,7 +74,7 @@ EAPI Evas_Object *
74elm_win_inwin_add(Evas_Object *parent) 74elm_win_inwin_add(Evas_Object *parent)
75{ 75{
76 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 76 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
77 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 77 return elm_legacy_add(MY_CLASS, parent);
78} 78}
79 79
80EOLIAN static Eo * 80EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_label.c b/src/lib/elementary/elm_label.c
index b9b9887..8d49334 100644
--- a/src/lib/elementary/elm_label.c
+++ b/src/lib/elementary/elm_label.c
@@ -417,7 +417,7 @@ EAPI Evas_Object *
417elm_label_add(Evas_Object *parent) 417elm_label_add(Evas_Object *parent)
418{ 418{
419 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 419 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
420 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 420 return elm_legacy_add(MY_CLASS, parent);
421} 421}
422 422
423EOLIAN static Eo * 423EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index e343c06..47f63df 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -2505,7 +2505,7 @@ EAPI Evas_Object *
2505elm_list_add(Evas_Object *parent) 2505elm_list_add(Evas_Object *parent)
2506{ 2506{
2507 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2507 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2508 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 2508 return elm_legacy_add(MY_CLASS, parent);
2509} 2509}
2510 2510
2511EOLIAN static Eo * 2511EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 5093e9d..5c2e68d 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -4284,7 +4284,7 @@ EAPI Evas_Object *
4284elm_map_add(Evas_Object *parent) 4284elm_map_add(Evas_Object *parent)
4285{ 4285{
4286 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 4286 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
4287 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 4287 return elm_legacy_add(MY_CLASS, parent);
4288} 4288}
4289 4289
4290EOLIAN static Eo * 4290EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c
index 98fa838..f6886a6 100644
--- a/src/lib/elementary/elm_mapbuf.c
+++ b/src/lib/elementary/elm_mapbuf.c
@@ -309,7 +309,7 @@ EAPI Evas_Object *
309elm_mapbuf_add(Evas_Object *parent) 309elm_mapbuf_add(Evas_Object *parent)
310{ 310{
311 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 311 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
312 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 312 return elm_legacy_add(MY_CLASS, parent);
313} 313}
314 314
315EOLIAN static Eo * 315EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index 7cffe95..cb34abb 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -800,7 +800,7 @@ EAPI Evas_Object *
800elm_menu_add(Evas_Object *parent) 800elm_menu_add(Evas_Object *parent)
801{ 801{
802 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 802 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
803 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 803 return elm_legacy_add(MY_CLASS, parent);
804} 804}
805 805
806EOLIAN static Efl_Ui_Focus_Manager* 806EOLIAN static Efl_Ui_Focus_Manager*
diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c
index 7a80d83..afffc90 100644
--- a/src/lib/elementary/elm_notify.c
+++ b/src/lib/elementary/elm_notify.c
@@ -471,7 +471,7 @@ EAPI Evas_Object *
471elm_notify_add(Evas_Object *parent) 471elm_notify_add(Evas_Object *parent)
472{ 472{
473 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 473 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
474 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 474 return elm_legacy_add(MY_CLASS, parent);
475} 475}
476 476
477EOLIAN static Eo * 477EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index d6d59ee..b7d4bcd 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -955,7 +955,7 @@ EAPI Evas_Object *
955elm_panel_add(Evas_Object *parent) 955elm_panel_add(Evas_Object *parent)
956{ 956{
957 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 957 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
958 Evas_Object *obj = efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 958 Evas_Object *obj = elm_legacy_add(MY_CLASS, parent);
959 959
960 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 960 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
961 wd->highlight_root = EINA_TRUE; 961 wd->highlight_root = EINA_TRUE;
diff --git a/src/lib/elementary/elm_photo.c b/src/lib/elementary/elm_photo.c
index 47b7756..151dc26 100644
--- a/src/lib/elementary/elm_photo.c
+++ b/src/lib/elementary/elm_photo.c
@@ -297,7 +297,7 @@ EAPI Evas_Object *
297elm_photo_add(Evas_Object *parent) 297elm_photo_add(Evas_Object *parent)
298{ 298{
299 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 299 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
300 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 300 return elm_legacy_add(MY_CLASS, parent);
301} 301}
302 302
303EOLIAN static Eo * 303EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_plug.c b/src/lib/elementary/elm_plug.c
index de55ef3..9fe6406 100644
--- a/src/lib/elementary/elm_plug.c
+++ b/src/lib/elementary/elm_plug.c
@@ -136,7 +136,7 @@ EAPI Evas_Object *
136elm_plug_add(Evas_Object *parent) 136elm_plug_add(Evas_Object *parent)
137{ 137{
138 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 138 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
139 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 139 return elm_legacy_add(MY_CLASS, parent);
140} 140}
141 141
142EOLIAN static Eo * 142EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_prefs.c b/src/lib/elementary/elm_prefs.c
index f5bb289..0077789 100644
--- a/src/lib/elementary/elm_prefs.c
+++ b/src/lib/elementary/elm_prefs.c
@@ -483,7 +483,7 @@ elm_prefs_add(Evas_Object *parent)
483 return NULL; 483 return NULL;
484 } 484 }
485 485
486 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 486 return elm_legacy_add(MY_CLASS, parent);
487} 487}
488 488
489EOLIAN static Eo * 489EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_route.c b/src/lib/elementary/elm_route.c
index 4a03775..ba4f64e 100644
--- a/src/lib/elementary/elm_route.c
+++ b/src/lib/elementary/elm_route.c
@@ -178,7 +178,7 @@ EAPI Evas_Object *
178elm_route_add(Evas_Object *parent) 178elm_route_add(Evas_Object *parent)
179{ 179{
180 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 180 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
181 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 181 return elm_legacy_add(MY_CLASS, parent);
182} 182}
183 183
184EOLIAN static Eo * 184EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c
index 9fe6f14..7198593 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -849,7 +849,7 @@ EAPI Evas_Object *
849elm_scroller_add(Evas_Object *parent) 849elm_scroller_add(Evas_Object *parent)
850{ 850{
851 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 851 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
852 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 852 return elm_legacy_add(MY_CLASS, parent);
853} 853}
854 854
855static void 855static void
diff --git a/src/lib/elementary/elm_segment_control.c b/src/lib/elementary/elm_segment_control.c
index de995b4..600219f 100644
--- a/src/lib/elementary/elm_segment_control.c
+++ b/src/lib/elementary/elm_segment_control.c
@@ -672,7 +672,7 @@ EAPI Evas_Object *
672elm_segment_control_add(Evas_Object *parent) 672elm_segment_control_add(Evas_Object *parent)
673{ 673{
674 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 674 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
675 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 675 return elm_legacy_add(MY_CLASS, parent);
676} 676}
677 677
678EOLIAN static Eo * 678EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_separator.c b/src/lib/elementary/elm_separator.c
index 3301445..e720f4e 100644
--- a/src/lib/elementary/elm_separator.c
+++ b/src/lib/elementary/elm_separator.c
@@ -63,7 +63,7 @@ EAPI Evas_Object *
63elm_separator_add(Evas_Object *parent) 63elm_separator_add(Evas_Object *parent)
64{ 64{
65 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 65 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
66 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 66 return elm_legacy_add(MY_CLASS, parent);
67} 67}
68 68
69EOLIAN static Eo * 69EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_slideshow.c b/src/lib/elementary/elm_slideshow.c
index af57fa5..b37cba6 100644
--- a/src/lib/elementary/elm_slideshow.c
+++ b/src/lib/elementary/elm_slideshow.c
@@ -367,7 +367,7 @@ EAPI Evas_Object *
367elm_slideshow_add(Evas_Object *parent) 367elm_slideshow_add(Evas_Object *parent)
368{ 368{
369 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 369 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
370 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 370 return elm_legacy_add(MY_CLASS, parent);
371} 371}
372 372
373EOLIAN static Eo * 373EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c
index ac41e98..cad5076 100644
--- a/src/lib/elementary/elm_spinner.c
+++ b/src/lib/elementary/elm_spinner.c
@@ -1353,7 +1353,7 @@ EAPI Evas_Object *
1353elm_spinner_add(Evas_Object *parent) 1353elm_spinner_add(Evas_Object *parent)
1354{ 1354{
1355 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1355 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1356 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 1356 return elm_legacy_add(MY_CLASS, parent);
1357} 1357}
1358 1358
1359EAPI void 1359EAPI void
diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c
index cd6c193..ca3de60 100644
--- a/src/lib/elementary/elm_table.c
+++ b/src/lib/elementary/elm_table.c
@@ -129,7 +129,7 @@ EAPI Evas_Object *
129elm_table_add(Evas_Object *parent) 129elm_table_add(Evas_Object *parent)
130{ 130{
131 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 131 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
132 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 132 return elm_legacy_add(MY_CLASS, parent);
133} 133}
134 134
135EOLIAN static Eo * 135EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 68202c6..4dfb1df 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -579,7 +579,7 @@ EAPI Evas_Object *
579elm_thumb_add(Evas_Object *parent) 579elm_thumb_add(Evas_Object *parent)
580{ 580{
581 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 581 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
582 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 582 return elm_legacy_add(MY_CLASS, parent);
583} 583}
584 584
585EOLIAN static Eo * 585EOLIAN static Eo *
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 64a3706..6df060f 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -2948,7 +2948,7 @@ EAPI Evas_Object *
2948elm_toolbar_add(Evas_Object *parent) 2948elm_toolbar_add(Evas_Object *parent)
2949{ 2949{
2950 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2950 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2951 return efl_add(MY_CLASS, parent, efl_canvas_object_legacy_ctor(efl_added)); 2951 return elm_legacy_add(MY_CLASS, parent);
2952} 2952}
2953 2953
2954EOLIAN static Eina_Bool 2954EOLIAN static Eina_Bool
diff --git a/src/lib/elementary/elm_web2.c b/src/lib/elementary/elm_web2.c
index e117497..170ae42 100644
--- a/src/lib/elementary/elm_web2.c
+++ b/src/lib/elementary/elm_web2.c
@@ -80,7 +80,7 @@ elm_web_add(Evas_Object *parent)
80{ 80{
81 if (!parent || !ewm.class_get) return NULL; 81 if (!parent || !ewm.class_get) return NULL;
82 82
83 return efl_add(ewm.class_get(), parent, efl_canvas_object_legacy_ctor(efl_added)); 83 return elm_legacy_add(ewm.class_get(), parent);
84} 84}
85 85
86EAPI const Efl_Class * 86EAPI const Efl_Class *
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 26ec156..022f1f3 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -53,6 +53,8 @@ typedef struct _Elm_Event_Cb_Data Elm_Event_Cb_Data;
53typedef struct _Elm_Label_Data Elm_Label_Data; 53typedef struct _Elm_Label_Data Elm_Label_Data;
54typedef struct _Elm_Translate_String_Data Elm_Translate_String_Data; 54typedef struct _Elm_Translate_String_Data Elm_Translate_String_Data;
55 55
56Eina_Bool _elm_legacy_add = EINA_FALSE;
57
56struct _Elm_Event_Cb_Data 58struct _Elm_Event_Cb_Data
57{ 59{
58 Elm_Event_Cb func; 60 Elm_Event_Cb func;
@@ -2968,7 +2970,7 @@ elm_widget_theme_get(const Evas_Object *obj)
2968EOLIAN static Efl_Ui_Theme_Apply 2970EOLIAN static Efl_Ui_Theme_Apply
2969_elm_widget_style_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *style) 2971_elm_widget_style_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *style)
2970{ 2972{
2971 if (!sd->legacy && efl_finalized_get(obj)) 2973 if (!elm_widget_is_legacy(obj) && efl_finalized_get(obj))
2972 { 2974 {
2973 ERR("Efl.Ui.Widget.style can only be set before finalize!"); 2975 ERR("Efl.Ui.Widget.style can only be set before finalize!");
2974 return EFL_UI_THEME_APPLY_FAILED; 2976 return EFL_UI_THEME_APPLY_FAILED;
@@ -5117,6 +5119,8 @@ _elm_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSE
5117 Eo *parent = NULL; 5119 Eo *parent = NULL;
5118 5120
5119 sd->on_create = EINA_TRUE; 5121 sd->on_create = EINA_TRUE;
5122 sd->legacy = _elm_legacy_add;
5123 _elm_legacy_add = EINA_FALSE;
5120 efl_canvas_group_clipped_set(obj, EINA_FALSE); 5124 efl_canvas_group_clipped_set(obj, EINA_FALSE);
5121 obj = efl_constructor(efl_super(obj, MY_CLASS)); 5125 obj = efl_constructor(efl_super(obj, MY_CLASS));
5122 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); 5126 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
@@ -5170,6 +5174,7 @@ _elm_widget_legacy_ctor(Eo *obj, Elm_Widget_Smart_Data *sd)
5170{ 5174{
5171 efl_canvas_object_legacy_ctor(efl_super(obj, MY_CLASS)); 5175 efl_canvas_object_legacy_ctor(efl_super(obj, MY_CLASS));
5172 sd->legacy = EINA_TRUE; 5176 sd->legacy = EINA_TRUE;
5177 _elm_legacy_add = EINA_FALSE;
5173} 5178}
5174 5179
5175EOLIAN static void 5180EOLIAN static void
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index 82e17bc..aa5d11d 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -809,11 +809,19 @@ _elm_widget_sub_object_redirect_to_top(Evas_Object *obj, Evas_Object *sobj)
809 return ret; 809 return ret;
810} 810}
811 811
812/* Internal hack to mark legacy objects as such before construction.
813 * No need for TLS: Only UI objects created in the main loop matter. */
814extern Eina_Bool _elm_legacy_add;
815#define elm_legacy_add(k, p, ...) ({ _elm_legacy_add = 1; \
816 efl_add(k, p, efl_canvas_object_legacy_ctor(efl_added), ##__VA_ARGS__); })
817
812static inline Eina_Bool 818static inline Eina_Bool
813elm_widget_is_legacy(const Eo *obj) 819elm_widget_is_legacy(const Eo *obj)
814{ 820{
815 Elm_Widget_Smart_Data *sd = (Elm_Widget_Smart_Data *) 821 Elm_Widget_Smart_Data *sd;
816 efl_data_scope_safe_get(obj, ELM_WIDGET_CLASS); 822
823 if (_elm_legacy_add) return EINA_TRUE;
824 sd = (Elm_Widget_Smart_Data *) efl_data_scope_safe_get(obj, ELM_WIDGET_CLASS);
817 return sd ? sd->legacy : EINA_FALSE; 825 return sd ? sd->legacy : EINA_FALSE;
818} 826}
819 827