elm_box: remove all legacy usage from eo files
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 5 Mar 2019 22:00:37 +0000 (17:00 -0500)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 14 Mar 2019 05:46:27 +0000 (14:46 +0900)
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8133

Change-Id: I61394a7a15b0551de16c02ba11efb0158b04ac91

src/Makefile_Elementary.am
src/lib/elementary/efl_ui_bg.c
src/lib/elementary/efl_ui_bg.eo
src/lib/elementary/efl_ui_bg_eo.legacy.h [new file with mode: 0644]
src/lib/elementary/efl_ui_bg_legacy.eo [deleted file]
src/lib/elementary/efl_ui_bg_legacy_eo.c [new file with mode: 0644]
src/lib/elementary/efl_ui_bg_legacy_eo.h [new file with mode: 0644]
src/lib/elementary/efl_ui_bg_legacy_eo.legacy.h [new file with mode: 0644]
src/lib/elementary/elm_bg_legacy.h
src/lib/elementary/meson.build

index 4b0a9de..cda91ef 100644 (file)
@@ -200,7 +200,6 @@ elm_legacy_eolian_files = \
        lib/elementary/efl_ui_button_legacy.eo \
        lib/elementary/efl_ui_check_legacy.eo \
        lib/elementary/efl_ui_radio_legacy.eo \
-       lib/elementary/efl_ui_bg_legacy.eo \
        lib/elementary/efl_ui_video_legacy.eo \
        lib/elementary/efl_ui_frame_legacy.eo \
        lib/elementary/efl_ui_panes_legacy.eo \
@@ -338,7 +337,16 @@ elementaryeolianfiles_DATA = $(elm_public_eolian_files) $(elm_eolian_type_files)
 
 noinst_DATA += $(elm_legacy_eolian_eo_h)
 
-EXTRA_DIST2 += ${elementaryeolianfiles_DATA} $(elm_legacy_eolian_files) $(elm_private_eolian_files)
+elm_legacy_eo_files = \
+lib/elementary/efl_ui_bg_legacy_eo.c
+
+elm_legacy_eo_headers = \
+lib/elementary/efl_ui_bg_eo.legacy.h \
+lib/elementary/efl_ui_bg_legacy_eo.h \
+lib/elementary/efl_ui_bg_legacy_eo.legacy.h
+
+
+EXTRA_DIST2 += ${elementaryeolianfiles_DATA} $(elm_legacy_eolian_files) $(elm_private_eolian_files) $(elm_legacy_eo_files)
 
 lib_LTLIBRARIES += lib/elementary/libelementary.la
 
@@ -346,7 +354,8 @@ includes_HEADERS = \
 lib/elementary/Elementary.h \
 lib/elementary/Elementary_Options.h \
 lib/elementary/Elementary_Cursor.h \
-lib/elementary/Elementary_GL_Helpers.h
+lib/elementary/Elementary_GL_Helpers.h \
+$(elm_legacy_eo_headers)
 includesdir = $(includedir)/elementary-@VMAJ@
 
 includesunstable_HEADERS = \
index 1f3bd14..563fd37 100644 (file)
@@ -310,7 +310,7 @@ ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
 #include "efl_ui_bg.eo.c"
 
 
-#include "efl_ui_bg_legacy.eo.h"
+#include "efl_ui_bg_legacy_eo.h"
 
 #define MY_CLASS_NAME_LEGACY "elm_bg"
 
@@ -357,4 +357,4 @@ elm_bg_add(Evas_Object *parent)
    return elm_legacy_add(EFL_UI_BG_LEGACY_CLASS, parent);
 }
 
-#include "efl_ui_bg_legacy.eo.c"
+#include "efl_ui_bg_legacy_eo.c"
index 0094f8c..bc0ef7e 100644 (file)
@@ -5,7 +5,6 @@ class @beta Efl.Ui.Bg extends Efl.Ui.Layout_Base implements Efl.File, Efl.Gfx.Co
    works just like an image, but has some properties useful for backgrounds, such as
    setting it to tiled, centered, scaled or stretched.
    ]]
-   legacy_prefix: elm_bg;
    implements {
       Efl.Object.constructor;
       Efl.Object.destructor;
diff --git a/src/lib/elementary/efl_ui_bg_eo.legacy.h b/src/lib/elementary/efl_ui_bg_eo.legacy.h
new file mode 100644 (file)
index 0000000..8ad9bcd
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _EFL_UI_BG_EO_LEGACY_H_
+#define _EFL_UI_BG_EO_LEGACY_H_
+
+#ifndef _EFL_UI_BG_EO_CLASS_TYPE
+#define _EFL_UI_BG_EO_CLASS_TYPE
+
+typedef Eo Efl_Ui_Bg;
+
+#endif
+
+#ifndef _EFL_UI_BG_EO_TYPES
+#define _EFL_UI_BG_EO_TYPES
+
+
+#endif
+
+#endif
diff --git a/src/lib/elementary/efl_ui_bg_legacy.eo b/src/lib/elementary/efl_ui_bg_legacy.eo
deleted file mode 100644 (file)
index cc681b0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-class @beta Efl.Ui.Bg_Legacy extends Efl.Ui.Bg implements Efl.Ui.Legacy
-{
-   [[The bg (background) widget is used for setting (solid) background decorations
-
-   for a window (unless it has transparency enabled) or for any container object. It
-   works just like an image, but has some properties useful for backgrounds, such as
-   setting it to tiled, centered, scaled or stretched.
-   ]]
-   data: null;
-   implements {
-      class.constructor;
-      Efl.Object.constructor;
-   }
-}
diff --git a/src/lib/elementary/efl_ui_bg_legacy_eo.c b/src/lib/elementary/efl_ui_bg_legacy_eo.c
new file mode 100644 (file)
index 0000000..9cd23ff
--- /dev/null
@@ -0,0 +1,35 @@
+
+Efl_Object *_efl_ui_bg_legacy_efl_object_constructor(Eo *obj, void *pd);
+
+
+static Eina_Bool
+_efl_ui_bg_legacy_class_initializer(Efl_Class *klass)
+{
+   const Efl_Object_Ops *opsp = NULL;
+
+   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
+
+#ifndef EFL_UI_BG_LEGACY_EXTRA_OPS
+#define EFL_UI_BG_LEGACY_EXTRA_OPS
+#endif
+
+   EFL_OPS_DEFINE(ops,
+      EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_bg_legacy_efl_object_constructor),
+      EFL_UI_BG_LEGACY_EXTRA_OPS
+   );
+   opsp = &ops;
+
+   return efl_class_functions_set(klass, opsp, ropsp);
+}
+
+static const Efl_Class_Description _efl_ui_bg_legacy_class_desc = {
+   EO_VERSION,
+   "Efl.Ui.Bg_Legacy",
+   EFL_CLASS_TYPE_REGULAR,
+   0,
+   _efl_ui_bg_legacy_class_initializer,
+   _efl_ui_bg_legacy_class_constructor,
+   NULL
+};
+
+EFL_DEFINE_CLASS(efl_ui_bg_legacy_class_get, &_efl_ui_bg_legacy_class_desc, EFL_UI_BG_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
diff --git a/src/lib/elementary/efl_ui_bg_legacy_eo.h b/src/lib/elementary/efl_ui_bg_legacy_eo.h
new file mode 100644 (file)
index 0000000..ea3641d
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef _EFL_UI_BG_LEGACY_EO_H_
+#define _EFL_UI_BG_LEGACY_EO_H_
+
+#ifndef _EFL_UI_BG_LEGACY_EO_CLASS_TYPE
+#define _EFL_UI_BG_LEGACY_EO_CLASS_TYPE
+
+typedef Eo Efl_Ui_Bg_Legacy;
+
+#endif
+
+#ifndef _EFL_UI_BG_LEGACY_EO_TYPES
+#define _EFL_UI_BG_LEGACY_EO_TYPES
+
+
+#endif
+#ifdef EFL_BETA_API_SUPPORT
+/**
+ * @brief The bg (background) widget is used for setting (solid) background
+ * decorations
+ *
+ * for a window (unless it has transparency enabled) or for any container
+ * object. It works just like an image, but has some properties useful for
+ * backgrounds, such as setting it to tiled, centered, scaled or stretched.
+ *
+ * @ingroup Efl_Ui_Bg_Legacy
+ */
+#define EFL_UI_BG_LEGACY_CLASS efl_ui_bg_legacy_class_get()
+
+EWAPI const Efl_Class *efl_ui_bg_legacy_class_get(void);
+#endif /* EFL_BETA_API_SUPPORT */
+
+#endif
diff --git a/src/lib/elementary/efl_ui_bg_legacy_eo.legacy.h b/src/lib/elementary/efl_ui_bg_legacy_eo.legacy.h
new file mode 100644 (file)
index 0000000..7498da1
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _EFL_UI_BG_LEGACY_EO_LEGACY_H_
+#define _EFL_UI_BG_LEGACY_EO_LEGACY_H_
+
+#ifndef _EFL_UI_BG_LEGACY_EO_CLASS_TYPE
+#define _EFL_UI_BG_LEGACY_EO_CLASS_TYPE
+
+typedef Eo Efl_Ui_Bg_Legacy;
+
+#endif
+
+#ifndef _EFL_UI_BG_LEGACY_EO_TYPES
+#define _EFL_UI_BG_LEGACY_EO_TYPES
+
+
+#endif
+
+#endif
index 72b0245..0869c97 100644 (file)
@@ -195,4 +195,4 @@ EAPI void elm_bg_precreated_object_set(Evas_Object *obj);
 EAPI Evas_Object *elm_bg_precreated_object_get(void);
 //
 
-#include "efl_ui_bg.eo.legacy.h"
+#include "efl_ui_bg_eo.legacy.h"
index 77d7e51..f92db5a 100644 (file)
@@ -2,7 +2,6 @@ pub_legacy_eo_files = [
   'efl_ui_button_legacy.eo',
   'efl_ui_check_legacy.eo',
   'efl_ui_radio_legacy.eo',
-  'efl_ui_bg_legacy.eo',
   'efl_ui_video_legacy.eo',
   'efl_ui_frame_legacy.eo',
   'efl_ui_panes_legacy.eo',
@@ -817,7 +816,9 @@ elementary_pub_headers = [
   'elm_widget_item_container_eo.legacy.h',
   'elm_widget_item_eo.legacy.h',
   'elm_widget_item_static_focus_eo.legacy.h',
->>>>>>> 624d140b8d... efl_ui_animation_view: install legacy additionally.
+  'efl_ui_bg_eo.legacy.h',
+  'efl_ui_bg_legacy_eo.h',
+  'efl_ui_bg_legacy_eo.legacy.h',
 ]
 
 elementary_header_src = [