efl_ui_widget_part: implement all the missing API

Efl.Color and Efl.File cannot be done due to composition. Efl.Gfx.Image
can, so we can solve this via composition, this also resolves all the
other cases for Efl.Gfx.Image.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9991
This commit is contained in:
Marcel Hollerbach 2019-09-17 15:51:54 +02:00 committed by Cedric Bail
parent 422154c0de
commit ccdec4ba68
2 changed files with 7 additions and 12 deletions

View File

@ -5759,21 +5759,16 @@ _efl_ui_widget_part_bg_efl_gfx_color_color_get(const Eo *obj, void *pd EINA_UNUS
efl_gfx_color_get(bg_obj, r, g, b, a);
}
EOLIAN static void
_efl_ui_widget_part_bg_efl_gfx_image_scale_method_set(Eo *obj, void *pd EINA_UNUSED, Efl_Gfx_Image_Scale_Method scale_type)
EOLIAN static Efl_Object*
_efl_ui_widget_part_bg_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
{
Evas_Object *bg_obj = efl_ui_widget_part_bg_get(obj);
efl_gfx_image_scale_method_set(bg_obj, scale_type);
efl_composite_attach(obj, bg_obj);
return efl_finalize(efl_super(obj, EFL_UI_WIDGET_PART_BG_CLASS));
}
EOLIAN static Efl_Gfx_Image_Scale_Method
_efl_ui_widget_part_bg_efl_gfx_image_scale_method_get(const Eo *obj, void *pd EINA_UNUSED)
{
Evas_Object *bg_obj = efl_ui_widget_part_bg_get(obj);
return efl_gfx_image_scale_method_get(bg_obj);
}
typedef struct _Efl_Ui_Property_Bound Efl_Ui_Property_Bound;
struct _Efl_Ui_Property_Bound

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image
class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image composite Efl.Gfx.Image
{
[[Elementary widget internal part background class
@ -9,12 +9,12 @@ class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File
]]
data: null;
implements {
Efl.Object.finalize;
Efl.File.file { get; set; }
Efl.File.key { get; set; }
Efl.File.mmap { get; set; }
Efl.File.load;
Efl.File.unload;
Efl.Gfx.Color.color { set; get; }
Efl.Gfx.Image.scale_method { get; set; }
}
}