summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-28 06:49:46 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2020-01-28 06:49:46 +0900
commitb3c0da13d80456bcbf3954698413df5ee845b8c2 (patch)
tree55147983c0a7be9de713b15c994585d73fcfee1d
parent9e378b52e5217c609a472b070592aff91edb4126 (diff)
efl_ui_textbox / efl_ui_image_zoomable: remove duplicated code
Summary: these implementations were totally equal to what is there in efl_ui_layout. No point in keeping them. (Note, entry_edje is equal to resize_obj) ref T8522 Reviewers: segfaultxavi, cedric, zmike, woohyun Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8522 Differential Revision: https://phab.enlightenment.org/D11141
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c28
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.eo3
-rw-r--r--src/lib/elementary/efl_ui_textbox.c30
-rw-r--r--src/lib/elementary/efl_ui_textbox.eo3
4 files changed, 1 insertions, 63 deletions
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index 62a146422f..7d4f5d072a 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -1972,32 +1972,6 @@ _efl_ui_image_zoomable_efl_layout_group_group_size_max_get(const Eo *obj EINA_UN
1972 return EINA_SIZE2D(0, 0); 1972 return EINA_SIZE2D(0, 0);
1973} 1973}
1974 1974
1975EOLIAN static Eina_Bool
1976_efl_ui_image_zoomable_efl_layout_signal_signal_callback_add(Eo *obj, Efl_Ui_Image_Zoomable_Data *pd EINA_UNUSED,
1977 const char *emission, const char *source,
1978 void *func_data, EflLayoutSignalCb func, Eina_Free_Cb func_free_cb)
1979{
1980 Eina_Bool ok;
1981 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
1982
1983 ok = efl_layout_signal_callback_add(wd->resize_obj, emission, source, func_data, func, func_free_cb);
1984
1985 return ok;
1986}
1987
1988EOLIAN static Eina_Bool
1989_efl_ui_image_zoomable_efl_layout_signal_signal_callback_del(Eo *obj, Efl_Ui_Image_Zoomable_Data *pd EINA_UNUSED,
1990 const char *emission, const char *source,
1991 void *func_data, EflLayoutSignalCb func, Eina_Free_Cb func_free_cb)
1992{
1993 Eina_Bool ok;
1994 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
1995
1996 ok = efl_layout_signal_callback_del(wd->resize_obj, emission, source, func_data, func, func_free_cb);
1997
1998 return ok;
1999}
2000
2001static Eina_Error 1975static Eina_Error
2002_img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd, 1976_img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd,
2003 Eina_Bool resize) 1977 Eina_Bool resize)
@@ -3040,7 +3014,7 @@ _efl_ui_image_zoomable_animate_cb(void *data)
3040 return ECORE_CALLBACK_RENEW; 3014 return ECORE_CALLBACK_RENEW;
3041} 3015}
3042 3016
3043static Eina_Bool 3017static Eina_Bool
3044_efl_ui_image_zoomable_animated_set_internal(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, Eina_Bool anim) 3018_efl_ui_image_zoomable_animated_set_internal(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, Eina_Bool anim)
3045{ 3019{
3046 anim = !!anim; 3020 anim = !!anim;
diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo
index 4887128503..e27eb82c13 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.eo
+++ b/src/lib/elementary/efl_ui_image_zoomable.eo
@@ -67,9 +67,6 @@ class Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom
67 Efl.Gfx.Image_Orientable.image_orientation { get; set; } 67 Efl.Gfx.Image_Orientable.image_orientation { get; set; }
68 Efl.Layout.Group.group_size_min { get; } 68 Efl.Layout.Group.group_size_min { get; }
69 Efl.Layout.Group.group_size_max { get; } 69 Efl.Layout.Group.group_size_max { get; }
70 Efl.Layout.Signal.signal_callback_add;
71 Efl.Layout.Signal.signal_callback_del;
72 //Efl.Canvas.Layout_Group.group_data { get; }
73 } 70 }
74 events { 71 events {
75 press: void; [[Called when photocam got pressed]] 72 press: void; [[Called when photocam got pressed]]
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index 72e692c3e8..0976e81616 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -1256,36 +1256,6 @@ _item_get(void *data, const char *item)
1256 return o; 1256 return o;
1257} 1257}
1258 1258
1259EOLIAN static void
1260_efl_ui_textbox_efl_layout_signal_signal_emit(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, const char *emission, const char *source)
1261{
1262 /* always pass to both edje objs */
1263 efl_layout_signal_emit(sd->entry_edje, emission, source);
1264
1265 // FIXME: This should not be here!
1266 efl_layout_signal_process(sd->entry_edje, EINA_TRUE);
1267}
1268
1269static Eina_Bool
1270_efl_ui_textbox_efl_layout_signal_signal_callback_add(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *pd, const char *emission, const char *source, void *func_data, EflLayoutSignalCb func, Eina_Free_Cb func_free_cb)
1271{
1272 Eina_Bool ok;
1273
1274 ok = efl_layout_signal_callback_add(pd->entry_edje, emission, source, func_data, func, func_free_cb);
1275
1276 return ok;
1277}
1278
1279static Eina_Bool
1280_efl_ui_textbox_efl_layout_signal_signal_callback_del(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *pd, const char *emission, const char *source, void *func_data, EflLayoutSignalCb func, Eina_Free_Cb func_free_cb)
1281{
1282 Eina_Bool ok;
1283
1284 ok = efl_layout_signal_callback_del(pd->entry_edje, emission, source, func_data, func, func_free_cb);
1285
1286 return ok;
1287}
1288
1289static void 1259static void
1290_selection_handlers_offset_calc(Evas_Object *obj, Evas_Object *handler) 1260_selection_handlers_offset_calc(Evas_Object *obj, Evas_Object *handler)
1291{ 1261{
diff --git a/src/lib/elementary/efl_ui_textbox.eo b/src/lib/elementary/efl_ui_textbox.eo
index 67ed430848..dc3c428f1b 100644
--- a/src/lib/elementary/efl_ui_textbox.eo
+++ b/src/lib/elementary/efl_ui_textbox.eo
@@ -90,9 +90,6 @@ class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Click
90 Efl.Gfx.Entity.size { set; } 90 Efl.Gfx.Entity.size { set; }
91 Efl.Canvas.Group.group_member_add; 91 Efl.Canvas.Group.group_member_add;
92 Efl.Canvas.Group.group_calculate; 92 Efl.Canvas.Group.group_calculate;
93 Efl.Layout.Signal.signal_callback_add;
94 Efl.Layout.Signal.signal_callback_del;
95 Efl.Layout.Signal.signal_emit;
96 Efl.Ui.Widget.on_access_activate; 93 Efl.Ui.Widget.on_access_activate;
97 Efl.Ui.Widget.theme_apply; 94 Efl.Ui.Widget.theme_apply;
98 Efl.Ui.Focus.Object.on_focus_update; 95 Efl.Ui.Focus.Object.on_focus_update;