efl_ui_bg: implement load_controller and efl.gfx.image via composition

With this commit the API of load controller and efl.gfx.image is
implemented via composition, which makes eolians API checker happy

ref T7880

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10064
This commit is contained in:
Marcel Hollerbach 2019-09-21 10:15:18 +02:00
parent 625189d248
commit 64be497e42
2 changed files with 4 additions and 27 deletions

View File

@ -64,6 +64,8 @@ _efl_ui_bg_efl_object_constructor(Eo *obj, Efl_Ui_Bg_Data *pd)
efl_ui_widget_focus_allow_set(obj, EINA_FALSE);
efl_composite_attach(obj, pd->img);
return obj;
}
@ -132,18 +134,6 @@ elm_bg_option_get(const Evas_Object *obj)
return option;
}
EOLIAN static void
_efl_ui_bg_efl_gfx_image_scale_method_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, Efl_Gfx_Image_Scale_Method scale_type)
{
efl_gfx_image_scale_method_set(sd->img, scale_type);
}
EOLIAN static Efl_Gfx_Image_Scale_Method
_efl_ui_bg_efl_gfx_image_scale_method_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
{
return efl_gfx_image_scale_method_get(sd->img);
}
EAPI void
elm_bg_color_set(Evas_Object *obj,
int r,
@ -194,18 +184,6 @@ elm_bg_load_size_set(Evas_Object *obj, int w, int h)
efl_gfx_image_load_controller_load_size_set(sd->img, EINA_SIZE2D(w, h));
}
EOLIAN static void
_efl_ui_bg_efl_gfx_image_load_controller_load_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, Eina_Size2D sz)
{
efl_gfx_image_load_controller_load_size_set(sd->img, sz);
}
EOLIAN static Eina_Size2D
_efl_ui_bg_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
{
return efl_gfx_image_load_controller_load_size_get(sd->img);
}
EAPI Eina_Bool
elm_bg_file_set(Eo *obj, const char *file, const char *group)
{

View File

@ -1,5 +1,6 @@
class @beta Efl.Ui.Bg extends Efl.Ui.Layout_Base
implements Efl.File, Efl.Gfx.Color, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
implements Efl.File, Efl.Gfx.Color
composites Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
{
[[The bg (background) widget is used for setting (solid) background decorations
for a window (unless it has transparency enabled) or for any container object. It
@ -16,7 +17,5 @@ class @beta Efl.Ui.Bg extends Efl.Ui.Layout_Base
Efl.File.key { get; set; }
Efl.File.mmap { get; set; }
Efl.Gfx.Color.color { get; set; }
Efl.Gfx.Image.scale_method { get; set; }
Efl.Gfx.Image_Load_Controller.load_size { get; set; }
}
}