From 4f8a7233ccc195d0b42fcfd1a574299eb030b635 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] elm_icon: 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/D8176 --- src/Makefile_Elementary.am | 10 ++++-- src/lib/elementary/elm_dbus_menu.c | 2 +- src/lib/elementary/elm_icon.c | 4 +-- src/lib/elementary/elm_icon.eo | 19 ---------- src/lib/elementary/elm_icon_eo.c | 47 +++++++++++++++++++++++++ src/lib/elementary/elm_icon_eo.h | 40 +++++++++++++++++++++ src/lib/elementary/elm_icon_eo.legacy.h | 17 +++++++++ src/lib/elementary/elm_icon_legacy.h | 2 +- src/lib/elementary/elm_photo.c | 2 +- src/lib/elementary/elm_theme.c | 2 +- src/lib/elementary/meson.build | 3 +- 11 files changed, 119 insertions(+), 29 deletions(-) delete mode 100644 src/lib/elementary/elm_icon.eo create mode 100644 src/lib/elementary/elm_icon_eo.c create mode 100644 src/lib/elementary/elm_icon_eo.h create mode 100644 src/lib/elementary/elm_icon_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 473cde1725..76715ad82a 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -226,7 +226,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_icon.eo \ lib/elementary/elm_inwin.eo \ lib/elementary/elm_mapbuf.eo \ lib/elementary/elm_naviframe.eo \ @@ -359,7 +358,9 @@ lib/elementary/elm_hover_eo.legacy.c \ lib/elementary/elm_hover_eo.c \ lib/elementary/elm_hoversel_eo.c \ lib/elementary/elm_hoversel_item_eo.c \ -lib/elementary/elm_hoversel_item_eo.legacy.c +lib/elementary/elm_hoversel_item_eo.legacy.c \ +lib/elementary/elm_icon_eo.c \ +$(NULL) elm_legacy_eo_headers = \ lib/elementary/efl_ui_bg_eo.legacy.h \ @@ -477,7 +478,10 @@ lib/elementary/elm_hover_eo.legacy.h \ lib/elementary/elm_hoversel_eo.h \ lib/elementary/elm_hoversel_eo.legacy.h \ lib/elementary/elm_hoversel_item_eo.h \ -lib/elementary/elm_hoversel_item_eo.legacy.h +lib/elementary/elm_hoversel_item_eo.legacy.h \ +lib/elementary/elm_icon_eo.h \ +lib/elementary/elm_icon_eo.legacy.h \ +$(NULL) EXTRA_DIST2 += ${elementaryeolianfiles_DATA} $(elm_legacy_eolian_files) $(elm_private_eolian_files) $(elm_legacy_eo_files) diff --git a/src/lib/elementary/elm_dbus_menu.c b/src/lib/elementary/elm_dbus_menu.c index 73b8a7bf0b..7d1d950986 100644 --- a/src/lib/elementary/elm_dbus_menu.c +++ b/src/lib/elementary/elm_dbus_menu.c @@ -5,7 +5,7 @@ #include #include #include "elm_priv.h" -#include "elm_icon.eo.h" +#include "elm_icon_eo.h" #include "elm_widget_menu.h" #include "elm_widget_icon.h" diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c index e7bed4392f..819f549e63 100644 --- a/src/lib/elementary/elm_icon.c +++ b/src/lib/elementary/elm_icon.c @@ -9,7 +9,7 @@ #include "elm_priv.h" #include "elm_widget_icon.h" #include "efl_ui_widget_image.h" -#include "elm_icon.eo.h" +#include "elm_icon_eo.h" #define NON_EXISTING (void *)-1 @@ -923,4 +923,4 @@ elm_icon_order_lookup_get(const Evas_Object *obj EINA_UNUSED) #define ELM_ICON_EXTRA_OPS \ EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_icon) -#include "elm_icon.eo.c" +#include "elm_icon_eo.c" diff --git a/src/lib/elementary/elm_icon.eo b/src/lib/elementary/elm_icon.eo deleted file mode 100644 index a933381459..0000000000 --- a/src/lib/elementary/elm_icon.eo +++ /dev/null @@ -1,19 +0,0 @@ -class Elm.Icon extends Efl.Ui.Image implements Efl.Ui.Legacy -{ - [[Elementary Icon Class]] - legacy_prefix: elm_icon; - eo_prefix: elm_obj_icon; - event_prefix: elm_icon; - methods { - } - implements { - class.constructor; - Efl.Object.constructor; - Efl.Ui.Widget.theme_apply; - Efl.File.load; - } - events { - thumb,done: void; [[Called when thumb nailing is successfully done]] - thumb,error: void; [[Called when thumb nailing failed]] - } -} diff --git a/src/lib/elementary/elm_icon_eo.c b/src/lib/elementary/elm_icon_eo.c new file mode 100644 index 0000000000..ce76bed57a --- /dev/null +++ b/src/lib/elementary/elm_icon_eo.c @@ -0,0 +1,47 @@ +EWAPI const Efl_Event_Description _ELM_ICON_EVENT_THUMB_DONE = + EFL_EVENT_DESCRIPTION("thumb,done"); +EWAPI const Efl_Event_Description _ELM_ICON_EVENT_THUMB_ERROR = + EFL_EVENT_DESCRIPTION("thumb,error"); + +Efl_Object *_elm_icon_efl_object_constructor(Eo *obj, Elm_Icon_Data *pd); + + +Eina_Error _elm_icon_efl_ui_widget_theme_apply(Eo *obj, Elm_Icon_Data *pd); + + +Eina_Error _elm_icon_efl_file_load(Eo *obj, Elm_Icon_Data *pd); + + +static Eina_Bool +_elm_icon_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_ICON_EXTRA_OPS +#define ELM_ICON_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_icon_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_icon_efl_ui_widget_theme_apply), + EFL_OBJECT_OP_FUNC(efl_file_load, _elm_icon_efl_file_load), + ELM_ICON_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_icon_class_desc = { + EO_VERSION, + "Elm.Icon", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Icon_Data), + _elm_icon_class_initializer, + _elm_icon_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(elm_icon_class_get, &_elm_icon_class_desc, EFL_UI_IMAGE_CLASS, EFL_UI_LEGACY_INTERFACE, NULL); diff --git a/src/lib/elementary/elm_icon_eo.h b/src/lib/elementary/elm_icon_eo.h new file mode 100644 index 0000000000..b53fed2b44 --- /dev/null +++ b/src/lib/elementary/elm_icon_eo.h @@ -0,0 +1,40 @@ +#ifndef _ELM_ICON_EO_H_ +#define _ELM_ICON_EO_H_ + +#ifndef _ELM_ICON_EO_CLASS_TYPE +#define _ELM_ICON_EO_CLASS_TYPE + +typedef Eo Elm_Icon; + +#endif + +#ifndef _ELM_ICON_EO_TYPES +#define _ELM_ICON_EO_TYPES + + +#endif +/** Elementary Icon Class + * + * @ingroup Elm_Icon + */ +#define ELM_ICON_CLASS elm_icon_class_get() + +EWAPI const Efl_Class *elm_icon_class_get(void); + +EWAPI extern const Efl_Event_Description _ELM_ICON_EVENT_THUMB_DONE; + +/** Called when thumb nailing is successfully done + * + * @ingroup Elm_Icon + */ +#define ELM_ICON_EVENT_THUMB_DONE (&(_ELM_ICON_EVENT_THUMB_DONE)) + +EWAPI extern const Efl_Event_Description _ELM_ICON_EVENT_THUMB_ERROR; + +/** Called when thumb nailing failed + * + * @ingroup Elm_Icon + */ +#define ELM_ICON_EVENT_THUMB_ERROR (&(_ELM_ICON_EVENT_THUMB_ERROR)) + +#endif diff --git a/src/lib/elementary/elm_icon_eo.legacy.h b/src/lib/elementary/elm_icon_eo.legacy.h new file mode 100644 index 0000000000..0639c787e5 --- /dev/null +++ b/src/lib/elementary/elm_icon_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _ELM_ICON_EO_LEGACY_H_ +#define _ELM_ICON_EO_LEGACY_H_ + +#ifndef _ELM_ICON_EO_CLASS_TYPE +#define _ELM_ICON_EO_CLASS_TYPE + +typedef Eo Elm_Icon; + +#endif + +#ifndef _ELM_ICON_EO_TYPES +#define _ELM_ICON_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/elm_icon_legacy.h b/src/lib/elementary/elm_icon_legacy.h index fa19077600..4adda268bc 100644 --- a/src/lib/elementary/elm_icon_legacy.h +++ b/src/lib/elementary/elm_icon_legacy.h @@ -103,4 +103,4 @@ EAPI Eina_Bool elm_icon_standard_set(Evas_Object *obj, const char *name); */ EAPI const char *elm_icon_standard_get(const Evas_Object *obj); -#include "elm_icon.eo.legacy.h" +#include "elm_icon_eo.legacy.h" diff --git a/src/lib/elementary/elm_photo.c b/src/lib/elementary/elm_photo.c index 6ec12a5938..2f9dc661ea 100644 --- a/src/lib/elementary/elm_photo.c +++ b/src/lib/elementary/elm_photo.c @@ -9,7 +9,7 @@ #include "elm_priv.h" #include "elm_widget_photo.h" #include "elm_photo.eo.h" -#include "elm_icon.eo.h" +#include "elm_icon_eo.h" #define MY_CLASS ELM_PHOTO_CLASS diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 3295f122af..538b6fa8e4 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -5,7 +5,7 @@ #include #include "elm_priv.h" -#include "elm_icon.eo.h" +#include "elm_icon_eo.h" #include "efl_ui_theme.eo.h" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index ab3bbcf421..8075badb02 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -40,7 +40,6 @@ pub_legacy_eo_files = [ 'elm_actionslider_part.eo', 'elm_bubble_part.eo', 'elm_fileselector_part.eo', - 'elm_icon.eo', 'elm_inwin.eo', 'elm_mapbuf.eo', 'elm_naviframe.eo', @@ -760,6 +759,8 @@ elementary_pub_headers = [ 'elm_hoversel_eo.legacy.h', 'elm_hoversel_item_eo.h', 'elm_hoversel_item_eo.legacy.h', + 'elm_icon_eo.h', + 'elm_icon_eo.legacy.h', ] elementary_header_src = [