elm_photo: 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:28 +0000 (14:46 +0900)
this takes the current generated output from eolian for legacy code in
efl 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/D8190

src/Makefile_Elementary.am
src/lib/elementary/elm_photo.c
src/lib/elementary/elm_photo.eo [deleted file]
src/lib/elementary/elm_photo_eo.c [new file with mode: 0644]
src/lib/elementary/elm_photo_eo.h [new file with mode: 0644]
src/lib/elementary/elm_photo_eo.legacy.h [new file with mode: 0644]
src/lib/elementary/elm_photo_legacy.h
src/lib/elementary/meson.build

index af0e59b..d971c71 100644 (file)
@@ -223,7 +223,6 @@ elm_legacy_eolian_files = \
        lib/elementary/elm_actionslider_part.eo \
        lib/elementary/elm_bubble_part.eo \
        lib/elementary/elm_fileselector_part.eo \
-       lib/elementary/elm_photo.eo \
        lib/elementary/elm_prefs.eo \
        lib/elementary/elm_segment_control.eo \
        lib/elementary/elm_segment_control_item.eo \
@@ -389,6 +388,7 @@ lib/elementary/elm_panel_eo.c \
 lib/elementary/elm_panel_eo.legacy.c \
 lib/elementary/elm_pan_eo.c \
 lib/elementary/elm_pan_eo.legacy.c \
+lib/elementary/elm_photo_eo.c \
 $(NULL)
 
 elm_legacy_eo_headers = \
@@ -548,6 +548,8 @@ lib/elementary/elm_panel_eo.h \
 lib/elementary/elm_panel_eo.legacy.h \
 lib/elementary/elm_pan_eo.h \
 lib/elementary/elm_pan_eo.legacy.h \
+lib/elementary/elm_photo_eo.h \
+lib/elementary/elm_photo_eo.legacy.h \
 $(NULL)
 
 
index 2f9dc66..1af5e2b 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "elm_priv.h"
 #include "elm_widget_photo.h"
-#include "elm_photo.eo.h"
+#include "elm_photo_eo.h"
 #include "elm_icon_eo.h"
 
 #define MY_CLASS ELM_PHOTO_CLASS
@@ -493,4 +493,4 @@ elm_photo_thumb_set(Evas_Object *obj, const char *file, const char *group)
 #define ELM_PHOTO_EXTRA_OPS \
    EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_photo)
 
-#include "elm_photo.eo.c"
+#include "elm_photo_eo.c"
diff --git a/src/lib/elementary/elm_photo.eo b/src/lib/elementary/elm_photo.eo
deleted file mode 100644 (file)
index 7263119..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-class Elm.Photo extends Efl.Ui.Widget implements Efl.File, Efl.Ui.Clickable, Efl.Ui.Draggable,
-                 Efl.Ui.Legacy
-{
-   [[Elementary photo class]]
-   legacy_prefix: elm_photo;
-   eo_prefix: elm_obj_photo;
-   implements {
-      class.constructor;
-      Efl.Object.constructor;
-      Efl.Object.finalize;
-      Efl.File.file { get; set; }
-      Efl.File.key { get; set; }
-      Efl.File.mmap { get; set; }
-      Efl.File.load;
-      Efl.Ui.Widget.theme_apply;
-      Efl.Ui.Draggable.drag_target { get; set; }
-   }
-}
diff --git a/src/lib/elementary/elm_photo_eo.c b/src/lib/elementary/elm_photo_eo.c
new file mode 100644 (file)
index 0000000..02b8a28
--- /dev/null
@@ -0,0 +1,79 @@
+
+Efl_Object *_elm_photo_efl_object_constructor(Eo *obj, Elm_Photo_Data *pd);
+
+
+Efl_Object *_elm_photo_efl_object_finalize(Eo *obj, Elm_Photo_Data *pd);
+
+
+Eina_Error _elm_photo_efl_file_file_set(Eo *obj, Elm_Photo_Data *pd, const char *file);
+
+
+const char *_elm_photo_efl_file_file_get(const Eo *obj, Elm_Photo_Data *pd);
+
+
+void _elm_photo_efl_file_key_set(Eo *obj, Elm_Photo_Data *pd, const char *key);
+
+
+const char *_elm_photo_efl_file_key_get(const Eo *obj, Elm_Photo_Data *pd);
+
+
+Eina_Error _elm_photo_efl_file_mmap_set(Eo *obj, Elm_Photo_Data *pd, const Eina_File *f);
+
+
+const Eina_File *_elm_photo_efl_file_mmap_get(const Eo *obj, Elm_Photo_Data *pd);
+
+
+Eina_Error _elm_photo_efl_file_load(Eo *obj, Elm_Photo_Data *pd);
+
+
+Eina_Error _elm_photo_efl_ui_widget_theme_apply(Eo *obj, Elm_Photo_Data *pd);
+
+
+void _elm_photo_efl_ui_draggable_drag_target_set(Eo *obj, Elm_Photo_Data *pd, Eina_Bool set);
+
+
+Eina_Bool _elm_photo_efl_ui_draggable_drag_target_get(const Eo *obj, Elm_Photo_Data *pd);
+
+
+static Eina_Bool
+_elm_photo_class_initializer(Efl_Class *klass)
+{
+   const Efl_Object_Ops *opsp = NULL;
+
+   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
+
+#ifndef ELM_PHOTO_EXTRA_OPS
+#define ELM_PHOTO_EXTRA_OPS
+#endif
+
+   EFL_OPS_DEFINE(ops,
+      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_photo_efl_object_constructor),
+      EFL_OBJECT_OP_FUNC(efl_finalize, _elm_photo_efl_object_finalize),
+      EFL_OBJECT_OP_FUNC(efl_file_set, _elm_photo_efl_file_file_set),
+      EFL_OBJECT_OP_FUNC(efl_file_get, _elm_photo_efl_file_file_get),
+      EFL_OBJECT_OP_FUNC(efl_file_key_set, _elm_photo_efl_file_key_set),
+      EFL_OBJECT_OP_FUNC(efl_file_key_get, _elm_photo_efl_file_key_get),
+      EFL_OBJECT_OP_FUNC(efl_file_mmap_set, _elm_photo_efl_file_mmap_set),
+      EFL_OBJECT_OP_FUNC(efl_file_mmap_get, _elm_photo_efl_file_mmap_get),
+      EFL_OBJECT_OP_FUNC(efl_file_load, _elm_photo_efl_file_load),
+      EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_photo_efl_ui_widget_theme_apply),
+      EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_set, _elm_photo_efl_ui_draggable_drag_target_set),
+      EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_get, _elm_photo_efl_ui_draggable_drag_target_get),
+      ELM_PHOTO_EXTRA_OPS
+   );
+   opsp = &ops;
+
+   return efl_class_functions_set(klass, opsp, ropsp);
+}
+
+static const Efl_Class_Description _elm_photo_class_desc = {
+   EO_VERSION,
+   "Elm.Photo",
+   EFL_CLASS_TYPE_REGULAR,
+   sizeof(Elm_Photo_Data),
+   _elm_photo_class_initializer,
+   _elm_photo_class_constructor,
+   NULL
+};
+
+EFL_DEFINE_CLASS(elm_photo_class_get, &_elm_photo_class_desc, EFL_UI_WIDGET_CLASS, EFL_FILE_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_DRAGGABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL);
diff --git a/src/lib/elementary/elm_photo_eo.h b/src/lib/elementary/elm_photo_eo.h
new file mode 100644 (file)
index 0000000..50cdb23
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef _ELM_PHOTO_EO_H_
+#define _ELM_PHOTO_EO_H_
+
+#ifndef _ELM_PHOTO_EO_CLASS_TYPE
+#define _ELM_PHOTO_EO_CLASS_TYPE
+
+typedef Eo Elm_Photo;
+
+#endif
+
+#ifndef _ELM_PHOTO_EO_TYPES
+#define _ELM_PHOTO_EO_TYPES
+
+
+#endif
+/** Elementary photo class
+ *
+ * @ingroup Elm_Photo
+ */
+#define ELM_PHOTO_CLASS elm_photo_class_get()
+
+EWAPI const Efl_Class *elm_photo_class_get(void);
+
+#endif
diff --git a/src/lib/elementary/elm_photo_eo.legacy.h b/src/lib/elementary/elm_photo_eo.legacy.h
new file mode 100644 (file)
index 0000000..4258afa
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _ELM_PHOTO_EO_LEGACY_H_
+#define _ELM_PHOTO_EO_LEGACY_H_
+
+#ifndef _ELM_PHOTO_EO_CLASS_TYPE
+#define _ELM_PHOTO_EO_CLASS_TYPE
+
+typedef Eo Elm_Photo;
+
+#endif
+
+#ifndef _ELM_PHOTO_EO_TYPES
+#define _ELM_PHOTO_EO_TYPES
+
+
+#endif
+
+#endif
index 36005de..3368bb7 100644 (file)
@@ -116,4 +116,4 @@ EAPI int elm_photo_size_get(const Evas_Object *obj);
  */
 EAPI void elm_photo_thumb_set(Evas_Object *obj, const char *file, const char *group);
 
-#include "elm_photo.eo.legacy.h"
+#include "elm_photo_eo.legacy.h"
index f413899..4cb8617 100644 (file)
@@ -28,7 +28,6 @@ pub_legacy_eo_files = [
   'elm_actionslider_part.eo',
   'elm_bubble_part.eo',
   'elm_fileselector_part.eo',
-  'elm_photo.eo',
   'elm_prefs.eo',
   'elm_segment_control.eo',
   'elm_segment_control_item.eo',
@@ -900,6 +899,8 @@ elementary_pub_headers = [
   'elm_panel_eo.legacy.h',
   'elm_pan_eo.h',
   'elm_pan_eo.legacy.h',
+  'elm_photo_eo.h',
+  'elm_photo_eo.legacy.h',
 ]
 
 elementary_header_src = [