efl_ui_image: implement remaining efl.layout.calc methods

this is just proxying the method calls onto the inner edje object if
the image is an edje object

ref T5719

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7741
This commit is contained in:
Mike Blumenkrantz 2019-01-23 15:39:43 -05:00 committed by Marcel Hollerbach
parent 70827b4d7e
commit d483302a13
2 changed files with 45 additions and 0 deletions

View File

@ -1217,6 +1217,47 @@ _efl_ui_image_efl_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Efl_Ui_Image_Da
}
}
EOLIAN Eina_Rect
_efl_ui_image_efl_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{
if (sd->edje)
return efl_layout_calc_parts_extends(sd->img);
return efl_gfx_entity_geometry_get(sd->img);
}
EOLIAN static int
_efl_ui_image_efl_layout_calc_calc_freeze(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{
if (sd->edje) return edje_object_freeze(sd->img);
return 0;
}
EOLIAN static int
_efl_ui_image_efl_layout_calc_calc_thaw(Eo *obj, Efl_Ui_Image_Data *sd)
{
if (sd->edje)
{
int ret = edje_object_thaw(sd->img);
elm_layout_sizing_eval(obj);
return ret;
}
return 0;
}
EOLIAN void
_efl_ui_image_efl_layout_calc_calc_auto_update_hints_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, Eina_Bool update)
{
if (sd->edje)
efl_layout_calc_auto_update_hints_set(sd->img, update);
}
EOLIAN Eina_Bool
_efl_ui_image_efl_layout_calc_calc_auto_update_hints_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{
if (sd->edje) return efl_layout_calc_auto_update_hints_get(sd->img);
return EINA_TRUE;
}
EOLIAN static void
_efl_ui_image_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, const char **file, const char **key)
{

View File

@ -109,7 +109,11 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Dra
Efl.Layout.Group.group_size_max { get; }
Efl.Layout.Group.group_data { get; }
Efl.Layout.Group.part_exist { get; }
Efl.Layout.Calc.calc_freeze;
Efl.Layout.Calc.calc_thaw;
Efl.Layout.Calc.calc_auto_update_hints { get; set; }
Efl.Layout.Calc.calc_size_min;
Efl.Layout.Calc.calc_parts_extends;
Efl.Layout.Calc.calc_force;
Efl.Canvas.Object.clip { set; }
Efl.Canvas.Group.group_member_add;