edje_edit: 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:26 +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/D8130

src/Makefile_Edje.am
src/lib/edje/Edje_Eo.h
src/lib/edje/Edje_Legacy.h
src/lib/edje/edje_edit.c
src/lib/edje/edje_edit.eo [deleted file]
src/lib/edje/edje_edit_eo.c [new file with mode: 0644]
src/lib/edje/edje_edit_eo.h [new file with mode: 0644]
src/lib/edje/edje_edit_eo.legacy.h [new file with mode: 0644]
src/lib/edje/meson.build

index f834a51..034b97b 100644 (file)
@@ -11,8 +11,7 @@ edje_eolian_files = \
        lib/edje/efl_canvas_layout_part_external.eo \
        lib/edje/efl_canvas_layout_part_swallow.eo \
        lib/edje/efl_canvas_layout_part_table.eo \
-       lib/edje/efl_canvas_layout_part_text.eo \
-       lib/edje/edje_edit.eo
+       lib/edje/efl_canvas_layout_part_text.eo
 
 edje_eolian_type_files = \
     lib/edje/edje_types.eot
@@ -67,10 +66,13 @@ lib/edje/Edje_Common.h \
 lib/edje/Edje_Eo.h \
 lib/edje/Edje_Legacy.h \
 lib/edje/Edje_Edit.h \
+lib/edje/edje_edit_eo.h \
+lib/edje/edje_edit_eo.legacy.h \
 lib/edje/efl_canvas_layout_eo.legacy.h \
 lib/edje/efl_layout_group_eo.legacy.h
 
 EXTRA_DIST2 += \
+lib/edje/edje_edit_eo.c \
 lib/edje/efl_canvas_layout_eo.legacy.c \
 lib/edje/efl_layout_group_eo.legacy.c
 
index 859d4d0..b42fb86 100644 (file)
@@ -4,7 +4,7 @@
 #include "efl_layout_signal.eo.h"
 #include "efl_layout_group.eo.h"
 #include "efl_canvas_layout.eo.h"
-#include "edje_edit.eo.h"
+#include "edje_edit_eo.h"
 
 #include "efl_canvas_layout_part.eo.h"
 #include "efl_canvas_layout_part_box.eo.h"
index b595393..6951814 100644 (file)
@@ -3225,5 +3225,5 @@ typedef Efl_Canvas_Layout_Part_Type Edje_Part_Type;
  * @}
  */
 #include "efl_canvas_layout_eo.legacy.h"
-#include "edje_edit.eo.legacy.h"
+#include "edje_edit_eo.legacy.h"
 #include "efl_layout_group_eo.legacy.h"
index 0b90f7d..fd95151 100644 (file)
@@ -16821,4 +16821,4 @@ edje_edit_print_internal_status(Evas_Object *obj)
 #define EDJE_EDIT_EXTRA_OPS \
    EFL_CANVAS_GROUP_DEL_OPS(edje_edit)
 
-#include "edje_edit.eo.c"
+#include "edje_edit_eo.c"
diff --git a/src/lib/edje/edje_edit.eo b/src/lib/edje/edje_edit.eo
deleted file mode 100644 (file)
index 61ae265..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-class Edje.Edit extends Efl.Canvas.Layout
-{
-   [[Edje editing class to access edje object internals.
-
-   This was intended ONLY for use in an actual edje editor program. Unless
-   you are writing one of these, do NOT use this API here.
-   ]]
-   legacy_prefix: edje_edit;
-   data: Edje_Edit;
-   implements {
-      Efl.Object.constructor;
-      Efl.Object.destructor;
-      Efl.File.load;
-   }
-}
diff --git a/src/lib/edje/edje_edit_eo.c b/src/lib/edje/edje_edit_eo.c
new file mode 100644 (file)
index 0000000..12fac92
--- /dev/null
@@ -0,0 +1,43 @@
+
+Efl_Object *_edje_edit_efl_object_constructor(Eo *obj, Edje_Edit *pd);
+
+
+void _edje_edit_efl_object_destructor(Eo *obj, Edje_Edit *pd);
+
+
+Eina_Error _edje_edit_efl_file_load(Eo *obj, Edje_Edit *pd);
+
+
+static Eina_Bool
+_edje_edit_class_initializer(Efl_Class *klass)
+{
+   const Efl_Object_Ops *opsp = NULL;
+
+   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
+
+#ifndef EDJE_EDIT_EXTRA_OPS
+#define EDJE_EDIT_EXTRA_OPS
+#endif
+
+   EFL_OPS_DEFINE(ops,
+      EFL_OBJECT_OP_FUNC(efl_constructor, _edje_edit_efl_object_constructor),
+      EFL_OBJECT_OP_FUNC(efl_destructor, _edje_edit_efl_object_destructor),
+      EFL_OBJECT_OP_FUNC(efl_file_load, _edje_edit_efl_file_load),
+      EDJE_EDIT_EXTRA_OPS
+   );
+   opsp = &ops;
+
+   return efl_class_functions_set(klass, opsp, ropsp);
+}
+
+static const Efl_Class_Description _edje_edit_class_desc = {
+   EO_VERSION,
+   "Edje.Edit",
+   EFL_CLASS_TYPE_REGULAR,
+   sizeof(Edje_Edit),
+   _edje_edit_class_initializer,
+   NULL,
+   NULL
+};
+
+EFL_DEFINE_CLASS(edje_edit_class_get, &_edje_edit_class_desc, EFL_CANVAS_LAYOUT_CLASS, NULL);
diff --git a/src/lib/edje/edje_edit_eo.h b/src/lib/edje/edje_edit_eo.h
new file mode 100644 (file)
index 0000000..f6c561a
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _EDJE_EDIT_EO_H_
+#define _EDJE_EDIT_EO_H_
+
+#ifndef _EDJE_EDIT_EO_CLASS_TYPE
+#define _EDJE_EDIT_EO_CLASS_TYPE
+
+typedef Eo Edje_Edit;
+
+#endif
+
+#ifndef _EDJE_EDIT_EO_TYPES
+#define _EDJE_EDIT_EO_TYPES
+
+
+#endif
+/**
+ * @brief Edje editing class to access edje object internals.
+ *
+ * This was intended ONLY for use in an actual edje editor program. Unless you
+ * are writing one of these, do NOT use this API here.
+ *
+ * @ingroup Edje_Edit
+ */
+#define EDJE_EDIT_CLASS edje_edit_class_get()
+
+EWAPI const Efl_Class *edje_edit_class_get(void);
+
+#endif
diff --git a/src/lib/edje/edje_edit_eo.legacy.h b/src/lib/edje/edje_edit_eo.legacy.h
new file mode 100644 (file)
index 0000000..c1429d9
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _EDJE_EDIT_EO_LEGACY_H_
+#define _EDJE_EDIT_EO_LEGACY_H_
+
+#ifndef _EDJE_EDIT_EO_CLASS_TYPE
+#define _EDJE_EDIT_EO_CLASS_TYPE
+
+typedef Eo Edje_Edit;
+
+#endif
+
+#ifndef _EDJE_EDIT_EO_TYPES
+#define _EDJE_EDIT_EO_TYPES
+
+
+#endif
+
+#endif
index 3c76d66..c45dced 100644 (file)
@@ -21,7 +21,6 @@ if get_option('edje-sound-and-video')
 endif
 
 pub_legacy_eo_files = [
-  'edje_edit.eo',
   'efl_layout_calc.eo',
   'efl_layout_signal.eo',
   'efl_layout_group.eo',
@@ -50,16 +49,6 @@ foreach eo_file : pub_legacy_eo_files
                            '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
                            '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
                            '-gchd', '@INPUT@'])
-  pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
-    input : eo_file,
-    output : [eo_file + '.legacy.h'],
-    depfile : eo_file + '.legacy.d',
-    install : true,
-    install_dir : dir_package_include,
-    command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
-                           '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'),
-                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'),
-                           '-gld', '@INPUT@'])
 endforeach
 
 pub_eo_types_files = [
@@ -105,6 +94,8 @@ edje_header_src = [
   'Edje_Eo.h',
   'Edje_Legacy.h',
   'Edje_Edit.h',
+  'edje_edit_eo.h',
+  'edje_edit_eo.legacy.h',
   'efl_layout_group_eo.legacy.h',
   'efl_canvas_layout_eo.legacy.h',
 ]