forked from enlightenment/efl
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
This commit is contained in:
parent
090df4331b
commit
2f7eef14d8
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue