From baac840c32591a06391a3147a39772e07e919c52 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_conformant: 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/D8162 --- src/Makefile_Elementary.am | 4 +- src/lib/elementary/elm_conform.c | 4 +- src/lib/elementary/elm_conformant.eo | 19 ------- src/lib/elementary/elm_conformant_eo.c | 51 +++++++++++++++++ src/lib/elementary/elm_conformant_eo.h | 56 +++++++++++++++++++ src/lib/elementary/elm_conformant_eo.legacy.h | 17 ++++++ src/lib/elementary/meson.build | 3 +- 7 files changed, 131 insertions(+), 23 deletions(-) delete mode 100644 src/lib/elementary/elm_conformant.eo create mode 100644 src/lib/elementary/elm_conformant_eo.c create mode 100644 src/lib/elementary/elm_conformant_eo.h create mode 100644 src/lib/elementary/elm_conformant_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index dbe59af06a..e90b278a6b 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -187,7 +187,6 @@ elm_private_eolian_files = \ elm_legacy_eolian_files = \ lib/elementary/efl_ui_clock_legacy.eo \ lib/elementary/elm_interface_fileselector.eo \ - lib/elementary/elm_conformant.eo \ lib/elementary/elm_ctxpopup.eo \ lib/elementary/elm_dayselector.eo \ lib/elementary/elm_entry.eo \ @@ -340,6 +339,7 @@ lib/elementary/elm_color_item_eo.legacy.c \ lib/elementary/elm_color_item_eo.c \ lib/elementary/elm_colorselector_eo.legacy.c \ lib/elementary/elm_colorselector_eo.c \ +lib/elementary/elm_conformant_eo.c \ lib/elementary/elm_hoversel_eo.c \ lib/elementary/elm_hoversel_item_eo.c \ lib/elementary/elm_hoversel_item_eo.legacy.c @@ -409,6 +409,8 @@ lib/elementary/elm_color_item_eo.h \ lib/elementary/elm_color_item_eo.legacy.h \ lib/elementary/elm_colorselector_eo.h \ lib/elementary/elm_colorselector_eo.legacy.h \ +lib/elementary/elm_conformant_eo.h \ +lib/elementary/elm_conformant_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_conform.c b/src/lib/elementary/elm_conform.c index 67d55b6af0..6ea1cc7b91 100644 --- a/src/lib/elementary/elm_conform.c +++ b/src/lib/elementary/elm_conform.c @@ -13,7 +13,7 @@ #include "elm_widget_plug.h" #include "elm_scroller.eo.h" #include "elm_genlist.eo.h" -#include "elm_conformant.eo.h" +#include "elm_conformant_eo.h" #define MY_CLASS ELM_CONFORMANT_CLASS #define MY_CLASS_PFX elm_conformant @@ -1034,4 +1034,4 @@ ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX) ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_conformant) -#include "elm_conformant.eo.c" +#include "elm_conformant_eo.c" diff --git a/src/lib/elementary/elm_conformant.eo b/src/lib/elementary/elm_conformant.eo deleted file mode 100644 index 92560a91a4..0000000000 --- a/src/lib/elementary/elm_conformant.eo +++ /dev/null @@ -1,19 +0,0 @@ -class Elm.Conformant extends Efl.Ui.Layout_Base implements Efl.Ui.Legacy -{ - [[Elementary conformant class]] - legacy_prefix: elm_conformant; - eo_prefix: elm_obj_conformant; - event_prefix: elm_conformant; - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.widget_parent { set; } - Efl.Ui.Widget.theme_apply; - } - events { - virtualkeypad,state,on: void; [[Called when virtualkeypad was enabled]] - virtualkeypad,state,off: void; [[Called when virtualkeypad was disabled]] - clipboard,state,on: void; [[Called when clipboard was enabled]] - clipboard,state,off: void; [[Called when clipboard was disabled]] - } -} diff --git a/src/lib/elementary/elm_conformant_eo.c b/src/lib/elementary/elm_conformant_eo.c new file mode 100644 index 0000000000..188cc208ac --- /dev/null +++ b/src/lib/elementary/elm_conformant_eo.c @@ -0,0 +1,51 @@ +EWAPI const Efl_Event_Description _ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_ON = + EFL_EVENT_DESCRIPTION("virtualkeypad,state,on"); +EWAPI const Efl_Event_Description _ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_OFF = + EFL_EVENT_DESCRIPTION("virtualkeypad,state,off"); +EWAPI const Efl_Event_Description _ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_ON = + EFL_EVENT_DESCRIPTION("clipboard,state,on"); +EWAPI const Efl_Event_Description _ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_OFF = + EFL_EVENT_DESCRIPTION("clipboard,state,off"); + +Efl_Object *_elm_conformant_efl_object_constructor(Eo *obj, Elm_Conformant_Data *pd); + + +void _elm_conformant_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Conformant_Data *pd, Efl_Ui_Widget *parent); + + +Eina_Error _elm_conformant_efl_ui_widget_theme_apply(Eo *obj, Elm_Conformant_Data *pd); + + +static Eina_Bool +_elm_conformant_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_CONFORMANT_EXTRA_OPS +#define ELM_CONFORMANT_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_conformant_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_conformant_efl_ui_widget_widget_parent_set), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_conformant_efl_ui_widget_theme_apply), + ELM_CONFORMANT_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_conformant_class_desc = { + EO_VERSION, + "Elm.Conformant", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Conformant_Data), + _elm_conformant_class_initializer, + _elm_conformant_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_conformant_class_get, &_elm_conformant_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_LEGACY_INTERFACE, NULL); diff --git a/src/lib/elementary/elm_conformant_eo.h b/src/lib/elementary/elm_conformant_eo.h new file mode 100644 index 0000000000..e3f449f4e4 --- /dev/null +++ b/src/lib/elementary/elm_conformant_eo.h @@ -0,0 +1,56 @@ +#ifndef _ELM_CONFORMANT_EO_H_ +#define _ELM_CONFORMANT_EO_H_ + +#ifndef _ELM_CONFORMANT_EO_CLASS_TYPE +#define _ELM_CONFORMANT_EO_CLASS_TYPE + +typedef Eo Elm_Conformant; + +#endif + +#ifndef _ELM_CONFORMANT_EO_TYPES +#define _ELM_CONFORMANT_EO_TYPES + + +#endif +/** Elementary conformant class + * + * @ingroup Elm_Conformant + */ +#define ELM_CONFORMANT_CLASS elm_conformant_class_get() + +EWAPI const Efl_Class *elm_conformant_class_get(void); + +EWAPI extern const Efl_Event_Description _ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_ON; + +/** Called when virtualkeypad was enabled + * + * @ingroup Elm_Conformant + */ +#define ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_ON (&(_ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_ON)) + +EWAPI extern const Efl_Event_Description _ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_OFF; + +/** Called when virtualkeypad was disabled + * + * @ingroup Elm_Conformant + */ +#define ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_OFF (&(_ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_OFF)) + +EWAPI extern const Efl_Event_Description _ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_ON; + +/** Called when clipboard was enabled + * + * @ingroup Elm_Conformant + */ +#define ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_ON (&(_ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_ON)) + +EWAPI extern const Efl_Event_Description _ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_OFF; + +/** Called when clipboard was disabled + * + * @ingroup Elm_Conformant + */ +#define ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_OFF (&(_ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_OFF)) + +#endif diff --git a/src/lib/elementary/elm_conformant_eo.legacy.h b/src/lib/elementary/elm_conformant_eo.legacy.h new file mode 100644 index 0000000000..3549b17308 --- /dev/null +++ b/src/lib/elementary/elm_conformant_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _ELM_CONFORMANT_EO_LEGACY_H_ +#define _ELM_CONFORMANT_EO_LEGACY_H_ + +#ifndef _ELM_CONFORMANT_EO_CLASS_TYPE +#define _ELM_CONFORMANT_EO_CLASS_TYPE + +typedef Eo Elm_Conformant; + +#endif + +#ifndef _ELM_CONFORMANT_EO_TYPES +#define _ELM_CONFORMANT_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 8d34e0b7cf..3003901e4a 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1,7 +1,6 @@ pub_legacy_eo_files = [ 'efl_ui_clock_legacy.eo', 'elm_interface_fileselector.eo', - 'elm_conformant.eo', 'elm_ctxpopup.eo', 'elm_dayselector.eo', 'elm_entry.eo', @@ -733,6 +732,8 @@ elementary_pub_headers = [ 'elm_color_item_eo.legacy.h', 'elm_colorselector_eo.h', 'elm_colorselector_eo.legacy.h', + 'elm_conformant_eo.h', + 'elm_conformant_eo.legacy.h', 'elm_hoversel_eo.h', 'elm_hoversel_eo.legacy.h', 'elm_hoversel_item_eo.h',