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 <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8195
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent d6f280a42f
commit 6155a3df3c
10 changed files with 196 additions and 52 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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;
}
}

View File

@ -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"

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -8,4 +8,4 @@
*/
EAPI Evas_Object *elm_route_add(Evas_Object *parent);
#include "elm_route.eo.legacy.h"
#include "elm_route_eo.legacy.h"

View File

@ -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

View File

@ -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 = [