From 40926d085dea2c79ad0c7ce4a89839519fb123ea Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_bubble: 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: Daniel Kolesa Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8155 --- src/Makefile_Elementary.am | 5 +- src/lib/elementary/elm_bubble.c | 4 +- src/lib/elementary/elm_bubble.eo | 44 -------------- src/lib/elementary/elm_bubble_eo.c | 55 +++++++++++++++++ src/lib/elementary/elm_bubble_eo.h | 74 +++++++++++++++++++++++ src/lib/elementary/elm_bubble_eo.legacy.c | 12 ++++ src/lib/elementary/elm_bubble_eo.legacy.h | 67 ++++++++++++++++++++ src/lib/elementary/elm_bubble_legacy.h | 2 +- src/lib/elementary/meson.build | 3 +- 9 files changed, 217 insertions(+), 49 deletions(-) delete mode 100644 src/lib/elementary/elm_bubble.eo create mode 100644 src/lib/elementary/elm_bubble_eo.c create mode 100644 src/lib/elementary/elm_bubble_eo.h create mode 100644 src/lib/elementary/elm_bubble_eo.legacy.c create mode 100644 src/lib/elementary/elm_bubble_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index f69d22cf00..8c8f8cf449 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -249,7 +249,6 @@ elm_legacy_eolian_files = \ lib/elementary/elm_actionslider_part.eo \ lib/elementary/elm_bubble_part.eo \ lib/elementary/elm_fileselector_part.eo \ - lib/elementary/elm_bubble.eo \ lib/elementary/elm_diskselector.eo \ lib/elementary/elm_diskselector_item.eo \ lib/elementary/elm_fileselector_button.eo \ @@ -334,6 +333,8 @@ lib/elementary/elm_actionslider_eo.c \ lib/elementary/elm_actionslider_eo.legacy.c \ lib/elementary/elm_box_eo.c \ lib/elementary/elm_box_eo.legacy.c \ +lib/elementary/elm_bubble_eo.c \ +lib/elementary/elm_bubble_eo.legacy.c \ lib/elementary/elm_hoversel_eo.c \ lib/elementary/elm_hoversel_item_eo.c \ lib/elementary/elm_hoversel_item_eo.legacy.c @@ -388,6 +389,8 @@ lib/elementary/elm_actionslider_eo.h \ lib/elementary/elm_actionslider_eo.legacy.h \ lib/elementary/elm_box_eo.h \ lib/elementary/elm_box_eo.legacy.h \ +lib/elementary/elm_bubble_eo.h \ +lib/elementary/elm_bubble_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/elm_bubble.c b/src/lib/elementary/elm_bubble.c index a882a2e567..f6f4a97c6d 100644 --- a/src/lib/elementary/elm_bubble.c +++ b/src/lib/elementary/elm_bubble.c @@ -8,7 +8,7 @@ #include #include "elm_priv.h" -#include "elm_bubble.eo.h" +#include "elm_bubble_eo.h" #include "elm_widget_bubble.h" #include "elm_widget_layout.h" @@ -246,4 +246,4 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(MY_CLASS_PFX) ELM_LAYOUT_SIZING_EVAL_OPS(elm_bubble), \ EFL_CANVAS_GROUP_ADD_OPS(elm_bubble) -#include "elm_bubble.eo.c" +#include "elm_bubble_eo.c" diff --git a/src/lib/elementary/elm_bubble.eo b/src/lib/elementary/elm_bubble.eo deleted file mode 100644 index f5c2e06081..0000000000 --- a/src/lib/elementary/elm_bubble.eo +++ /dev/null @@ -1,44 +0,0 @@ -enum Elm.Bubble.Pos -{ - [[Defines the corner values for a bubble. - - The corner will be used to determine where the arrow of the - bubble points to. - ]] - invalid = -1, [[Invalid corner.]] - top_left, [[The arrow of the bubble points to the top left corner.]] - top_right, [[The arrow of the bubble points to the top right corner.]] - bottom_left, [[The arrow of the bubble points to the bottom left corner.]] - bottom_right [[The arrow of the bubble points to the bottom right corner.]] -} - -class Elm.Bubble extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable, Efl.Ui.Legacy -{ - [[Speech bubble widget used in messaging applications]] - - legacy_prefix: elm_bubble; - eo_prefix: elm_obj_bubble; - methods { - @property pos { - [[The corner of the bubble - - This function sets the corner of the bubble. The corner will be used to - determine where the arrow in the frame points to and where label, icon and - info are shown. See @Elm.Bubble.Pos - ]] - set { - } - get { - } - values { - pos: Elm.Bubble.Pos; [[The given corner for the bubble.]] - } - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.on_access_update; - Efl.Part.part_get; - } -} diff --git a/src/lib/elementary/elm_bubble_eo.c b/src/lib/elementary/elm_bubble_eo.c new file mode 100644 index 0000000000..8b6ef3e104 --- /dev/null +++ b/src/lib/elementary/elm_bubble_eo.c @@ -0,0 +1,55 @@ + +void _elm_bubble_pos_set(Eo *obj, Elm_Bubble_Data *pd, Elm_Bubble_Pos pos); + +EOAPI EFL_VOID_FUNC_BODYV(elm_obj_bubble_pos_set, EFL_FUNC_CALL(pos), Elm_Bubble_Pos pos); + +Elm_Bubble_Pos _elm_bubble_pos_get(const Eo *obj, Elm_Bubble_Data *pd); + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_bubble_pos_get, Elm_Bubble_Pos, 0); + +Efl_Object *_elm_bubble_efl_object_constructor(Eo *obj, Elm_Bubble_Data *pd); + + +void _elm_bubble_efl_ui_widget_on_access_update(Eo *obj, Elm_Bubble_Data *pd, Eina_Bool enable); + + +Efl_Object *_elm_bubble_efl_part_part_get(const Eo *obj, Elm_Bubble_Data *pd, const char *name); + + +static Eina_Bool +_elm_bubble_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_BUBBLE_EXTRA_OPS +#define ELM_BUBBLE_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_bubble_pos_set, _elm_bubble_pos_set), + EFL_OBJECT_OP_FUNC(elm_obj_bubble_pos_get, _elm_bubble_pos_get), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_bubble_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_bubble_efl_ui_widget_on_access_update), + EFL_OBJECT_OP_FUNC(efl_part_get, _elm_bubble_efl_part_part_get), + ELM_BUBBLE_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_bubble_class_desc = { + EO_VERSION, + "Elm.Bubble", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Bubble_Data), + _elm_bubble_class_initializer, + _elm_bubble_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_bubble_class_get, &_elm_bubble_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_CLICKABLE_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_bubble_eo.legacy.c" diff --git a/src/lib/elementary/elm_bubble_eo.h b/src/lib/elementary/elm_bubble_eo.h new file mode 100644 index 0000000000..e94541d2c3 --- /dev/null +++ b/src/lib/elementary/elm_bubble_eo.h @@ -0,0 +1,74 @@ +#ifndef _ELM_BUBBLE_EO_H_ +#define _ELM_BUBBLE_EO_H_ + +#ifndef _ELM_BUBBLE_EO_CLASS_TYPE +#define _ELM_BUBBLE_EO_CLASS_TYPE + +typedef Eo Elm_Bubble; + +#endif + +#ifndef _ELM_BUBBLE_EO_TYPES +#define _ELM_BUBBLE_EO_TYPES + +/** + * @brief Defines the corner values for a bubble. + * + * The corner will be used to determine where the arrow of the bubble points + * to. + * + * @ingroup Elm_Bubble + */ +typedef enum +{ + ELM_BUBBLE_POS_INVALID = -1 /* +1 */, /**< Invalid corner. */ + ELM_BUBBLE_POS_TOP_LEFT, /**< The arrow of the bubble points to the top left + * corner. */ + ELM_BUBBLE_POS_TOP_RIGHT, /**< The arrow of the bubble points to the top right + * corner. */ + ELM_BUBBLE_POS_BOTTOM_LEFT, /**< The arrow of the bubble points to the bottom + * left corner. */ + ELM_BUBBLE_POS_BOTTOM_RIGHT /**< The arrow of the bubble points to the bottom + * right corner. */ +} Elm_Bubble_Pos; + + +#endif +/** Speech bubble widget used in messaging applications + * + * @ingroup Elm_Bubble + */ +#define ELM_BUBBLE_CLASS elm_bubble_class_get() + +EWAPI const Efl_Class *elm_bubble_class_get(void); + +/** + * @brief The corner of the bubble + * + * This function sets the corner of the bubble. The corner will be used to + * determine where the arrow in the frame points to and where label, icon and + * info are shown. See @ref Elm_Bubble_Pos + * + * @param[in] obj The object. + * @param[in] pos The given corner for the bubble. + * + * @ingroup Elm_Bubble + */ +EOAPI void elm_obj_bubble_pos_set(Eo *obj, Elm_Bubble_Pos pos); + +/** + * @brief The corner of the bubble + * + * This function sets the corner of the bubble. The corner will be used to + * determine where the arrow in the frame points to and where label, icon and + * info are shown. See @ref Elm_Bubble_Pos + * + * @param[in] obj The object. + * + * @return The given corner for the bubble. + * + * @ingroup Elm_Bubble + */ +EOAPI Elm_Bubble_Pos elm_obj_bubble_pos_get(const Eo *obj); + +#endif diff --git a/src/lib/elementary/elm_bubble_eo.legacy.c b/src/lib/elementary/elm_bubble_eo.legacy.c new file mode 100644 index 0000000000..812b6b21d3 --- /dev/null +++ b/src/lib/elementary/elm_bubble_eo.legacy.c @@ -0,0 +1,12 @@ + +EAPI void +elm_bubble_pos_set(Elm_Bubble *obj, Elm_Bubble_Pos pos) +{ + elm_obj_bubble_pos_set(obj, pos); +} + +EAPI Elm_Bubble_Pos +elm_bubble_pos_get(const Elm_Bubble *obj) +{ + return elm_obj_bubble_pos_get(obj); +} diff --git a/src/lib/elementary/elm_bubble_eo.legacy.h b/src/lib/elementary/elm_bubble_eo.legacy.h new file mode 100644 index 0000000000..3b06655c24 --- /dev/null +++ b/src/lib/elementary/elm_bubble_eo.legacy.h @@ -0,0 +1,67 @@ +#ifndef _ELM_BUBBLE_EO_LEGACY_H_ +#define _ELM_BUBBLE_EO_LEGACY_H_ + +#ifndef _ELM_BUBBLE_EO_CLASS_TYPE +#define _ELM_BUBBLE_EO_CLASS_TYPE + +typedef Eo Elm_Bubble; + +#endif + +#ifndef _ELM_BUBBLE_EO_TYPES +#define _ELM_BUBBLE_EO_TYPES + +/** + * @brief Defines the corner values for a bubble. + * + * The corner will be used to determine where the arrow of the bubble points + * to. + * + * @ingroup Elm_Bubble + */ +typedef enum +{ + ELM_BUBBLE_POS_INVALID = -1 /* +1 */, /**< Invalid corner. */ + ELM_BUBBLE_POS_TOP_LEFT, /**< The arrow of the bubble points to the top left + * corner. */ + ELM_BUBBLE_POS_TOP_RIGHT, /**< The arrow of the bubble points to the top right + * corner. */ + ELM_BUBBLE_POS_BOTTOM_LEFT, /**< The arrow of the bubble points to the bottom + * left corner. */ + ELM_BUBBLE_POS_BOTTOM_RIGHT /**< The arrow of the bubble points to the bottom + * right corner. */ +} Elm_Bubble_Pos; + + +#endif + +/** + * @brief The corner of the bubble + * + * This function sets the corner of the bubble. The corner will be used to + * determine where the arrow in the frame points to and where label, icon and + * info are shown. See @ref Elm_Bubble_Pos + * + * @param[in] obj The object. + * @param[in] pos The given corner for the bubble. + * + * @ingroup Elm_Bubble_Group + */ +EAPI void elm_bubble_pos_set(Elm_Bubble *obj, Elm_Bubble_Pos pos); + +/** + * @brief The corner of the bubble + * + * This function sets the corner of the bubble. The corner will be used to + * determine where the arrow in the frame points to and where label, icon and + * info are shown. See @ref Elm_Bubble_Pos + * + * @param[in] obj The object. + * + * @return The given corner for the bubble. + * + * @ingroup Elm_Bubble_Group + */ +EAPI Elm_Bubble_Pos elm_bubble_pos_get(const Elm_Bubble *obj); + +#endif diff --git a/src/lib/elementary/elm_bubble_legacy.h b/src/lib/elementary/elm_bubble_legacy.h index fe19303f68..c301e0d6ea 100644 --- a/src/lib/elementary/elm_bubble_legacy.h +++ b/src/lib/elementary/elm_bubble_legacy.h @@ -10,4 +10,4 @@ */ EAPI Evas_Object *elm_bubble_add(Evas_Object *parent); -#include "elm_bubble.eo.legacy.h" \ No newline at end of file +#include "elm_bubble_eo.legacy.h" \ No newline at end of file diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 68e2b92d7b..dcf1b0f858 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -63,7 +63,6 @@ pub_legacy_eo_files = [ 'elm_actionslider_part.eo', 'elm_bubble_part.eo', 'elm_fileselector_part.eo', - 'elm_bubble.eo', 'elm_diskselector.eo', 'elm_diskselector_item.eo', 'elm_fileselector_button.eo', @@ -725,6 +724,8 @@ elementary_pub_headers = [ 'elm_actionslider_eo.legacy.h', 'elm_box_eo.h', 'elm_box_eo.legacy.h', + 'elm_bubble_eo.h', + 'elm_bubble_eo.legacy.h', 'elm_hoversel_eo.h', 'elm_hoversel_eo.legacy.h', 'elm_hoversel_item_eo.h',