From bd84e629c8e8410304e7c79e534fc8bd9d97cdff Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_route: remove all legacy usage from eo files 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 Differential Revision: https://phab.enlightenment.org/D8195 --- src/Makefile_Elementary.am | 5 ++- src/lib/elementary/elm_route.c | 2 +- src/lib/elementary/elm_route.eo | 47 ------------------------- src/lib/elementary/elm_route_eo.c | 56 +++++++++++++++++++++++++++++ src/lib/elementary/elm_route_eo.h | 60 ++++++++++++++++++++++++++++++++ src/lib/elementary/elm_route_eo.legacy.c | 18 ++++++++++ src/lib/elementary/elm_route_eo.legacy.h | 53 ++++++++++++++++++++++++++++ src/lib/elementary/elm_route_legacy.h | 2 +- src/lib/elementary/elm_widget_route.h | 2 +- src/lib/elementary/meson.build | 3 +- 10 files changed, 196 insertions(+), 52 deletions(-) delete mode 100644 src/lib/elementary/elm_route.eo create mode 100644 src/lib/elementary/elm_route_eo.c create mode 100644 src/lib/elementary/elm_route_eo.h create mode 100644 src/lib/elementary/elm_route_eo.legacy.c create mode 100644 src/lib/elementary/elm_route_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 3d002d7..0a4ed5b 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -195,7 +195,6 @@ endif elm_legacy_eolian_files = \ lib/elementary/efl_ui_animation_view.eo \ lib/elementary/efl_ui_clock_legacy.eo \ - lib/elementary/elm_route.eo \ lib/elementary/elm_scroller.eo \ lib/elementary/elm_sys_notify_interface.eo \ lib/elementary/elm_sys_notify.eo \ @@ -392,6 +391,8 @@ lib/elementary/elm_popup_eo.legacy.c \ lib/elementary/elm_popup_item_eo.c \ lib/elementary/elm_prefs_eo.c \ lib/elementary/elm_prefs_eo.legacy.c \ +lib/elementary/elm_route_eo.c \ +lib/elementary/elm_route_eo.legacy.c \ $(NULL) elm_legacy_eo_headers = \ @@ -563,6 +564,8 @@ lib/elementary/elm_popup_item_eo.h \ lib/elementary/elm_popup_item_eo.legacy.h \ lib/elementary/elm_prefs_eo.h \ lib/elementary/elm_prefs_eo.legacy.h \ +lib/elementary/elm_route_eo.h \ +lib/elementary/elm_route_eo.legacy.h \ $(NULL) diff --git a/src/lib/elementary/elm_route.c b/src/lib/elementary/elm_route.c index 6b52ef1..3b9d3ec 100644 --- a/src/lib/elementary/elm_route.c +++ b/src/lib/elementary/elm_route.c @@ -265,4 +265,4 @@ _elm_route_class_constructor(Efl_Class *klass) #define ELM_ROUTE_EXTRA_OPS \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_route) -#include "elm_route.eo.c" +#include "elm_route_eo.c" diff --git a/src/lib/elementary/elm_route.eo b/src/lib/elementary/elm_route.eo deleted file mode 100644 index 0df51d4..0000000 --- a/src/lib/elementary/elm_route.eo +++ /dev/null @@ -1,47 +0,0 @@ -class Elm.Route extends Efl.Ui.Widget implements Efl.Ui.Legacy -{ - [[Elementary route class]] - legacy_prefix: elm_route; - eo_prefix: elm_obj_route; - methods { - @property emap { - set { - [[Set map widget for this route]] - } - values { - emap: void_ptr; [[Elementary map widget]] - } - } - @property longitude_min_max { - get { - [[Get the minimum and maximum values along the longitude. - - Note: If only one value is needed, the other pointer can be - passed as null. - ]] - } - values { - min: double; [[Pointer to store the minimum value.]] - max: double; [[Pointer to store the maximum value.]] - } - } - @property latitude_min_max { - get { - [[Get the minimum and maximum values along the latitude. - - Note: If only one value is needed, the other pointer can be - passed as null. - ]] - } - values { - min: double; [[Pointer to store the minimum value.]] - max: double; [[Pointer to store the maximum value.]] - } - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.theme_apply; - } -} diff --git a/src/lib/elementary/elm_route_eo.c b/src/lib/elementary/elm_route_eo.c new file mode 100644 index 0000000..930eacd --- /dev/null +++ b/src/lib/elementary/elm_route_eo.c @@ -0,0 +1,56 @@ + +void _elm_route_emap_set(Eo *obj, Elm_Route_Data *pd, void *emap); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_route_emap_set, EFL_FUNC_CALL(emap), void *emap); + +void _elm_route_longitude_min_max_get(const Eo *obj, Elm_Route_Data *pd, double *min, double *max); + +EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_route_longitude_min_max_get, EFL_FUNC_CALL(min, max), double *min, double *max); + +void _elm_route_latitude_min_max_get(const Eo *obj, Elm_Route_Data *pd, double *min, double *max); + +EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_route_latitude_min_max_get, EFL_FUNC_CALL(min, max), double *min, double *max); + +Efl_Object *_elm_route_efl_object_constructor(Eo *obj, Elm_Route_Data *pd); + + +Eina_Error _elm_route_efl_ui_widget_theme_apply(Eo *obj, Elm_Route_Data *pd); + + +static Eina_Bool +_elm_route_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_ROUTE_EXTRA_OPS +#define ELM_ROUTE_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_route_emap_set, _elm_route_emap_set), + EFL_OBJECT_OP_FUNC(elm_obj_route_longitude_min_max_get, _elm_route_longitude_min_max_get), + EFL_OBJECT_OP_FUNC(elm_obj_route_latitude_min_max_get, _elm_route_latitude_min_max_get), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_route_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_route_efl_ui_widget_theme_apply), + ELM_ROUTE_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_route_class_desc = { + EO_VERSION, + "Elm.Route", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Route_Data), + _elm_route_class_initializer, + _elm_route_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_route_class_get, &_elm_route_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_route_eo.legacy.c" diff --git a/src/lib/elementary/elm_route_eo.h b/src/lib/elementary/elm_route_eo.h new file mode 100644 index 0000000..a194623 --- /dev/null +++ b/src/lib/elementary/elm_route_eo.h @@ -0,0 +1,60 @@ +#ifndef _ELM_ROUTE_EO_H_ +#define _ELM_ROUTE_EO_H_ + +#ifndef _ELM_ROUTE_EO_CLASS_TYPE +#define _ELM_ROUTE_EO_CLASS_TYPE + +typedef Eo Elm_Route; + +#endif + +#ifndef _ELM_ROUTE_EO_TYPES +#define _ELM_ROUTE_EO_TYPES + + +#endif +/** Elementary route class + * + * @ingroup Elm_Route + */ +#define ELM_ROUTE_CLASS elm_route_class_get() + +EWAPI const Efl_Class *elm_route_class_get(void); + +/** + * @brief Set map widget for this route + * + * @param[in] obj The object. + * @param[in] emap Elementary map widget + * + * @ingroup Elm_Route + */ +EOAPI void elm_obj_route_emap_set(Eo *obj, void *emap); + +/** + * @brief Get the minimum and maximum values along the longitude. + * + * @note If only one value is needed, the other pointer can be passed as null. + * + * @param[in] obj The object. + * @param[out] min Pointer to store the minimum value. + * @param[out] max Pointer to store the maximum value. + * + * @ingroup Elm_Route + */ +EOAPI void elm_obj_route_longitude_min_max_get(const Eo *obj, double *min, double *max); + +/** + * @brief Get the minimum and maximum values along the latitude. + * + * @note If only one value is needed, the other pointer can be passed as null. + * + * @param[in] obj The object. + * @param[out] min Pointer to store the minimum value. + * @param[out] max Pointer to store the maximum value. + * + * @ingroup Elm_Route + */ +EOAPI void elm_obj_route_latitude_min_max_get(const Eo *obj, double *min, double *max); + +#endif diff --git a/src/lib/elementary/elm_route_eo.legacy.c b/src/lib/elementary/elm_route_eo.legacy.c new file mode 100644 index 0000000..69d8a8b --- /dev/null +++ b/src/lib/elementary/elm_route_eo.legacy.c @@ -0,0 +1,18 @@ + +EAPI void +elm_route_emap_set(Elm_Route *obj, void *emap) +{ + elm_obj_route_emap_set(obj, emap); +} + +EAPI void +elm_route_longitude_min_max_get(const Elm_Route *obj, double *min, double *max) +{ + elm_obj_route_longitude_min_max_get(obj, min, max); +} + +EAPI void +elm_route_latitude_min_max_get(const Elm_Route *obj, double *min, double *max) +{ + elm_obj_route_latitude_min_max_get(obj, min, max); +} diff --git a/src/lib/elementary/elm_route_eo.legacy.h b/src/lib/elementary/elm_route_eo.legacy.h new file mode 100644 index 0000000..34650bd --- /dev/null +++ b/src/lib/elementary/elm_route_eo.legacy.h @@ -0,0 +1,53 @@ +#ifndef _ELM_ROUTE_EO_LEGACY_H_ +#define _ELM_ROUTE_EO_LEGACY_H_ + +#ifndef _ELM_ROUTE_EO_CLASS_TYPE +#define _ELM_ROUTE_EO_CLASS_TYPE + +typedef Eo Elm_Route; + +#endif + +#ifndef _ELM_ROUTE_EO_TYPES +#define _ELM_ROUTE_EO_TYPES + + +#endif + +/** + * @brief Set map widget for this route + * + * @param[in] obj The object. + * @param[in] emap Elementary map widget + * + * @ingroup Elm_Route_Group + */ +EAPI void elm_route_emap_set(Elm_Route *obj, void *emap); + +/** + * @brief Get the minimum and maximum values along the longitude. + * + * @note If only one value is needed, the other pointer can be passed as null. + * + * @param[in] obj The object. + * @param[out] min Pointer to store the minimum value. + * @param[out] max Pointer to store the maximum value. + * + * @ingroup Elm_Route_Group + */ +EAPI void elm_route_longitude_min_max_get(const Elm_Route *obj, double *min, double *max); + +/** + * @brief Get the minimum and maximum values along the latitude. + * + * @note If only one value is needed, the other pointer can be passed as null. + * + * @param[in] obj The object. + * @param[out] min Pointer to store the minimum value. + * @param[out] max Pointer to store the maximum value. + * + * @ingroup Elm_Route_Group + */ +EAPI void elm_route_latitude_min_max_get(const Elm_Route *obj, double *min, double *max); + +#endif diff --git a/src/lib/elementary/elm_route_legacy.h b/src/lib/elementary/elm_route_legacy.h index ad320dc..7326024 100644 --- a/src/lib/elementary/elm_route_legacy.h +++ b/src/lib/elementary/elm_route_legacy.h @@ -8,4 +8,4 @@ */ EAPI Evas_Object *elm_route_add(Evas_Object *parent); -#include "elm_route.eo.legacy.h" \ No newline at end of file +#include "elm_route_eo.legacy.h" \ No newline at end of file diff --git a/src/lib/elementary/elm_widget_route.h b/src/lib/elementary/elm_widget_route.h index 6c6286b..651c67f 100644 --- a/src/lib/elementary/elm_widget_route.h +++ b/src/lib/elementary/elm_widget_route.h @@ -1,7 +1,7 @@ #ifndef ELM_WIDGET_ROUTE_H #define ELM_WIDGET_ROUTE_H -#include "elm_route.eo.h" +#include "elm_route_eo.h" /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index f66ae914..7478eae 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1,6 +1,5 @@ pub_legacy_eo_files = [ 'efl_ui_clock_legacy.eo', - 'elm_route.eo', 'elm_scroller.eo', 'elm_sys_notify_interface.eo', 'elm_sys_notify.eo', @@ -906,6 +905,8 @@ elementary_pub_headers = [ 'elm_popup_item_eo.legacy.h', 'elm_prefs_eo.h', 'elm_prefs_eo.legacy.h', + 'elm_route_eo.h', + 'elm_route_eo.legacy.h', ] elementary_header_src = [ -- 2.7.4