From 2a7a3c87f326d17e2e4e2133a389effa48895009 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_access: 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/D8152 --- src/Makefile_Elementary.am | 6 ++- src/lib/elementary/elm_access.c | 2 +- src/lib/elementary/elm_access.eo | 15 ------- src/lib/elementary/elm_access_eo.c | 51 +++++++++++++++++++++++ src/lib/elementary/elm_access_eo.h | 24 +++++++++++ src/lib/elementary/elm_access_eo.legacy.h | 17 ++++++++ src/lib/elementary/elm_priv.h | 2 +- src/lib/elementary/meson.build | 3 +- 8 files changed, 100 insertions(+), 20 deletions(-) delete mode 100644 src/lib/elementary/elm_access.eo create mode 100644 src/lib/elementary/elm_access_eo.c create mode 100644 src/lib/elementary/elm_access_eo.h create mode 100644 src/lib/elementary/elm_access_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 24d77a1596..e20e4ffaad 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_access.eo \ lib/elementary/elm_actionslider.eo \ lib/elementary/elm_box.eo \ lib/elementary/elm_bubble.eo \ @@ -331,8 +330,9 @@ lib/elementary/efl_ui_widget_eo.legacy.c \ lib/elementary/efl_ui_win_inlined_legacy_eo.c \ lib/elementary/efl_ui_win_legacy_eo.c \ lib/elementary/efl_ui_win_socket_legacy_eo.c \ +lib/elementary/elm_access_eo.c \ +lib/elementary/elm_access_eo.legacy.c \ lib/elementary/elm_hoversel_eo.c \ -lib/elementary/elm_hoversel_eo.legacy.c \ lib/elementary/elm_hoversel_item_eo.c \ lib/elementary/elm_hoversel_item_eo.legacy.c @@ -380,6 +380,8 @@ lib/elementary/efl_ui_win_legacy_eo.h \ lib/elementary/efl_ui_win_legacy_eo.legacy.h \ lib/elementary/efl_ui_win_socket_legacy_eo.h \ lib/elementary/efl_ui_win_socket_legacy_eo.legacy.h \ +lib/elementary/elm_access_eo.h \ +lib/elementary/elm_access_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_access.c b/src/lib/elementary/elm_access.c index 035292f089..33809795fc 100644 --- a/src/lib/elementary/elm_access.c +++ b/src/lib/elementary/elm_access.c @@ -1543,4 +1543,4 @@ _elm_access_efl_access_object_state_set_get(const Eo *obj, void *pd EINA_UNUSED) #define ELM_ACCESS_EXTRA_OPS \ EFL_CANVAS_GROUP_ADD_OPS(elm_access) -#include "elm_access.eo.c" +#include "elm_access_eo.c" diff --git a/src/lib/elementary/elm_access.eo b/src/lib/elementary/elm_access.eo deleted file mode 100644 index 3f81dcffd4..0000000000 --- a/src/lib/elementary/elm_access.eo +++ /dev/null @@ -1,15 +0,0 @@ -class Elm.Access extends Efl.Ui.Widget implements Efl.Access.Widget.Action -{ - [[Elm abstract accessibility class]] - legacy_prefix: elm_access; - eo_prefix: elm_obj_access; - data: null; - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.on_access_activate; - Efl.Ui.Focus.Object.on_focus_update; - Efl.Access.Widget.Action.elm_actions { get; } - Efl.Access.Object.state_set { get; } - } -} diff --git a/src/lib/elementary/elm_access_eo.c b/src/lib/elementary/elm_access_eo.c new file mode 100644 index 0000000000..e2a48bd508 --- /dev/null +++ b/src/lib/elementary/elm_access_eo.c @@ -0,0 +1,51 @@ + +Efl_Object *_elm_access_efl_object_constructor(Eo *obj, void *pd); + + +Eina_Bool _elm_access_efl_ui_widget_on_access_activate(Eo *obj, void *pd, Efl_Ui_Activate act); + + +Eina_Bool _elm_access_efl_ui_focus_object_on_focus_update(Eo *obj, void *pd); + + +const Efl_Access_Action_Data *_elm_access_efl_access_widget_action_elm_actions_get(const Eo *obj, void *pd); + + +Efl_Access_State_Set _elm_access_efl_access_object_state_set_get(const Eo *obj, void *pd); + + +static Eina_Bool +_elm_access_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_ACCESS_EXTRA_OPS +#define ELM_ACCESS_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_access_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_activate, _elm_access_efl_ui_widget_on_access_activate), + EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_access_efl_ui_focus_object_on_focus_update), + EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_access_efl_access_widget_action_elm_actions_get), + EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_access_efl_access_object_state_set_get), + ELM_ACCESS_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_access_class_desc = { + EO_VERSION, + "Elm.Access", + EFL_CLASS_TYPE_REGULAR, + 0, + _elm_access_class_initializer, + _elm_access_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_access_class_get, &_elm_access_class_desc, EFL_UI_WIDGET_CLASS, EFL_ACCESS_WIDGET_ACTION_MIXIN, NULL); diff --git a/src/lib/elementary/elm_access_eo.h b/src/lib/elementary/elm_access_eo.h new file mode 100644 index 0000000000..75921b80f5 --- /dev/null +++ b/src/lib/elementary/elm_access_eo.h @@ -0,0 +1,24 @@ +#ifndef _ELM_ACCESS_EO_H_ +#define _ELM_ACCESS_EO_H_ + +#ifndef _ELM_ACCESS_EO_CLASS_TYPE +#define _ELM_ACCESS_EO_CLASS_TYPE + +typedef Eo Elm_Access; + +#endif + +#ifndef _ELM_ACCESS_EO_TYPES +#define _ELM_ACCESS_EO_TYPES + + +#endif +/** Elm abstract accessibility class + * + * @ingroup Elm_Access + */ +#define ELM_ACCESS_CLASS elm_access_class_get() + +EWAPI const Efl_Class *elm_access_class_get(void); + +#endif diff --git a/src/lib/elementary/elm_access_eo.legacy.h b/src/lib/elementary/elm_access_eo.legacy.h new file mode 100644 index 0000000000..631905e794 --- /dev/null +++ b/src/lib/elementary/elm_access_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _ELM_ACCESS_EO_LEGACY_H_ +#define _ELM_ACCESS_EO_LEGACY_H_ + +#ifndef _ELM_ACCESS_EO_CLASS_TYPE +#define _ELM_ACCESS_EO_CLASS_TYPE + +typedef Eo Elm_Access; + +#endif + +#ifndef _ELM_ACCESS_EO_TYPES +#define _ELM_ACCESS_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index a6b2090a7c..0368de188a 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -61,7 +61,7 @@ # define EWAPI EAPI EAPI_WEAK # include "elm_widget.h" -# include "elm_access.eo.h" +# include "elm_access_eo.h" # include "elm_code_private.h" # include "efl_ui_focus_parent_provider.eo.h" # include "efl_ui_widget_focus_manager.eo.h" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 1758e54be9..8e003ae24b 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_access.eo', 'elm_actionslider.eo', 'elm_box.eo', 'elm_bubble.eo', @@ -722,6 +721,8 @@ elementary_pub_headers = [ 'efl_ui_win_legacy_eo.legacy.h', 'efl_ui_win_socket_legacy_eo.h', 'efl_ui_win_socket_legacy_eo.legacy.h', + 'elm_access_eo.h', + 'elm_access_eo.legacy.h', 'elm_hoversel_eo.h', 'elm_hoversel_eo.legacy.h', 'elm_hoversel_item_eo.h',