forked from enlightenment/efl
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
This commit is contained in:
parent
2d9fd1a827
commit
8a029d5c04
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue