From 44d0cb926098e34185d4a2cbc1ab1a705e50d25e Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Thu, 21 Mar 2019 21:29:00 +0900 Subject: [PATCH] elm_atspi_bridge: 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 --- src/Makefile_Elementary.am | 7 +- src/lib/elementary/elm_atspi_bridge.c | 2 +- src/lib/elementary/elm_atspi_bridge.eo | 24 ------- src/lib/elementary/elm_atspi_bridge.h | 5 +- src/lib/elementary/elm_atspi_bridge_eo.c | 66 +++++++++++++++++++ src/lib/elementary/elm_atspi_bridge_eo.h | 51 ++++++++++++++ .../elementary/elm_atspi_bridge_eo.legacy.c | 6 ++ .../elementary/elm_atspi_bridge_eo.legacy.h | 28 ++++++++ src/lib/elementary/elm_priv.h | 1 + src/lib/elementary/meson.build | 4 +- 10 files changed, 163 insertions(+), 31 deletions(-) delete mode 100644 src/lib/elementary/elm_atspi_bridge.eo create mode 100644 src/lib/elementary/elm_atspi_bridge_eo.c create mode 100644 src/lib/elementary/elm_atspi_bridge_eo.h create mode 100644 src/lib/elementary/elm_atspi_bridge_eo.legacy.c create mode 100644 src/lib/elementary/elm_atspi_bridge_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index b1fad382cc..4b132104f0 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -143,7 +143,6 @@ elm_public_eolian_files += \ lib/elementary/efl_ui_progressbar_legacy_part.eo \ lib/elementary/elm_multibuttonentry_part.eo \ lib/elementary/elm_interface_scrollable.eo \ - lib/elementary/elm_atspi_bridge.eo \ lib/elementary/efl_ui_image_zoomable_pan.eo \ $(NULL) @@ -256,6 +255,8 @@ lib/elementary/elm_access_eo.legacy.c \ lib/elementary/elm_actionslider_eo.c \ lib/elementary/elm_actionslider_eo.legacy.c \ lib/elementary/elm_atspi_app_object_eo.c \ +lib/elementary/elm_atspi_bridge_eo.c \ +lib/elementary/elm_atspi_bridge_eo.legacy.c \ lib/elementary/elm_box_eo.c \ lib/elementary/elm_box_eo.legacy.c \ lib/elementary/elm_bubble_eo.c \ @@ -435,6 +436,7 @@ lib/elementary/efl_ui_win_socket_legacy_eo.legacy.h \ lib/elementary/elm_access_eo.legacy.h \ lib/elementary/elm_actionslider_eo.legacy.h \ lib/elementary/elm_atspi_app_object_eo.legacy.h \ +lib/elementary/elm_atspi_bridge_eo.legacy.h \ lib/elementary/elm_box_eo.legacy.h \ lib/elementary/elm_bubble_eo.legacy.h \ lib/elementary/elm_calendar_eo.legacy.h \ @@ -543,6 +545,7 @@ lib/elementary/efl_ui_win_socket_legacy_eo.h \ lib/elementary/elm_access_eo.h \ lib/elementary/elm_actionslider_eo.h \ lib/elementary/elm_atspi_app_object_eo.h \ +lib/elementary/elm_atspi_bridge_eo.h \ lib/elementary/elm_box_eo.h \ lib/elementary/elm_bubble_eo.h \ lib/elementary/elm_calendar_eo.h \ @@ -645,7 +648,6 @@ includesdir = $(includedir)/elementary-@VMAJ@ includesunstable_HEADERS = \ lib/elementary/elm_gen_common.h \ - lib/elementary/elm_atspi_bridge.h \ lib/elementary/efl_access_object.h \ lib/elementary/efl_access_text.h \ lib/elementary/efl_access_widget_action.h \ @@ -802,6 +804,7 @@ includesub_HEADERS = \ lib/elementary/elm_actionslider_legacy.h \ lib/elementary/elm_app.h \ lib/elementary/elm_atspi_app_object.h \ + lib/elementary/elm_atspi_bridge.h \ lib/elementary/elm_authors.h \ lib/elementary/elm_bg.h \ lib/elementary/elm_bg_legacy.h \ diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index e1dc3ef241..c689557d6c 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -4801,4 +4801,4 @@ _elm_atspi_bridge_efl_object_destructor(Eo *obj, Elm_Atspi_Bridge_Data *pd) efl_destructor(efl_super(obj, ELM_ATSPI_BRIDGE_CLASS)); } -#include "elm_atspi_bridge.eo.c" +#include "elm_atspi_bridge_eo.c" diff --git a/src/lib/elementary/elm_atspi_bridge.eo b/src/lib/elementary/elm_atspi_bridge.eo deleted file mode 100644 index 8ed0f1a25b..0000000000 --- a/src/lib/elementary/elm_atspi_bridge.eo +++ /dev/null @@ -1,24 +0,0 @@ -class Elm.Atspi.Bridge extends Efl.Object -{ - [[AT-SPI bridge class]] - eo_prefix: elm_obj_atspi_bridge; - event_prefix: elm_atspi_bridge; - methods { - @property connected { - get { - [[Indicate if connection with AT-SPI2 bus has been established.]] - values { - ret: bool; [[$true if connection has been established, $false otherwise]] - } - } - } - } - implements { - Efl.Object.constructor; - Efl.Object.destructor; - } - events { - connected: void; [[Connected with AT-SPI2 bus]] - disconnected: void; [[Disconnected from AT-SPI2 bus]] - } -} diff --git a/src/lib/elementary/elm_atspi_bridge.h b/src/lib/elementary/elm_atspi_bridge.h index 5e5673b2b0..c889027b58 100644 --- a/src/lib/elementary/elm_atspi_bridge.h +++ b/src/lib/elementary/elm_atspi_bridge.h @@ -1,3 +1,4 @@ -#ifdef EFL_BETA_API_SUPPORT -#include "elm_atspi_bridge.eo.h" +#ifndef EFL_NOLEGACY_API_SUPPORT +#include "elm_atspi_bridge_eo.legacy.h" #endif + diff --git a/src/lib/elementary/elm_atspi_bridge_eo.c b/src/lib/elementary/elm_atspi_bridge_eo.c new file mode 100644 index 0000000000..a844f08278 --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.c @@ -0,0 +1,66 @@ +EWAPI const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_CONNECTED = + EFL_EVENT_DESCRIPTION("connected"); +EWAPI const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED = + EFL_EVENT_DESCRIPTION("disconnected"); + +Eina_Bool _elm_atspi_bridge_connected_get(const Eo *obj, Elm_Atspi_Bridge_Data *pd); + + +static Eina_Value +__eolian_elm_atspi_bridge_connected_get_reflect(Eo *obj) +{ + Eina_Bool val = elm_obj_atspi_bridge_connected_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_atspi_bridge_connected_get, Eina_Bool, 0); + +Efl_Object *_elm_atspi_bridge_efl_object_constructor(Eo *obj, Elm_Atspi_Bridge_Data *pd); + + +void _elm_atspi_bridge_efl_object_destructor(Eo *obj, Elm_Atspi_Bridge_Data *pd); + + +static Eina_Bool +_elm_atspi_bridge_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_ATSPI_BRIDGE_EXTRA_OPS +#define ELM_ATSPI_BRIDGE_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_atspi_bridge_connected_get, _elm_atspi_bridge_connected_get), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_atspi_bridge_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_destructor, _elm_atspi_bridge_efl_object_destructor), + ELM_ATSPI_BRIDGE_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"connected", NULL, __eolian_elm_atspi_bridge_connected_get_reflect}, + }; + static const Efl_Object_Property_Reflection_Ops rops = { + refl_table, EINA_C_ARRAY_LENGTH(refl_table) + }; + ropsp = &rops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_atspi_bridge_class_desc = { + EO_VERSION, + "Elm.Atspi.Bridge", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Atspi_Bridge_Data), + _elm_atspi_bridge_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(elm_atspi_bridge_class_get, &_elm_atspi_bridge_class_desc, EFL_OBJECT_CLASS, NULL); + +#include "elm_atspi_bridge_eo.legacy.c" diff --git a/src/lib/elementary/elm_atspi_bridge_eo.h b/src/lib/elementary/elm_atspi_bridge_eo.h new file mode 100644 index 0000000000..180544d25c --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.h @@ -0,0 +1,51 @@ +#ifndef _ELM_ATSPI_BRIDGE_EO_H_ +#define _ELM_ATSPI_BRIDGE_EO_H_ + +#ifndef _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE +#define _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE + +typedef Eo Elm_Atspi_Bridge; + +#endif + +#ifndef _ELM_ATSPI_BRIDGE_EO_TYPES +#define _ELM_ATSPI_BRIDGE_EO_TYPES + + +#endif +/** AT-SPI bridge class + * + * @ingroup Elm_Atspi_Bridge + */ +#define ELM_ATSPI_BRIDGE_CLASS elm_atspi_bridge_class_get() + +EWAPI const Efl_Class *elm_atspi_bridge_class_get(void); + +/** + * @brief Indicate if connection with AT-SPI2 bus has been established. + * + * @param[in] obj The object. + * + * @return @c true if connection has been established, @c false otherwise + * + * @ingroup Elm_Atspi_Bridge + */ +EOAPI Eina_Bool elm_obj_atspi_bridge_connected_get(const Eo *obj); + +EWAPI extern const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_CONNECTED; + +/** Connected with AT-SPI2 bus + * + * @ingroup Elm_Atspi_Bridge + */ +#define ELM_ATSPI_BRIDGE_EVENT_CONNECTED (&(_ELM_ATSPI_BRIDGE_EVENT_CONNECTED)) + +EWAPI extern const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED; + +/** Disconnected from AT-SPI2 bus + * + * @ingroup Elm_Atspi_Bridge + */ +#define ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED (&(_ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED)) + +#endif diff --git a/src/lib/elementary/elm_atspi_bridge_eo.legacy.c b/src/lib/elementary/elm_atspi_bridge_eo.legacy.c new file mode 100644 index 0000000000..8f6ffebcc8 --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.legacy.c @@ -0,0 +1,6 @@ + +EAPI Eina_Bool +elm_atspi_bridge_connected_get(const Elm_Atspi_Bridge *obj) +{ + return elm_obj_atspi_bridge_connected_get(obj); +} diff --git a/src/lib/elementary/elm_atspi_bridge_eo.legacy.h b/src/lib/elementary/elm_atspi_bridge_eo.legacy.h new file mode 100644 index 0000000000..ed90721eb6 --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.legacy.h @@ -0,0 +1,28 @@ +#ifndef _ELM_ATSPI_BRIDGE_EO_LEGACY_H_ +#define _ELM_ATSPI_BRIDGE_EO_LEGACY_H_ + +#ifndef _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE +#define _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE + +typedef Eo Elm_Atspi_Bridge; + +#endif + +#ifndef _ELM_ATSPI_BRIDGE_EO_TYPES +#define _ELM_ATSPI_BRIDGE_EO_TYPES + + +#endif + +/** + * @brief Indicate if connection with AT-SPI2 bus has been established. + * + * @param[in] obj The object. + * + * @return @c true if connection has been established, @c false otherwise + * + * @ingroup Elm_Atspi_Bridge_Group + */ +EAPI Eina_Bool elm_atspi_bridge_connected_get(const Elm_Atspi_Bridge *obj); + +#endif diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index b92c176de8..f6974a9ba0 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -68,6 +68,7 @@ #include "elm_access_eo.h" #include "elm_actionslider_eo.h" #include "elm_atspi_app_object_eo.h" +#include "elm_atspi_bridge_eo.h" #include "elm_box_eo.h" #include "elm_bubble_eo.h" #include "elm_calendar_eo.h" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 44b3e17b04..c67bbf32f8 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -171,7 +171,6 @@ pub_eo_files = [ 'efl_ui_progressbar_legacy_part.eo', 'elm_multibuttonentry_part.eo', 'elm_interface_scrollable.eo', - 'elm_atspi_bridge.eo', 'efl_ui_image_zoomable_pan.eo', 'efl_ui_text_part.eo', 'efl_ui_caching_factory.eo', @@ -260,7 +259,6 @@ eolian_include_directories += ['-I', meson.current_source_dir()] elementary_headers_unstable = [ 'elm_gen_common.h', - 'elm_atspi_bridge.h', 'efl_access_object.h', 'efl_access_text.h', 'efl_access_widget_action.h', @@ -413,6 +411,8 @@ elementary_pub_headers = [ 'elm_app.h', 'elm_atspi_app_object.h', 'elm_atspi_app_object_eo.legacy.h', + 'elm_atspi_bridge.h', + 'elm_atspi_bridge_eo.legacy.h', 'elm_authors.h', 'elm_bg.h', 'elm_bg_legacy.h',