diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 3bca800e9d..66c5077e90 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -183,7 +183,6 @@ elm_private_eolian_files = \ # Legacy classes - not part of public EO API elm_legacy_eolian_files = \ 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 \ @@ -380,6 +379,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 = \ @@ -551,6 +552,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 6b52ef17cc..3b9d3ecee3 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 0df51d4e0f..0000000000 --- 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 0000000000..930eacdc30 --- /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 0000000000..a1946233e8 --- /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 0000000000..69d8a8b77e --- /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 0000000000..34650bd62e --- /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 ad320dc5dd..7326024abd 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 6c6286bf4d..651c67fd14 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 194804b98f..09a9bd67e6 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', @@ -786,6 +785,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 = [