efl_ui_textpath: 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/D8146
This commit is contained in:
Mike Blumenkrantz 2019-03-05 17:00:37 -05:00 committed by Cedric BAIL
parent a56b786ae1
commit 054a4d4b17
11 changed files with 205 additions and 15 deletions

View File

@ -57,7 +57,6 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_text_factory_emoticons.eo \
lib/elementary/efl_ui_text_factory_fallback.eo \
lib/elementary/efl_ui_textpath.eo \
lib/elementary/efl_ui_textpath_legacy.eo \
lib/elementary/efl_ui_l10n.eo \
lib/elementary/efl_ui_clock.eo \
lib/elementary/efl_ui_image_factory.eo \
@ -328,6 +327,8 @@ lib/elementary/efl_ui_panes_legacy_eo.c \
lib/elementary/efl_ui_progressbar_legacy_eo.c \
lib/elementary/efl_ui_radio_eo.legacy.c \
lib/elementary/efl_ui_radio_legacy_eo.c \
lib/elementary/efl_ui_textpath_eo.legacy.c \
lib/elementary/efl_ui_textpath_legacy_eo.c \
lib/elementary/elm_hoversel_eo.c \
lib/elementary/elm_hoversel_eo.legacy.c \
lib/elementary/elm_hoversel_item_eo.c \
@ -364,6 +365,9 @@ lib/elementary/efl_ui_progressbar_legacy_eo.legacy.h \
lib/elementary/efl_ui_radio_eo.legacy.h \
lib/elementary/efl_ui_radio_legacy_eo.h \
lib/elementary/efl_ui_radio_legacy_eo.legacy.h \
lib/elementary/efl_ui_textpath_eo.legacy.h \
lib/elementary/efl_ui_textpath_legacy_eo.h \
lib/elementary/efl_ui_textpath_legacy_eo.legacy.h \
lib/elementary/elm_hoversel_eo.h \
lib/elementary/elm_hoversel_eo.legacy.h \
lib/elementary/elm_hoversel_item_eo.h \

View File

@ -757,8 +757,9 @@ ELM_PART_OVERRIDE_TEXT_GET(efl_ui_textpath, EFL_UI_TEXTPATH, Efl_Ui_Textpath_Dat
EFL_CANVAS_GROUP_ADD_OPS(efl_ui_textpath)
#include "efl_ui_textpath.eo.c"
#include "efl_ui_textpath_eo.legacy.c"
#include "efl_ui_textpath_legacy.eo.h"
#include "efl_ui_textpath_legacy_eo.h"
#define MY_CLASS_NAME_LEGACY "elm_textpath"
/* Legacy APIs */
@ -784,5 +785,5 @@ elm_textpath_add(Evas_Object *parent)
return elm_legacy_add(EFL_UI_TEXTPATH_LEGACY_CLASS, parent);
}
#include "efl_ui_textpath_legacy.eo.c"
#include "efl_ui_textpath_legacy_eo.c"

View File

@ -7,7 +7,6 @@ enum Efl.Ui.Textpath_Direction {
class @beta Efl.Ui.Textpath extends Efl.Ui.Layout_Base implements Efl.Text, Efl.Gfx.Path
{
[[Efl Ui Textpath class]]
legacy_prefix: elm_textpath;
methods {
circle_set {
[[Set a circle with given center, radius, and start angle.]]

View File

@ -0,0 +1,30 @@
EAPI void
elm_textpath_circle_set(Efl_Ui_Textpath *obj, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction)
{
efl_ui_textpath_circle_set(obj, x, y, radius, start_angle, direction);
}
EAPI void
elm_textpath_slice_number_set(Efl_Ui_Textpath *obj, int slice_no)
{
efl_ui_textpath_slice_number_set(obj, slice_no);
}
EAPI int
elm_textpath_slice_number_get(const Efl_Ui_Textpath *obj)
{
return efl_ui_textpath_slice_number_get(obj);
}
EAPI void
elm_textpath_ellipsis_set(Efl_Ui_Textpath *obj, Eina_Bool ellipsis)
{
efl_ui_textpath_ellipsis_set(obj, ellipsis);
}
EAPI Eina_Bool
elm_textpath_ellipsis_get(const Efl_Ui_Textpath *obj)
{
return efl_ui_textpath_ellipsis_get(obj);
}

View File

@ -0,0 +1,85 @@
#ifndef _EFL_UI_TEXTPATH_EO_LEGACY_H_
#define _EFL_UI_TEXTPATH_EO_LEGACY_H_
#ifndef _EFL_UI_TEXTPATH_EO_CLASS_TYPE
#define _EFL_UI_TEXTPATH_EO_CLASS_TYPE
typedef Eo Efl_Ui_Textpath;
#endif
#ifndef _EFL_UI_TEXTPATH_EO_TYPES
#define _EFL_UI_TEXTPATH_EO_TYPES
/** Textpath direction
*
* @ingroup Efl_Ui
*/
typedef enum
{
EFL_UI_TEXTPATH_DIRECTION_CW = 0, /**< Clockwise */
EFL_UI_TEXTPATH_DIRECTION_CCW /**< Counter-clockwise */
} Efl_Ui_Textpath_Direction;
#endif
/**
* @brief Set a circle with given center, radius, and start angle.
*
* @param[in] obj The object.
* @param[in] x X coordinate of center
* @param[in] y Y coordinate of center
* @param[in] radius Radius of the circle
* @param[in] start_angle Start angle of the circle
* @param[in] direction Textpath direction
*
* @ingroup Elm_Textpath_Group
*/
EAPI void elm_textpath_circle_set(Efl_Ui_Textpath *obj, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction);
/**
* @brief The number of slices. The larger the number of slice_num is, The
* better the text follows the path.
*
* @param[in] obj The object.
* @param[in] slice_no Number of slices
*
* @ingroup Elm_Textpath_Group
*/
EAPI void elm_textpath_slice_number_set(Efl_Ui_Textpath *obj, int slice_no);
/**
* @brief The number of slices. The larger the number of slice_num is, The
* better the text follows the path.
*
* @param[in] obj The object.
*
* @return Number of slices
*
* @ingroup Elm_Textpath_Group
*/
EAPI int elm_textpath_slice_number_get(const Efl_Ui_Textpath *obj);
/**
* @brief Control the ellipsis behavior of the textpath.
*
* @param[in] obj The object.
* @param[in] ellipsis To ellipsis text or not
*
* @ingroup Elm_Textpath_Group
*/
EAPI void elm_textpath_ellipsis_set(Efl_Ui_Textpath *obj, Eina_Bool ellipsis);
/**
* @brief Control the ellipsis behavior of the textpath.
*
* @param[in] obj The object.
*
* @return To ellipsis text or not
*
* @ingroup Elm_Textpath_Group
*/
EAPI Eina_Bool elm_textpath_ellipsis_get(const Efl_Ui_Textpath *obj);
#endif

View File

@ -1,9 +0,0 @@
class @beta Efl.Ui.Textpath_Legacy extends Efl.Ui.Textpath implements Efl.Ui.Legacy
{
[[Textpath widget]]
data: null;
implements {
class.constructor;
Efl.Object.constructor;
}
}

View File

@ -0,0 +1,35 @@
Efl_Object *_efl_ui_textpath_legacy_efl_object_constructor(Eo *obj, void *pd);
static Eina_Bool
_efl_ui_textpath_legacy_class_initializer(Efl_Class *klass)
{
const Efl_Object_Ops *opsp = NULL;
const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
#ifndef EFL_UI_TEXTPATH_LEGACY_EXTRA_OPS
#define EFL_UI_TEXTPATH_LEGACY_EXTRA_OPS
#endif
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_textpath_legacy_efl_object_constructor),
EFL_UI_TEXTPATH_LEGACY_EXTRA_OPS
);
opsp = &ops;
return efl_class_functions_set(klass, opsp, ropsp);
}
static const Efl_Class_Description _efl_ui_textpath_legacy_class_desc = {
EO_VERSION,
"Efl.Ui.Textpath_Legacy",
EFL_CLASS_TYPE_REGULAR,
0,
_efl_ui_textpath_legacy_class_initializer,
_efl_ui_textpath_legacy_class_constructor,
NULL
};
EFL_DEFINE_CLASS(efl_ui_textpath_legacy_class_get, &_efl_ui_textpath_legacy_class_desc, EFL_UI_TEXTPATH_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);

View File

@ -0,0 +1,26 @@
#ifndef _EFL_UI_TEXTPATH_LEGACY_EO_H_
#define _EFL_UI_TEXTPATH_LEGACY_EO_H_
#ifndef _EFL_UI_TEXTPATH_LEGACY_EO_CLASS_TYPE
#define _EFL_UI_TEXTPATH_LEGACY_EO_CLASS_TYPE
typedef Eo Efl_Ui_Textpath_Legacy;
#endif
#ifndef _EFL_UI_TEXTPATH_LEGACY_EO_TYPES
#define _EFL_UI_TEXTPATH_LEGACY_EO_TYPES
#endif
#ifdef EFL_BETA_API_SUPPORT
/** Textpath widget
*
* @ingroup Efl_Ui_Textpath_Legacy
*/
#define EFL_UI_TEXTPATH_LEGACY_CLASS efl_ui_textpath_legacy_class_get()
EWAPI const Efl_Class *efl_ui_textpath_legacy_class_get(void);
#endif /* EFL_BETA_API_SUPPORT */
#endif

View File

@ -0,0 +1,17 @@
#ifndef _EFL_UI_TEXTPATH_LEGACY_EO_LEGACY_H_
#define _EFL_UI_TEXTPATH_LEGACY_EO_LEGACY_H_
#ifndef _EFL_UI_TEXTPATH_LEGACY_EO_CLASS_TYPE
#define _EFL_UI_TEXTPATH_LEGACY_EO_CLASS_TYPE
typedef Eo Efl_Ui_Textpath_Legacy;
#endif
#ifndef _EFL_UI_TEXTPATH_LEGACY_EO_TYPES
#define _EFL_UI_TEXTPATH_LEGACY_EO_TYPES
#endif
#endif

View File

@ -12,4 +12,4 @@ typedef Eo Elm_Textpath;
*/
EAPI Evas_Object *elm_textpath_add(Evas_Object *parent);
#include "efl_ui_textpath.eo.legacy.h"
#include "efl_ui_textpath_eo.legacy.h"

View File

@ -91,7 +91,6 @@ pub_legacy_eo_files = [
'elm_slideshow_item.eo',
'elm_table.eo',
'elm_thumb.eo',
'efl_ui_textpath_legacy.eo',
]
pub_eo_file_target = []
@ -714,6 +713,9 @@ elementary_pub_headers = [
'efl_ui_radio_eo.legacy.h',
'efl_ui_radio_legacy_eo.h',
'efl_ui_radio_legacy_eo.legacy.h',
'efl_ui_textpath_eo.legacy.h',
'efl_ui_textpath_legacy_eo.h',
'efl_ui_textpath_legacy_eo.legacy.h',
'elm_hoversel_eo.h',
'elm_hoversel_eo.legacy.h',
'elm_hoversel_item_eo.h',