cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d90c60ea549d12f069df3d9053a8dd7010f1499b
commit d90c60ea549d12f069df3d9053a8dd7010f1499b Author: Mike Blumenkrantz <zm...@samsung.com> Date: Tue Mar 5 17:00:37 2019 -0500 efl_ui_frame: remove all legacy usage from eo files this takes the current generated output from eolian for legacy code in the componenty 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.b...@free.fr> Differential Revision: https://phab.enlightenment.org/D8139 --- src/Makefile_Elementary.am | 5 +- src/lib/elementary/efl_ui_frame.c | 5 +- src/lib/elementary/efl_ui_frame.eo | 1 - src/lib/elementary/efl_ui_frame_eo.legacy.c | 30 +++++++++ src/lib/elementary/efl_ui_frame_eo.legacy.h | 78 ++++++++++++++++++++++ src/lib/elementary/efl_ui_frame_legacy.eo | 14 ---- src/lib/elementary/efl_ui_frame_legacy.h | 2 +- src/lib/elementary/efl_ui_frame_legacy_eo.c | 35 ++++++++++ src/lib/elementary/efl_ui_frame_legacy_eo.h | 31 +++++++++ src/lib/elementary/efl_ui_frame_legacy_eo.legacy.h | 17 +++++ src/lib/elementary/meson.build | 4 +- 11 files changed, 202 insertions(+), 20 deletions(-) diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 8c702b8fd8..6c1c17c7ce 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -188,7 +188,6 @@ elm_private_eolian_files = \ elm_legacy_eolian_files = \ lib/elementary/efl_ui_radio_legacy.eo \ lib/elementary/efl_ui_video_legacy.eo \ - lib/elementary/efl_ui_frame_legacy.eo \ lib/elementary/efl_ui_panes_legacy.eo \ lib/elementary/efl_ui_image_zoomable_legacy.eo \ lib/elementary/efl_ui_win_legacy.eo \ @@ -325,6 +324,7 @@ lib/elementary/efl_ui_bg_legacy_eo.c \ lib/elementary/efl_ui_button_legacy_eo.c \ lib/elementary/efl_ui_check_legacy_eo.c \ lib/elementary/efl_ui_flip_legacy_eo.c \ +lib/elementary/efl_ui_frame_legacy_eo.c \ lib/elementary/elm_hoversel_eo.c \ lib/elementary/elm_hoversel_eo.legacy.c \ lib/elementary/elm_hoversel_item_eo.c \ @@ -343,6 +343,9 @@ lib/elementary/efl_ui_check_legacy_eo.legacy.h \ lib/elementary/efl_ui_flip_eo.legacy.h \ lib/elementary/efl_ui_flip_legacy_eo.h \ lib/elementary/efl_ui_flip_legacy_eo.legacy.h \ +lib/elementary/efl_ui_frame_eo.legacy.h \ +lib/elementary/efl_ui_frame_legacy_eo.h \ +lib/elementary/efl_ui_frame_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_frame.c b/src/lib/elementary/efl_ui_frame.c index 45d1f91787..649a532bea 100644 --- a/src/lib/elementary/efl_ui_frame.c +++ b/src/lib/elementary/efl_ui_frame.c @@ -225,8 +225,9 @@ ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data) EFL_CANVAS_GROUP_ADD_OPS(efl_ui_frame) #include "efl_ui_frame.eo.c" +#include "efl_ui_frame_eo.legacy.c" -#include "efl_ui_frame_legacy.eo.h" +#include "efl_ui_frame_legacy_eo.h" #define MY_CLASS_NAME_LEGACY "elm_frame" @@ -251,4 +252,4 @@ elm_frame_add(Evas_Object *parent) return elm_legacy_add(EFL_UI_FRAME_LEGACY_CLASS, parent); } -#include "efl_ui_frame_legacy.eo.c" +#include "efl_ui_frame_legacy_eo.c" diff --git a/src/lib/elementary/efl_ui_frame.eo b/src/lib/elementary/efl_ui_frame.eo index fd072a4343..509bd02df0 100644 --- a/src/lib/elementary/efl_ui_frame.eo +++ b/src/lib/elementary/efl_ui_frame.eo @@ -7,7 +7,6 @@ class @beta Efl.Ui.Frame extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable, by clicking on the frame label. the label and content can be set using text_set and content_set api. ]] - legacy_prefix: elm_frame; methods { @property collapse { set { diff --git a/src/lib/elementary/efl_ui_frame_eo.legacy.c b/src/lib/elementary/efl_ui_frame_eo.legacy.c new file mode 100644 index 0000000000..ad34a0c7ed --- /dev/null +++ b/src/lib/elementary/efl_ui_frame_eo.legacy.c @@ -0,0 +1,30 @@ + +EAPI void +elm_frame_collapse_set(Efl_Ui_Frame *obj, Eina_Bool collapse) +{ + efl_ui_frame_collapse_set(obj, collapse); +} + +EAPI Eina_Bool +elm_frame_collapse_get(const Efl_Ui_Frame *obj) +{ + return efl_ui_frame_collapse_get(obj); +} + +EAPI void +elm_frame_autocollapse_set(Efl_Ui_Frame *obj, Eina_Bool autocollapse) +{ + efl_ui_frame_autocollapse_set(obj, autocollapse); +} + +EAPI Eina_Bool +elm_frame_autocollapse_get(const Efl_Ui_Frame *obj) +{ + return efl_ui_frame_autocollapse_get(obj); +} + +EAPI void +elm_frame_collapse_go(Efl_Ui_Frame *obj, Eina_Bool collapse) +{ + efl_ui_frame_collapse_go(obj, collapse); +} diff --git a/src/lib/elementary/efl_ui_frame_eo.legacy.h b/src/lib/elementary/efl_ui_frame_eo.legacy.h new file mode 100644 index 0000000000..b2ba76e21c --- /dev/null +++ b/src/lib/elementary/efl_ui_frame_eo.legacy.h @@ -0,0 +1,78 @@ +#ifndef _EFL_UI_FRAME_EO_LEGACY_H_ +#define _EFL_UI_FRAME_EO_LEGACY_H_ + +#ifndef _EFL_UI_FRAME_EO_CLASS_TYPE +#define _EFL_UI_FRAME_EO_CLASS_TYPE + +typedef Eo Efl_Ui_Frame; + +#endif + +#ifndef _EFL_UI_FRAME_EO_TYPES +#define _EFL_UI_FRAME_EO_TYPES + + +#endif + +/** + * @brief Manually collapse a frame without animations Use this to toggle the + * collapsed state of a frame, bypassing animations. + * + * @param[in] obj The object. + * @param[in] collapse @c true to collapse, @c false to expand. + * + * @ingroup Elm_Frame_Group + */ +EAPI void elm_frame_collapse_set(Efl_Ui_Frame *obj, Eina_Bool collapse); + +/** + * @brief Determine the collapse state of a frame Use this to determine the + * collapse state of a frame. + * + * @param[in] obj The object. + * + * @return @c true to collapse, @c false to expand. + * + * @ingroup Elm_Frame_Group + */ +EAPI Eina_Bool elm_frame_collapse_get(const Efl_Ui_Frame *obj); + +/** + * @brief Toggle autocollapsing of a frame When @c enable is @c true, clicking + * a frame's label will collapse the frame vertically, shrinking it to the + * height of the label. By default, this is DISABLED. + * + * @param[in] obj The object. + * @param[in] autocollapse Whether to enable autocollapse. + * + * @ingroup Elm_Frame_Group + */ +EAPI void elm_frame_autocollapse_set(Efl_Ui_Frame *obj, Eina_Bool autocollapse); + +/** + * @brief Determine autocollapsing of a frame + * + * When this returns @c true, clicking a frame's label will collapse the frame + * vertically, shrinking it to the height of the label. By default, this is + * DISABLED. + * + * @param[in] obj The object. + * + * @return Whether to enable autocollapse. + * + * @ingroup Elm_Frame_Group + */ +EAPI Eina_Bool elm_frame_autocollapse_get(const Efl_Ui_Frame *obj); + +/** + * @brief Manually collapse a frame with animations Use this to toggle the + * collapsed state of a frame, triggering animations. + * + * @param[in] obj The object. + * @param[in] collapse @c true to collapse, @c false to expand. + * + * @ingroup Elm_Frame_Group + */ +EAPI void elm_frame_collapse_go(Efl_Ui_Frame *obj, Eina_Bool collapse); + +#endif diff --git a/src/lib/elementary/efl_ui_frame_legacy.eo b/src/lib/elementary/efl_ui_frame_legacy.eo deleted file mode 100644 index bb8dd99653..0000000000 --- a/src/lib/elementary/efl_ui_frame_legacy.eo +++ /dev/null @@ -1,14 +0,0 @@ -class @beta Efl.Ui.Frame_Legacy extends Efl.Ui.Frame implements Efl.Ui.Legacy -{ - [[Frame widget - - The Frame widget allows for collapsing and expanding the content widget - by clicking on the frame label. - the label and content can be set using text_set and content_set api. - ]] - data: null; - implements { - Efl.Object.constructor; - class.constructor; - } -} diff --git a/src/lib/elementary/efl_ui_frame_legacy.h b/src/lib/elementary/efl_ui_frame_legacy.h index 7e96f12e30..8d225885ae 100644 --- a/src/lib/elementary/efl_ui_frame_legacy.h +++ b/src/lib/elementary/efl_ui_frame_legacy.h @@ -10,4 +10,4 @@ typedef Eo Elm_Frame; */ EAPI Evas_Object *elm_frame_add(Evas_Object *parent); -#include "efl_ui_frame.eo.legacy.h" +#include "efl_ui_frame_eo.legacy.h" diff --git a/src/lib/elementary/efl_ui_frame_legacy_eo.c b/src/lib/elementary/efl_ui_frame_legacy_eo.c new file mode 100644 index 0000000000..22e40576a2 --- /dev/null +++ b/src/lib/elementary/efl_ui_frame_legacy_eo.c @@ -0,0 +1,35 @@ + +Efl_Object *_efl_ui_frame_legacy_efl_object_constructor(Eo *obj, void *pd); + + +static Eina_Bool +_efl_ui_frame_legacy_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef EFL_UI_FRAME_LEGACY_EXTRA_OPS +#define EFL_UI_FRAME_LEGACY_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_frame_legacy_efl_object_constructor), + EFL_UI_FRAME_LEGACY_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _efl_ui_frame_legacy_class_desc = { + EO_VERSION, + "Efl.Ui.Frame_Legacy", + EFL_CLASS_TYPE_REGULAR, + 0, + _efl_ui_frame_legacy_class_initializer, + _efl_ui_frame_legacy_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(efl_ui_frame_legacy_class_get, &_efl_ui_frame_legacy_class_desc, EFL_UI_FRAME_CLASS, EFL_UI_LEGACY_INTERFACE, NULL); diff --git a/src/lib/elementary/efl_ui_frame_legacy_eo.h b/src/lib/elementary/efl_ui_frame_legacy_eo.h new file mode 100644 index 0000000000..ea4b164ba8 --- /dev/null +++ b/src/lib/elementary/efl_ui_frame_legacy_eo.h @@ -0,0 +1,31 @@ +#ifndef _EFL_UI_FRAME_LEGACY_EO_H_ +#define _EFL_UI_FRAME_LEGACY_EO_H_ + +#ifndef _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE +#define _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE + +typedef Eo Efl_Ui_Frame_Legacy; + +#endif + +#ifndef _EFL_UI_FRAME_LEGACY_EO_TYPES +#define _EFL_UI_FRAME_LEGACY_EO_TYPES + + +#endif +#ifdef EFL_BETA_API_SUPPORT +/** + * @brief Frame widget + * + * The Frame widget allows for collapsing and expanding the content widget by + * clicking on the frame label. the label and content can be set using text_set + * and content_set api. + * + * @ingroup Efl_Ui_Frame_Legacy + */ +#define EFL_UI_FRAME_LEGACY_CLASS efl_ui_frame_legacy_class_get() + +EWAPI const Efl_Class *efl_ui_frame_legacy_class_get(void); +#endif /* EFL_BETA_API_SUPPORT */ + +#endif diff --git a/src/lib/elementary/efl_ui_frame_legacy_eo.legacy.h b/src/lib/elementary/efl_ui_frame_legacy_eo.legacy.h new file mode 100644 index 0000000000..4bbd7cccbf --- /dev/null +++ b/src/lib/elementary/efl_ui_frame_legacy_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _EFL_UI_FRAME_LEGACY_EO_LEGACY_H_ +#define _EFL_UI_FRAME_LEGACY_EO_LEGACY_H_ + +#ifndef _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE +#define _EFL_UI_FRAME_LEGACY_EO_CLASS_TYPE + +typedef Eo Efl_Ui_Frame_Legacy; + +#endif + +#ifndef _EFL_UI_FRAME_LEGACY_EO_TYPES +#define _EFL_UI_FRAME_LEGACY_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 107c1c365a..f48cd3fa89 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1,7 +1,6 @@ pub_legacy_eo_files = [ 'efl_ui_radio_legacy.eo', 'efl_ui_video_legacy.eo', - 'efl_ui_frame_legacy.eo', 'efl_ui_panes_legacy.eo', 'efl_ui_image_zoomable_legacy.eo', 'efl_ui_win_legacy.eo', @@ -703,6 +702,9 @@ elementary_pub_headers = [ 'efl_ui_flip_eo.legacy.h', 'efl_ui_flip_legacy_eo.h', 'efl_ui_flip_legacy_eo.legacy.h', + 'efl_ui_frame_eo.legacy.h', + 'efl_ui_frame_legacy_eo.h', + 'efl_ui_frame_legacy_eo.legacy.h', 'elm_hoversel_eo.h', 'elm_hoversel_eo.legacy.h', 'elm_hoversel_item_eo.h', --