aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-17 14:16:14 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-17 15:45:26 +0200
commit8a029d5c043f13238102a098020980bbd86a348d (patch)
tree4b10a185ad56b3e6334f6cf6b9cf1b5212f496ca
parenttests/ecore_wl2: Fix resource leak (diff)
downloadefl-8a029d5c043f13238102a098020980bbd86a348d.tar.gz
efl_ui_image: implement missing API
the API calls have not been implemented, this revision implements these APIs as redirects to the image if those are a edje object. Normally this should be a calling the legacy edje API. However, this is here really hard as imitating the correct callback behaviour is hard. And the correct behaviour with the eina value type is also just leading to copying the implementation from edje. So in order to keep the amount of code low here, this just uses the efl-api to redirect the requests. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9989
-rw-r--r--src/lib/elementary/efl_ui_image.c31
-rw-r--r--src/lib/elementary/efl_ui_image.eo4
2 files changed, 35 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index a5d683c42f..e2365857c8 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -1221,6 +1221,37 @@ _efl_ui_image_efl_layout_signal_signal_emit(Eo *obj EINA_UNUSED, Efl_Ui_Image_Da
edje_object_signal_emit(sd->img, emission, source);
}
+EOLIAN static void
+_efl_ui_image_efl_layout_signal_message_send(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, int id, const Eina_Value msg)
+{
+ if (pd->edje)
+ efl_layout_signal_message_send(pd->img, id, msg);
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_image_efl_layout_signal_signal_callback_add(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, const char *emission, const char *source, void *func_data, EflLayoutSignalCb func, Eina_Free_Cb func_free_cb)
+{
+ if (pd->edje)
+ return efl_layout_signal_callback_add(pd->img, emission, source, func_data, func, func_free_cb);
+ return EINA_FALSE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_image_efl_layout_signal_signal_callback_del(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, const char *emission, const char *source, void *func_data, EflLayoutSignalCb func, Eina_Free_Cb func_free_cb)
+{
+ if (pd->edje)
+ return efl_layout_signal_callback_del(pd->img, emission, source, func_data, func, func_free_cb);
+ return EINA_FALSE;
+}
+
+EOLIAN static void
+_efl_ui_image_efl_layout_signal_signal_process(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd, Eina_Bool recurse)
+{
+ if (pd->edje)
+ efl_layout_signal_process(pd->img, recurse);
+}
+
+
EOLIAN static Eina_Size2D
_efl_ui_image_efl_layout_group_group_size_min_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{
diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo
index 876d817858..0d3eeffa5a 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -83,6 +83,10 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, E
Efl.Player.playable { get; }
Efl.Player.play { get; set; }
Efl.Layout.Signal.signal_emit;
+ Efl.Layout.Signal.message_send;
+ Efl.Layout.Signal.signal_callback_add;
+ Efl.Layout.Signal.signal_callback_del;
+ Efl.Layout.Signal.signal_process;
Efl.Layout.Group.group_size_min { get; }
Efl.Layout.Group.group_size_max { get; }
Efl.Layout.Group.group_data { get; }