diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 405392bdd5..cf961dbdf2 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -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 \ diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 423e258b33..483c8ffdeb 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -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" diff --git a/src/lib/elementary/efl_ui_textpath.eo b/src/lib/elementary/efl_ui_textpath.eo index d61bf187d3..fc4642bb62 100644 --- a/src/lib/elementary/efl_ui_textpath.eo +++ b/src/lib/elementary/efl_ui_textpath.eo @@ -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.]] diff --git a/src/lib/elementary/efl_ui_textpath_eo.legacy.c b/src/lib/elementary/efl_ui_textpath_eo.legacy.c new file mode 100644 index 0000000000..e810a856dd --- /dev/null +++ b/src/lib/elementary/efl_ui_textpath_eo.legacy.c @@ -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); +} diff --git a/src/lib/elementary/efl_ui_textpath_eo.legacy.h b/src/lib/elementary/efl_ui_textpath_eo.legacy.h new file mode 100644 index 0000000000..47660c5f59 --- /dev/null +++ b/src/lib/elementary/efl_ui_textpath_eo.legacy.h @@ -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 diff --git a/src/lib/elementary/efl_ui_textpath_legacy.eo b/src/lib/elementary/efl_ui_textpath_legacy.eo deleted file mode 100644 index 0bc275f996..0000000000 --- a/src/lib/elementary/efl_ui_textpath_legacy.eo +++ /dev/null @@ -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; - } -} diff --git a/src/lib/elementary/efl_ui_textpath_legacy_eo.c b/src/lib/elementary/efl_ui_textpath_legacy_eo.c new file mode 100644 index 0000000000..401a626321 --- /dev/null +++ b/src/lib/elementary/efl_ui_textpath_legacy_eo.c @@ -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); diff --git a/src/lib/elementary/efl_ui_textpath_legacy_eo.h b/src/lib/elementary/efl_ui_textpath_legacy_eo.h new file mode 100644 index 0000000000..9a721634b1 --- /dev/null +++ b/src/lib/elementary/efl_ui_textpath_legacy_eo.h @@ -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 diff --git a/src/lib/elementary/efl_ui_textpath_legacy_eo.legacy.h b/src/lib/elementary/efl_ui_textpath_legacy_eo.legacy.h new file mode 100644 index 0000000000..090ad494df --- /dev/null +++ b/src/lib/elementary/efl_ui_textpath_legacy_eo.legacy.h @@ -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 diff --git a/src/lib/elementary/elm_textpath_legacy.h b/src/lib/elementary/elm_textpath_legacy.h index b57dafff15..1795bdfa60 100644 --- a/src/lib/elementary/elm_textpath_legacy.h +++ b/src/lib/elementary/elm_textpath_legacy.h @@ -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" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 5e56acf6aa..64552e8f7b 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -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',