zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2f7eef14d8bd58a93577c1a0bf8d467c2f0aaca4

commit 2f7eef14d8bd58a93577c1a0bf8d467c2f0aaca4
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Wed Jan 15 09:23:59 2020 -0500

    elm/animation: correctly implement legacy class
    
    Summary: cmon.
    
    Reviewers: bu5hm4n, jsuya
    
    Reviewed By: jsuya
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D11098
---
 src/lib/elementary/efl_ui_vg_animation.c           | 20 ++++++++++++--
 src/lib/elementary/efl_ui_vg_animation_eo.legacy.c | 32 ++++++++++++++++++++++
 src/lib/elementary/efl_ui_vg_animation_eo.legacy.h | 10 +++++++
 3 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/efl_ui_vg_animation.c 
b/src/lib/elementary/efl_ui_vg_animation.c
index 8e4339b760..210c5ec29c 100644
--- a/src/lib/elementary/efl_ui_vg_animation.c
+++ b/src/lib/elementary/efl_ui_vg_animation.c
@@ -12,7 +12,6 @@
 #define MY_CLASS EFL_UI_VG_ANIMATION_CLASS
 
 #define MY_CLASS_NAME "Efl_Ui_Vg_Animation"
-#define MY_CLASS_NAME_LEGACY "efl_ui_vg_animation"
 
 static const char SIG_FOCUSED[] = "focused";
 static const char SIG_UNFOCUSED[] = "unfocused";
@@ -262,7 +261,6 @@ _efl_ui_vg_animation_efl_object_constructor(Eo *obj,
                                            Efl_Ui_Vg_Animation_Data *pd 
EINA_UNUSED)
 {
    obj = efl_constructor(efl_super(obj, MY_CLASS));
-   efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
    evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
 
    return obj;
@@ -829,11 +827,27 @@ _efl_ui_vg_animation_efl_playable_seekable_get(const Eo 
*obj, Efl_Ui_Vg_Animatio
    return EINA_TRUE;
 }
 
+#define MY_CLASS_NAME_LEGACY "elm_animation_view"
+
+static void
+_efl_ui_vg_animation_legacy_class_constructor(Efl_Class *klass)
+{
+   evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
+}
+
+EOLIAN static Eo *
+_efl_ui_vg_animation_legacy_efl_object_constructor(Eo *obj, void *pd 
EINA_UNUSED)
+{
+   obj = efl_constructor(efl_super(obj, EFL_UI_VG_ANIMATION_LEGACY_CLASS));
+   efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
+   return obj;
+}
+
 EAPI Elm_Animation_View*
 elm_animation_view_add(Evas_Object *parent)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
-   return elm_legacy_add(MY_CLASS, parent);
+   return elm_legacy_add(EFL_UI_VG_ANIMATION_LEGACY_CLASS, parent);
 }
 
 EAPI Eina_Bool
diff --git a/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c 
b/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
index ad99d1b8a9..04aba9206f 100644
--- a/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
+++ b/src/lib/elementary/efl_ui_vg_animation_eo.legacy.c
@@ -166,3 +166,35 @@ elm_animation_view_max_frame_get(const Efl_Ui_Vg_Animation 
*obj)
 {
    return efl_ui_vg_animation_max_frame_get(obj);
 }
+
+static Eina_Bool
+_efl_ui_vg_animation_legacy_class_initializer(Efl_Class *klass)
+{
+   const Efl_Object_Ops *opsp = NULL;
+
+   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
+
+#ifndef EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
+#define EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
+#endif
+
+   EFL_OPS_DEFINE(ops,
+      EFL_OBJECT_OP_FUNC(efl_constructor, 
_efl_ui_vg_animation_legacy_efl_object_constructor),
+      EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
+   );
+   opsp = &ops;
+
+   return efl_class_functions_set(klass, opsp, ropsp);
+}
+
+static const Efl_Class_Description _efl_ui_vg_animation_legacy_class_desc = {
+   EO_VERSION,
+   "Efl.Ui.VG_Animation_Legacy",
+   EFL_CLASS_TYPE_REGULAR,
+   0,
+   _efl_ui_vg_animation_legacy_class_initializer,
+   _efl_ui_vg_animation_legacy_class_constructor,
+   NULL
+};
+
+EFL_DEFINE_CLASS(efl_ui_vg_animation_legacy_class_get, 
&_efl_ui_vg_animation_legacy_class_desc, EFL_UI_VG_ANIMATION_CLASS, 
EFL_UI_LEGACY_INTERFACE, NULL);
diff --git a/src/lib/elementary/efl_ui_vg_animation_eo.legacy.h 
b/src/lib/elementary/efl_ui_vg_animation_eo.legacy.h
index 78dd2f1d5d..5a46daa138 100644
--- a/src/lib/elementary/efl_ui_vg_animation_eo.legacy.h
+++ b/src/lib/elementary/efl_ui_vg_animation_eo.legacy.h
@@ -514,4 +514,14 @@ EAPI void 
elm_animation_view_max_frame_set(Elm_Animation_View *obj, int max_fram
  */
 EAPI int elm_animation_view_max_frame_get(const Elm_Animation_View *obj);
 
+#ifdef EFL_BETA_API_SUPPORT
+/** Elementary vg_animation class
+ *
+ * @ingroup Efl_Ui_VG_Animation_Legacy
+ */
+#define EFL_UI_VG_ANIMATION_LEGACY_CLASS efl_ui_vg_animation_legacy_class_get()
+
+EWAPI const Efl_Class *efl_ui_vg_animation_legacy_class_get(void);
+#endif /* EFL_BETA_API_SUPPORT */
+
 #endif

-- 


Reply via email to