diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-03-18 11:50:48 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-03-18 13:28:45 +0900 |
commit | b8f682b842675d8ac952ddbc067befc22ec486ce (patch) | |
tree | dc0d8a7a0bbdbf34cf1422ec4fde45ab3b974d03 /src | |
parent | 9d4ca6f352a465cc6e0bcc70aeb3ac3108917e67 (diff) | |
download | efl-b8f682b842675d8ac952ddbc067befc22ec486ce.tar.gz |
Efl.Gfx.Fill: Rename filled to fill_auto
fill_filled is a strange name for the property.
fill_auto seems to make more sense. If you disagree, scream at
me or revert this commit.
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/evas/evas-object-manipulation-eo.c | 2 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_fill.eo | 22 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_image.eo | 2 | ||||
-rw-r--r-- | src/lib/evas/Evas_Legacy.h | 4 | ||||
-rw-r--r-- | src/lib/evas/canvas/efl_canvas_snapshot.c | 1 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_image.eo | 4 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_image_legacy.c | 6 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_image.c | 6 | ||||
-rw-r--r-- | src/tests/evas/evas_test_image.c | 2 |
9 files changed, 19 insertions, 30 deletions
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c index 3cc125aefb..4fe38f44e1 100644 --- a/src/examples/evas/evas-object-manipulation-eo.c +++ b/src/examples/evas/evas-object-manipulation-eo.c @@ -197,7 +197,6 @@ main(void) * So it's possible to decrement refcount, and 'image' object * will be deleted automatically by parent.*/ - efl_gfx_fill_filled_set(d.img, EINA_TRUE); efl_file_set(d.img, img_path, NULL); err = efl_image_load_error_get(d.img); @@ -218,7 +217,6 @@ main(void) /* border on the image's clipper, here just to emphasize its position */ d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas); - efl_gfx_fill_filled_set(d.clipper_border, EINA_TRUE); efl_file_set(d.clipper_border, border_img_path, NULL); err = efl_image_load_error_get(d.clipper_border); diff --git a/src/lib/efl/interfaces/efl_gfx_fill.eo b/src/lib/efl/interfaces/efl_gfx_fill.eo index 0dde45c17e..5ee05e0630 100644 --- a/src/lib/efl/interfaces/efl_gfx_fill.eo +++ b/src/lib/efl/interfaces/efl_gfx_fill.eo @@ -1,17 +1,19 @@ interface Efl.Gfx.Fill { legacy_prefix: null; methods { - @property filled { + @property fill_auto { [[Binds the object's @.fill property to its actual geometry. If $true, then every time the object is resized, it will automatically trigger a call to @Efl.Gfx.Fill.fill.set with the new size (and 0, 0 as source image's origin), - so the bound image will fill the whole object's area. + so the image will cover the whole object's area. - This property takes precedence over @.fill. + This property takes precedence over @.fill. If set to $false, then + @.fill should be set. - This flag is $true by default (used to be $false with the old APIs). + This flag is $true by default (used to be $false with the old APIs, + and was known as "filled"). ]] set {} get {} @@ -29,18 +31,8 @@ interface Efl.Gfx.Fill { $w and $h need to be the exact width and height of the image object itself, respectively. - Note that this property has no effect if @.filled is $true. + Setting this property will reset the @.fill_auto to $false. ]] - /* FIXME-doc - * See the following image to better understand the effects of this - * call. On this diagram, both image object and original image source - * have $a x $a dimensions and the image itself is a circle, with - * empty space around it: - - * @image html image-fill.png - * @image rtf image-fill.png - * @image latex image-fill.eps - */ set {} get {} values { diff --git a/src/lib/efl/interfaces/efl_image.eo b/src/lib/efl/interfaces/efl_image.eo index b0499a383e..50982a47e9 100644 --- a/src/lib/efl/interfaces/efl_image.eo +++ b/src/lib/efl/interfaces/efl_image.eo @@ -116,7 +116,7 @@ interface Efl.Image () in @Efl.Gfx.Border_Fill_Mode. By center we mean the complementary part of that defined by @.border.set. This is very useful for making frames and decorations. You would most probably also be - using a filled image (as in @Efl.Gfx.Fill.filled) to use as a frame. + using a filled image (as in @Efl.Gfx.Fill.fill_auto) to use as a frame. The default value is @Efl.Gfx.Border_Fill_Mode.default, ie. render and scale the center area, respecting its transparency. diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 9f92dddbd4..ec276ea33e 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -3325,7 +3325,7 @@ EAPI double evas_object_image_border_scale_get(const Evas_Object *obj); * By center we mean the complementary part of that defined by * @ref evas_object_image_border_set. This one is very useful for making frames * and decorations. You would most probably also be using a filled image (as in - * @ref Efl.Gfx.Fill.filled) to use as a frame. + * @ref Efl.Gfx.Fill.fill_auto) to use as a frame. * * The default value is * @@ -3343,7 +3343,7 @@ EAPI void evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border * By center we mean the complementary part of that defined by * @ref evas_object_image_border_set. This one is very useful for making frames * and decorations. You would most probably also be using a filled image (as in - * @ref Efl.Gfx.Fill.filled) to use as a frame. + * @ref Efl.Gfx.Fill.fill_auto) to use as a frame. * * The default value is * diff --git a/src/lib/evas/canvas/efl_canvas_snapshot.c b/src/lib/evas/canvas/efl_canvas_snapshot.c index bd97c0416d..11fdf9e425 100644 --- a/src/lib/evas/canvas/efl_canvas_snapshot.c +++ b/src/lib/evas/canvas/efl_canvas_snapshot.c @@ -11,7 +11,6 @@ _efl_canvas_snapshot_eo_base_constructor(Eo *eo_obj, void *pd EINA_UNUSED) eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS)); if (!eo_obj) return NULL; - efl_gfx_fill_filled_set(eo_obj, EINA_TRUE); evas_obj_pass_events_set(eo_obj, EINA_TRUE); obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); diff --git a/src/lib/evas/canvas/evas_image.eo b/src/lib/evas/canvas/evas_image.eo index 3bbc26ee0c..5fe400ac7e 100644 --- a/src/lib/evas/canvas/evas_image.eo +++ b/src/lib/evas/canvas/evas_image.eo @@ -74,8 +74,8 @@ class Evas.Image (Evas.Object, Evas.Filter, Efl.Gfx.Buffer.buffer_copy_set; Efl.Gfx.Fill.fill.set; Efl.Gfx.Fill.fill.get; - Efl.Gfx.Fill.filled.get; - Efl.Gfx.Fill.filled.set; + Efl.Gfx.Fill.fill_auto.get; + Efl.Gfx.Fill.fill_auto.set; Efl.Gfx.Filter.filter_program.set; Efl.Gfx.View.view_size.get; Evas.Filter.filter_input_alpha; diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index cd92e6f4b7..a82f0259c4 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -16,7 +16,7 @@ evas_object_image_add(Evas *eo_e) { EINA_SAFETY_ON_FALSE_RETURN_VAL(eo_isa(eo_e, EVAS_CANVAS_CLASS), NULL); return eo_add(EVAS_IMAGE_CLASS, eo_e, - efl_gfx_fill_filled_set(eo_self, EINA_FALSE), + efl_gfx_fill_auto_set(eo_self, EINA_FALSE), evas_obj_legacy_ctor(eo_self)); } @@ -64,14 +64,14 @@ EAPI Eina_Bool evas_object_image_filled_get(const Evas_Object *eo_obj) { EVAS_IMAGE_API(eo_obj, EINA_FALSE); - return efl_gfx_fill_filled_get(eo_obj); + return efl_gfx_fill_auto_get(eo_obj); } EAPI void evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value) { EVAS_IMAGE_API(eo_obj); - efl_gfx_fill_filled_set(eo_obj, value); + efl_gfx_fill_auto_set(eo_obj, value); } EAPI void diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 5b4114f59f..df42005ec3 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -214,7 +214,7 @@ EOLIAN static Eo * _evas_image_eo_base_finalize(Eo *eo_obj, Evas_Image_Data *o) { if (!o->filled_set) - efl_gfx_fill_filled_set(eo_obj, EINA_TRUE); + efl_gfx_fill_auto_set(eo_obj, EINA_TRUE); return eo_finalize(eo_super(eo_obj, MY_CLASS)); } @@ -490,7 +490,7 @@ _evas_image_efl_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_ } EOLIAN static void -_evas_image_efl_gfx_fill_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting) +_evas_image_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); setting = !!setting; @@ -516,7 +516,7 @@ _evas_image_efl_gfx_fill_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool se } EOLIAN static Eina_Bool -_evas_image_efl_gfx_fill_filled_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) +_evas_image_efl_gfx_fill_fill_auto_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) { return o->filled; } diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c index 39a923bf1d..ca7e9e9e21 100644 --- a/src/tests/evas/evas_test_image.c +++ b/src/tests/evas/evas_test_image.c @@ -647,7 +647,7 @@ START_TEST(evas_object_image_defaults) /* test eo defaults */ o = eo_add(EVAS_IMAGE_CLASS, e); - fail_if(!efl_gfx_fill_filled_get(o)); + fail_if(!efl_gfx_fill_auto_get(o)); eo_del(o); evas_free(e); |