From 56c234e7ad964f99d6f1b948c03eebb4350b6b4f Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_inwin: 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 Differential Revision: https://phab.enlightenment.org/D8179 --- src/Makefile_Elementary.am | 5 +- src/lib/elementary/elm_inwin.c | 4 +- src/lib/elementary/elm_inwin.eo | 28 ------------ src/lib/elementary/elm_inwin_eo.c | 58 ++++++++++++++++++++++++ src/lib/elementary/elm_inwin_eo.h | 40 ++++++++++++++++ src/lib/elementary/elm_inwin_eo.legacy.c | 6 +++ src/lib/elementary/elm_inwin_eo.legacy.h | 33 ++++++++++++++ src/lib/elementary/elm_inwin_legacy.h | 2 +- src/lib/elementary/meson.build | 3 +- 9 files changed, 146 insertions(+), 33 deletions(-) delete mode 100644 src/lib/elementary/elm_inwin.eo create mode 100644 src/lib/elementary/elm_inwin_eo.c create mode 100644 src/lib/elementary/elm_inwin_eo.h create mode 100644 src/lib/elementary/elm_inwin_eo.legacy.c create mode 100644 src/lib/elementary/elm_inwin_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index f16b37c9dc..6718c88bd0 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -223,7 +223,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_inwin.eo \ lib/elementary/elm_mapbuf.eo \ lib/elementary/elm_naviframe.eo \ lib/elementary/elm_naviframe_item.eo \ @@ -362,6 +361,8 @@ lib/elementary/elm_index_eo.legacy.c \ lib/elementary/elm_index_item_eo.c \ lib/elementary/elm_index_item_eo.legacy.c \ lib/elementary/elm_interface_fileselector_eo.c \ +lib/elementary/elm_inwin_eo.c \ +lib/elementary/elm_inwin_eo.legacy.c \ $(NULL) elm_legacy_eo_headers = \ @@ -489,6 +490,8 @@ lib/elementary/elm_index_item_eo.h \ lib/elementary/elm_index_item_eo.legacy.h \ lib/elementary/elm_interface_fileselector_eo.h \ lib/elementary/elm_interface_fileselector_eo.legacy.h \ +lib/elementary/elm_inwin_eo.h \ +lib/elementary/elm_inwin_eo.legacy.h \ $(NULL) diff --git a/src/lib/elementary/elm_inwin.c b/src/lib/elementary/elm_inwin.c index 110a614575..bb6db93217 100644 --- a/src/lib/elementary/elm_inwin.c +++ b/src/lib/elementary/elm_inwin.c @@ -10,7 +10,7 @@ #include #include "elm_priv.h" -#include "elm_inwin.eo.h" +#include "elm_inwin_eo.h" #include "elm_widget_inwin.h" #include "elm_widget_layout.h" #include "elm_part_helper.h" @@ -141,4 +141,4 @@ ELM_PART_CONTENT_DEFAULT_IMPLEMENT(elm_inwin, Elm_Inwin_Data) EFL_CANVAS_GROUP_ADD_OPS(elm_inwin), \ ELM_LAYOUT_SIZING_EVAL_OPS(elm_inwin) -#include "elm_inwin.eo.c" +#include "elm_inwin_eo.c" diff --git a/src/lib/elementary/elm_inwin.eo b/src/lib/elementary/elm_inwin.eo deleted file mode 100644 index ec8208a762..0000000000 --- a/src/lib/elementary/elm_inwin.eo +++ /dev/null @@ -1,28 +0,0 @@ -class Elm.Inwin extends Efl.Ui.Layout_Base implements Efl.Ui.Focus.Layer, Efl.Content, Efl.Ui.Legacy -{ - [[Elementary inwin class]] - legacy_prefix: elm_inwin; - eo_prefix: elm_obj_win_inwin; - methods { - activate { - [[Activates an inwin object, ensuring its visibility - - This function will make sure that the inwin $obj is completely visible - by calling evas_object_show() and evas_object_raise() on it, to bring it - to the front. It also sets the keyboard focus to it, which will be passed - onto its content. - - The object's theme will also receive the signal "elm,action,show" with - source "elm".]] - - legacy: elm_win_inwin_activate; - } - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.widget_parent { set; } - Efl.Content.content { get; set; } - Efl.Content.content_unset; - } -} diff --git a/src/lib/elementary/elm_inwin_eo.c b/src/lib/elementary/elm_inwin_eo.c new file mode 100644 index 0000000000..0cd70e6640 --- /dev/null +++ b/src/lib/elementary/elm_inwin_eo.c @@ -0,0 +1,58 @@ + +void _elm_inwin_activate(Eo *obj, Elm_Inwin_Data *pd); + +EOAPI EFL_VOID_FUNC_BODY(elm_obj_win_inwin_activate); + +Efl_Object *_elm_inwin_efl_object_constructor(Eo *obj, Elm_Inwin_Data *pd); + + +void _elm_inwin_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Inwin_Data *pd, Efl_Ui_Widget *parent); + + +Eina_Bool _elm_inwin_efl_content_content_set(Eo *obj, Elm_Inwin_Data *pd, Efl_Gfx_Entity *content); + + +Efl_Gfx_Entity *_elm_inwin_efl_content_content_get(const Eo *obj, Elm_Inwin_Data *pd); + + +Efl_Gfx_Entity *_elm_inwin_efl_content_content_unset(Eo *obj, Elm_Inwin_Data *pd); + + +static Eina_Bool +_elm_inwin_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_INWIN_EXTRA_OPS +#define ELM_INWIN_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_win_inwin_activate, _elm_inwin_activate), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_inwin_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_inwin_efl_ui_widget_widget_parent_set), + EFL_OBJECT_OP_FUNC(efl_content_set, _elm_inwin_efl_content_content_set), + EFL_OBJECT_OP_FUNC(efl_content_get, _elm_inwin_efl_content_content_get), + EFL_OBJECT_OP_FUNC(efl_content_unset, _elm_inwin_efl_content_content_unset), + ELM_INWIN_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_inwin_class_desc = { + EO_VERSION, + "Elm.Inwin", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Inwin_Data), + _elm_inwin_class_initializer, + _elm_inwin_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_inwin_class_get, &_elm_inwin_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_FOCUS_LAYER_MIXIN, EFL_CONTENT_INTERFACE, EFL_UI_LEGACY_INTERFACE, NULL); + +#include "elm_inwin_eo.legacy.c" diff --git a/src/lib/elementary/elm_inwin_eo.h b/src/lib/elementary/elm_inwin_eo.h new file mode 100644 index 0000000000..cb6ad90fd7 --- /dev/null +++ b/src/lib/elementary/elm_inwin_eo.h @@ -0,0 +1,40 @@ +#ifndef _ELM_INWIN_EO_H_ +#define _ELM_INWIN_EO_H_ + +#ifndef _ELM_INWIN_EO_CLASS_TYPE +#define _ELM_INWIN_EO_CLASS_TYPE + +typedef Eo Elm_Inwin; + +#endif + +#ifndef _ELM_INWIN_EO_TYPES +#define _ELM_INWIN_EO_TYPES + + +#endif +/** Elementary inwin class + * + * @ingroup Elm_Inwin + */ +#define ELM_INWIN_CLASS elm_inwin_class_get() + +EWAPI const Efl_Class *elm_inwin_class_get(void); + +/** + * @brief Activates an inwin object, ensuring its visibility + * + * This function will make sure that the inwin @c obj is completely visible by + * calling evas_object_show() and evas_object_raise() on it, to bring it to the + * front. It also sets the keyboard focus to it, which will be passed onto its + * content. + * + * The object's theme will also receive the signal "elm,action,show" with + * source "elm". + * @param[in] obj The object. + * + * @ingroup Elm_Inwin + */ +EOAPI void elm_obj_win_inwin_activate(Eo *obj); + +#endif diff --git a/src/lib/elementary/elm_inwin_eo.legacy.c b/src/lib/elementary/elm_inwin_eo.legacy.c new file mode 100644 index 0000000000..1f6b21296c --- /dev/null +++ b/src/lib/elementary/elm_inwin_eo.legacy.c @@ -0,0 +1,6 @@ + +EAPI void +elm_win_inwin_activate(Elm_Inwin *obj) +{ + elm_obj_win_inwin_activate(obj); +} diff --git a/src/lib/elementary/elm_inwin_eo.legacy.h b/src/lib/elementary/elm_inwin_eo.legacy.h new file mode 100644 index 0000000000..b0e4170d76 --- /dev/null +++ b/src/lib/elementary/elm_inwin_eo.legacy.h @@ -0,0 +1,33 @@ +#ifndef _ELM_INWIN_EO_LEGACY_H_ +#define _ELM_INWIN_EO_LEGACY_H_ + +#ifndef _ELM_INWIN_EO_CLASS_TYPE +#define _ELM_INWIN_EO_CLASS_TYPE + +typedef Eo Elm_Inwin; + +#endif + +#ifndef _ELM_INWIN_EO_TYPES +#define _ELM_INWIN_EO_TYPES + + +#endif + +/** + * @brief Activates an inwin object, ensuring its visibility + * + * This function will make sure that the inwin @c obj is completely visible by + * calling evas_object_show() and evas_object_raise() on it, to bring it to the + * front. It also sets the keyboard focus to it, which will be passed onto its + * content. + * + * The object's theme will also receive the signal "elm,action,show" with + * source "elm". + * @param[in] obj The object. + * + * @ingroup Elm_Inwin_Group + */ +EAPI void elm_win_inwin_activate(Elm_Inwin *obj); + +#endif diff --git a/src/lib/elementary/elm_inwin_legacy.h b/src/lib/elementary/elm_inwin_legacy.h index a085db0006..0f672e9886 100644 --- a/src/lib/elementary/elm_inwin_legacy.h +++ b/src/lib/elementary/elm_inwin_legacy.h @@ -63,4 +63,4 @@ EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj); */ EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj); -#include "elm_inwin.eo.legacy.h" +#include "elm_inwin_eo.legacy.h" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 3cf8fe8787..8b2cde0f29 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -37,7 +37,6 @@ pub_legacy_eo_files = [ 'elm_actionslider_part.eo', 'elm_bubble_part.eo', 'elm_fileselector_part.eo', - 'elm_inwin.eo', 'elm_mapbuf.eo', 'elm_naviframe.eo', 'elm_naviframe_item.eo', @@ -764,6 +763,8 @@ elementary_pub_headers = [ 'elm_index_item_eo.legacy.h', 'elm_interface_fileselector_eo.h', 'elm_interface_fileselector_eo.legacy.h', + 'elm_inwin_eo.h', + 'elm_inwin_eo.legacy.h', ] elementary_header_src = [