efl_ui_bg: implement load_controller and efl.gfx.image via composition
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Sat, 21 Sep 2019 08:15:18 +0000 (10:15 +0200)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 22 Sep 2019 21:11:58 +0000 (06:11 +0900)
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

src/lib/elementary/efl_ui_bg.c
src/lib/elementary/efl_ui_bg.eo

index 88d9c92..16cc8ae 100644 (file)
@@ -66,6 +66,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;
 }
 
@@ -134,18 +136,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,
@@ -196,18 +186,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)
 {
index 5de72ab..6ce62e9 100644 (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; }
    }
 }