summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-01-15 09:23:59 -0500
committerMike Blumenkrantz <zmike@samsung.com>2020-01-15 09:23:59 -0500
commit2f7eef14d8bd58a93577c1a0bf8d467c2f0aaca4 (patch)
treec80088855ae58eae49936ae0090228f3ea841bb6
parent090df4331b9c680d50b884ccac8f39c0f312fc16 (diff)
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
-rw-r--r--src/lib/elementary/efl_ui_vg_animation.c20
-rw-r--r--src/lib/elementary/efl_ui_vg_animation_eo.legacy.c32
-rw-r--r--src/lib/elementary/efl_ui_vg_animation_eo.legacy.h10
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 @@
12#define MY_CLASS EFL_UI_VG_ANIMATION_CLASS 12#define MY_CLASS EFL_UI_VG_ANIMATION_CLASS
13 13
14#define MY_CLASS_NAME "Efl_Ui_Vg_Animation" 14#define MY_CLASS_NAME "Efl_Ui_Vg_Animation"
15#define MY_CLASS_NAME_LEGACY "efl_ui_vg_animation"
16 15
17static const char SIG_FOCUSED[] = "focused"; 16static const char SIG_FOCUSED[] = "focused";
18static const char SIG_UNFOCUSED[] = "unfocused"; 17static const char SIG_UNFOCUSED[] = "unfocused";
@@ -262,7 +261,6 @@ _efl_ui_vg_animation_efl_object_constructor(Eo *obj,
262 Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED) 261 Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
263{ 262{
264 obj = efl_constructor(efl_super(obj, MY_CLASS)); 263 obj = efl_constructor(efl_super(obj, MY_CLASS));
265 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
266 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 264 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
267 265
268 return obj; 266 return obj;
@@ -829,11 +827,27 @@ _efl_ui_vg_animation_efl_playable_seekable_get(const Eo *obj, Efl_Ui_Vg_Animatio
829 return EINA_TRUE; 827 return EINA_TRUE;
830} 828}
831 829
830#define MY_CLASS_NAME_LEGACY "elm_animation_view"
831
832static void
833_efl_ui_vg_animation_legacy_class_constructor(Efl_Class *klass)
834{
835 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
836}
837
838EOLIAN static Eo *
839_efl_ui_vg_animation_legacy_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
840{
841 obj = efl_constructor(efl_super(obj, EFL_UI_VG_ANIMATION_LEGACY_CLASS));
842 efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
843 return obj;
844}
845
832EAPI Elm_Animation_View* 846EAPI Elm_Animation_View*
833elm_animation_view_add(Evas_Object *parent) 847elm_animation_view_add(Evas_Object *parent)
834{ 848{
835 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 849 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
836 return elm_legacy_add(MY_CLASS, parent); 850 return elm_legacy_add(EFL_UI_VG_ANIMATION_LEGACY_CLASS, parent);
837} 851}
838 852
839EAPI Eina_Bool 853EAPI 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)
166{ 166{
167 return efl_ui_vg_animation_max_frame_get(obj); 167 return efl_ui_vg_animation_max_frame_get(obj);
168} 168}
169
170static Eina_Bool
171_efl_ui_vg_animation_legacy_class_initializer(Efl_Class *klass)
172{
173 const Efl_Object_Ops *opsp = NULL;
174
175 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
176
177#ifndef EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
178#define EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
179#endif
180
181 EFL_OPS_DEFINE(ops,
182 EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_vg_animation_legacy_efl_object_constructor),
183 EFL_UI_VG_ANIMATION_LEGACY_EXTRA_OPS
184 );
185 opsp = &ops;
186
187 return efl_class_functions_set(klass, opsp, ropsp);
188}
189
190static const Efl_Class_Description _efl_ui_vg_animation_legacy_class_desc = {
191 EO_VERSION,
192 "Efl.Ui.VG_Animation_Legacy",
193 EFL_CLASS_TYPE_REGULAR,
194 0,
195 _efl_ui_vg_animation_legacy_class_initializer,
196 _efl_ui_vg_animation_legacy_class_constructor,
197 NULL
198};
199
200EFL_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
514 */ 514 */
515EAPI int elm_animation_view_max_frame_get(const Elm_Animation_View *obj); 515EAPI int elm_animation_view_max_frame_get(const Elm_Animation_View *obj);
516 516
517#ifdef EFL_BETA_API_SUPPORT
518/** Elementary vg_animation class
519 *
520 * @ingroup Efl_Ui_VG_Animation_Legacy
521 */
522#define EFL_UI_VG_ANIMATION_LEGACY_CLASS efl_ui_vg_animation_legacy_class_get()
523
524EWAPI const Efl_Class *efl_ui_vg_animation_legacy_class_get(void);
525#endif /* EFL_BETA_API_SUPPORT */
526
517#endif 527#endif