From 5af04e40e2fd56ce1bc4bf77de2474ae6b04ad79 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 5 Mar 2019 17:00:37 -0500 Subject: [PATCH] efl_ui_image_zoomable: 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/D8141 --- src/Makefile_Elementary.am | 6 ++- src/lib/elementary/efl_ui_image_zoomable.c | 5 ++- src/lib/elementary/efl_ui_image_zoomable.eo | 3 -- .../efl_ui_image_zoomable_eo.legacy.c | 12 +++++ .../efl_ui_image_zoomable_eo.legacy.h | 45 +++++++++++++++++++ .../efl_ui_image_zoomable_legacy.eo | 9 ---- .../efl_ui_image_zoomable_legacy_eo.c | 35 +++++++++++++++ .../efl_ui_image_zoomable_legacy_eo.h | 26 +++++++++++ .../efl_ui_image_zoomable_legacy_eo.legacy.h | 17 +++++++ .../elementary/efl_ui_image_zoomable_pan.eo | 1 - src/lib/elementary/elm_photocam_legacy.h | 2 +- src/lib/elementary/meson.build | 4 +- 12 files changed, 147 insertions(+), 18 deletions(-) create mode 100644 src/lib/elementary/efl_ui_image_zoomable_eo.legacy.c create mode 100644 src/lib/elementary/efl_ui_image_zoomable_eo.legacy.h delete mode 100644 src/lib/elementary/efl_ui_image_zoomable_legacy.eo create mode 100644 src/lib/elementary/efl_ui_image_zoomable_legacy_eo.c create mode 100644 src/lib/elementary/efl_ui_image_zoomable_legacy_eo.h create mode 100644 src/lib/elementary/efl_ui_image_zoomable_legacy_eo.legacy.h diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 236da9ba36..cb7af9e8f1 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -189,7 +189,6 @@ elm_legacy_eolian_files = \ lib/elementary/efl_ui_radio_legacy.eo \ lib/elementary/efl_ui_video_legacy.eo \ lib/elementary/efl_ui_panes_legacy.eo \ - lib/elementary/efl_ui_image_zoomable_legacy.eo \ lib/elementary/efl_ui_win_legacy.eo \ lib/elementary/efl_ui_progressbar_legacy.eo \ lib/elementary/efl_ui_clock_legacy.eo \ @@ -325,6 +324,8 @@ lib/elementary/efl_ui_check_legacy_eo.c \ lib/elementary/efl_ui_flip_legacy_eo.c \ lib/elementary/efl_ui_frame_legacy_eo.c \ lib/elementary/efl_ui_image_legacy_eo.c \ +lib/elementary/efl_ui_image_zoomable_eo.legacy.c \ +lib/elementary/efl_ui_image_zoomable_legacy_eo.c \ lib/elementary/elm_hoversel_eo.c \ lib/elementary/elm_hoversel_eo.legacy.c \ lib/elementary/elm_hoversel_item_eo.c \ @@ -348,6 +349,9 @@ lib/elementary/efl_ui_frame_legacy_eo.h \ lib/elementary/efl_ui_frame_legacy_eo.legacy.h \ lib/elementary/efl_ui_image_legacy_eo.h \ lib/elementary/efl_ui_image_legacy_eo.legacy.h \ +lib/elementary/efl_ui_image_zoomable_eo.legacy.h \ +lib/elementary/efl_ui_image_zoomable_legacy_eo.h \ +lib/elementary/efl_ui_image_zoomable_legacy_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/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 609c85fe9f..e7326d8b82 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -3177,8 +3177,9 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_image_zoomable, Efl_Ui_Image_Zoomab EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_image_zoomable) #include "efl_ui_image_zoomable.eo.c" +#include "efl_ui_image_zoomable_eo.legacy.c" -#include "efl_ui_image_zoomable_legacy.eo.h" +#include "efl_ui_image_zoomable_legacy_eo.h" #define MY_CLASS_NAME_LEGACY "elm_photocam" static void @@ -3431,4 +3432,4 @@ elm_photocam_image_region_get(const Efl_Ui_Image_Zoomable *obj, int *x, int *y, if (h) *h = r.h; } -#include "efl_ui_image_zoomable_legacy.eo.c" +#include "efl_ui_image_zoomable_legacy_eo.c" diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index ab3a5a8111..374c82fc21 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -7,7 +7,6 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, Efl.Ui.Scrollbar { [[Elementary Image Zoomable class]] - legacy_prefix: elm_photocam; methods { @property gesture_enabled { set { @@ -33,7 +32,6 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, See also @.image_region.set. ]] - legacy: null; } set { [[Set the viewed region of the image @@ -41,7 +39,6 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, This shows the region of the image without using animation. @since 1.20 ]] - legacy: null; } values { region: Eina.Rect; [[The region in the original image pixels.]] diff --git a/src/lib/elementary/efl_ui_image_zoomable_eo.legacy.c b/src/lib/elementary/efl_ui_image_zoomable_eo.legacy.c new file mode 100644 index 0000000000..61dd7502df --- /dev/null +++ b/src/lib/elementary/efl_ui_image_zoomable_eo.legacy.c @@ -0,0 +1,12 @@ + +EAPI void +elm_photocam_gesture_enabled_set(Efl_Ui_Image_Zoomable *obj, Eina_Bool gesture) +{ + efl_ui_image_zoomable_gesture_enabled_set(obj, gesture); +} + +EAPI Eina_Bool +elm_photocam_gesture_enabled_get(const Efl_Ui_Image_Zoomable *obj) +{ + return efl_ui_image_zoomable_gesture_enabled_get(obj); +} diff --git a/src/lib/elementary/efl_ui_image_zoomable_eo.legacy.h b/src/lib/elementary/efl_ui_image_zoomable_eo.legacy.h new file mode 100644 index 0000000000..7fa5aabb32 --- /dev/null +++ b/src/lib/elementary/efl_ui_image_zoomable_eo.legacy.h @@ -0,0 +1,45 @@ +#ifndef _EFL_UI_IMAGE_ZOOMABLE_EO_LEGACY_H_ +#define _EFL_UI_IMAGE_ZOOMABLE_EO_LEGACY_H_ + +#ifndef _EFL_UI_IMAGE_ZOOMABLE_EO_CLASS_TYPE +#define _EFL_UI_IMAGE_ZOOMABLE_EO_CLASS_TYPE + +typedef Eo Efl_Ui_Image_Zoomable; + +#endif + +#ifndef _EFL_UI_IMAGE_ZOOMABLE_EO_TYPES +#define _EFL_UI_IMAGE_ZOOMABLE_EO_TYPES + + +#endif + +/** + * @brief Set the gesture state for photocam. + * + * This sets the gesture state to on or off for photocam. The default is off. + * This will start multi touch zooming. + * + * @param[in] obj The object. + * @param[in] gesture The gesture state. + * + * @ingroup Elm_Photocam_Group + */ +EAPI void elm_photocam_gesture_enabled_set(Efl_Ui_Image_Zoomable *obj, Eina_Bool gesture); + +/** + * @brief Get the gesture state for photocam. + * + * This gets the current gesture state for the photocam object. + * + * @param[in] obj The object. + * + * @return The gesture state. + * + * @ingroup Elm_Photocam_Group + */ +EAPI Eina_Bool elm_photocam_gesture_enabled_get(const Efl_Ui_Image_Zoomable *obj); + + + +#endif diff --git a/src/lib/elementary/efl_ui_image_zoomable_legacy.eo b/src/lib/elementary/efl_ui_image_zoomable_legacy.eo deleted file mode 100644 index b1a41977be..0000000000 --- a/src/lib/elementary/efl_ui_image_zoomable_legacy.eo +++ /dev/null @@ -1,9 +0,0 @@ -class @beta Efl.Ui.Image_Zoomable_Legacy extends Efl.Ui.Image_Zoomable implements Efl.Ui.Legacy -{ - [[Elementary Image Zoomable class]] - data: null; - implements { - class.constructor; - Efl.Object.constructor; - } -} diff --git a/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.c b/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.c new file mode 100644 index 0000000000..22ac25bc3c --- /dev/null +++ b/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.c @@ -0,0 +1,35 @@ + +Efl_Object *_efl_ui_image_zoomable_legacy_efl_object_constructor(Eo *obj, void *pd); + + +static Eina_Bool +_efl_ui_image_zoomable_legacy_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef EFL_UI_IMAGE_ZOOMABLE_LEGACY_EXTRA_OPS +#define EFL_UI_IMAGE_ZOOMABLE_LEGACY_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_constructor, _efl_ui_image_zoomable_legacy_efl_object_constructor), + EFL_UI_IMAGE_ZOOMABLE_LEGACY_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _efl_ui_image_zoomable_legacy_class_desc = { + EO_VERSION, + "Efl.Ui.Image_Zoomable_Legacy", + EFL_CLASS_TYPE_REGULAR, + 0, + _efl_ui_image_zoomable_legacy_class_initializer, + _efl_ui_image_zoomable_legacy_class_constructor, + NULL +}; + +EFL_DEFINE_CLASS(efl_ui_image_zoomable_legacy_class_get, &_efl_ui_image_zoomable_legacy_class_desc, EFL_UI_IMAGE_ZOOMABLE_CLASS, EFL_UI_LEGACY_INTERFACE, NULL); diff --git a/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.h b/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.h new file mode 100644 index 0000000000..e18960f320 --- /dev/null +++ b/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.h @@ -0,0 +1,26 @@ +#ifndef _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_H_ +#define _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_H_ + +#ifndef _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_CLASS_TYPE +#define _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_CLASS_TYPE + +typedef Eo Efl_Ui_Image_Zoomable_Legacy; + +#endif + +#ifndef _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_TYPES +#define _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_TYPES + + +#endif +#ifdef EFL_BETA_API_SUPPORT +/** Elementary Image Zoomable class + * + * @ingroup Efl_Ui_Image_Zoomable_Legacy + */ +#define EFL_UI_IMAGE_ZOOMABLE_LEGACY_CLASS efl_ui_image_zoomable_legacy_class_get() + +EWAPI const Efl_Class *efl_ui_image_zoomable_legacy_class_get(void); +#endif /* EFL_BETA_API_SUPPORT */ + +#endif diff --git a/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.legacy.h b/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.legacy.h new file mode 100644 index 0000000000..0ed427d5a5 --- /dev/null +++ b/src/lib/elementary/efl_ui_image_zoomable_legacy_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_LEGACY_H_ +#define _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_LEGACY_H_ + +#ifndef _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_CLASS_TYPE +#define _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_CLASS_TYPE + +typedef Eo Efl_Ui_Image_Zoomable_Legacy; + +#endif + +#ifndef _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_TYPES +#define _EFL_UI_IMAGE_ZOOMABLE_LEGACY_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/efl_ui_image_zoomable_pan.eo b/src/lib/elementary/efl_ui_image_zoomable_pan.eo index 792f1a9a2f..b1b5c0d4b3 100644 --- a/src/lib/elementary/efl_ui_image_zoomable_pan.eo +++ b/src/lib/elementary/efl_ui_image_zoomable_pan.eo @@ -1,7 +1,6 @@ class @beta Efl.Ui.Image_Zoomable_Pan extends Efl.Ui.Pan { [[Elementary photocom pan class]] - legacy_prefix: elm_photocam_pan; implements { class.constructor; Efl.Object.destructor; diff --git a/src/lib/elementary/elm_photocam_legacy.h b/src/lib/elementary/elm_photocam_legacy.h index 52a3cbd1d9..f80d8ac49b 100644 --- a/src/lib/elementary/elm_photocam_legacy.h +++ b/src/lib/elementary/elm_photocam_legacy.h @@ -234,4 +234,4 @@ EAPI Elm_Photocam_Zoom_Mode elm_photocam_zoom_mode_get(const Evas_Object *obj); */ EAPI void elm_photocam_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); -#include "efl_ui_image_zoomable.eo.legacy.h" +#include "efl_ui_image_zoomable_eo.legacy.h" diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 9cd6bbe041..904bd99fdb 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -2,7 +2,6 @@ pub_legacy_eo_files = [ 'efl_ui_radio_legacy.eo', 'efl_ui_video_legacy.eo', 'efl_ui_panes_legacy.eo', - 'efl_ui_image_zoomable_legacy.eo', 'efl_ui_win_legacy.eo', 'efl_ui_progressbar_legacy.eo', 'efl_ui_clock_legacy.eo', @@ -706,6 +705,9 @@ elementary_pub_headers = [ 'efl_ui_frame_legacy_eo.legacy.h', 'efl_ui_image_legacy_eo.h', 'efl_ui_image_legacy_eo.legacy.h', + 'efl_ui_image_zoomable_eo.legacy.h', + 'efl_ui_image_zoomable_legacy_eo.h', + 'efl_ui_image_zoomable_legacy_eo.legacy.h', 'elm_hoversel_eo.h', 'elm_hoversel_eo.legacy.h', 'elm_hoversel_item_eo.h',