summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-18 11:50:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-18 13:28:45 +0900
commitb8f682b842675d8ac952ddbc067befc22ec486ce (patch)
treedc0d8a7a0bbdbf34cf1422ec4fde45ab3b974d03 /src
parent9d4ca6f352a465cc6e0bcc70aeb3ac3108917e67 (diff)
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.c2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_fill.eo22
-rw-r--r--src/lib/efl/interfaces/efl_image.eo2
-rw-r--r--src/lib/evas/Evas_Legacy.h4
-rw-r--r--src/lib/evas/canvas/efl_canvas_snapshot.c1
-rw-r--r--src/lib/evas/canvas/evas_image.eo4
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c6
-rw-r--r--src/lib/evas/canvas/evas_object_image.c6
-rw-r--r--src/tests/evas/evas_test_image.c2
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)
197 * So it's possible to decrement refcount, and 'image' object 197 * So it's possible to decrement refcount, and 'image' object
198 * will be deleted automatically by parent.*/ 198 * will be deleted automatically by parent.*/
199 199
200 efl_gfx_fill_filled_set(d.img, EINA_TRUE);
201 efl_file_set(d.img, img_path, NULL); 200 efl_file_set(d.img, img_path, NULL);
202 err = efl_image_load_error_get(d.img); 201 err = efl_image_load_error_get(d.img);
203 202
@@ -218,7 +217,6 @@ main(void)
218 217
219 /* border on the image's clipper, here just to emphasize its position */ 218 /* border on the image's clipper, here just to emphasize its position */
220 d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas); 219 d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas);
221 efl_gfx_fill_filled_set(d.clipper_border, EINA_TRUE);
222 efl_file_set(d.clipper_border, border_img_path, NULL); 220 efl_file_set(d.clipper_border, border_img_path, NULL);
223 err = efl_image_load_error_get(d.clipper_border); 221 err = efl_image_load_error_get(d.clipper_border);
224 222
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 @@
1interface Efl.Gfx.Fill { 1interface Efl.Gfx.Fill {
2 legacy_prefix: null; 2 legacy_prefix: null;
3 methods { 3 methods {
4 @property filled { 4 @property fill_auto {
5 [[Binds the object's @.fill property to its actual geometry. 5 [[Binds the object's @.fill property to its actual geometry.
6 6
7 If $true, then every time the object is resized, it will 7 If $true, then every time the object is resized, it will
8 automatically trigger a call to @Efl.Gfx.Fill.fill.set 8 automatically trigger a call to @Efl.Gfx.Fill.fill.set
9 with the new size (and 0, 0 as source image's origin), 9 with the new size (and 0, 0 as source image's origin),
10 so the bound image will fill the whole object's area. 10 so the image will cover the whole object's area.
11 11
12 This property takes precedence over @.fill. 12 This property takes precedence over @.fill. If set to $false, then
13 @.fill should be set.
13 14
14 This flag is $true by default (used to be $false with the old APIs). 15 This flag is $true by default (used to be $false with the old APIs,
16 and was known as "filled").
15 ]] 17 ]]
16 set {} 18 set {}
17 get {} 19 get {}
@@ -29,18 +31,8 @@ interface Efl.Gfx.Fill {
29 $w and $h need to be the exact width and height of the image object 31 $w and $h need to be the exact width and height of the image object
30 itself, respectively. 32 itself, respectively.
31 33
32 Note that this property has no effect if @.filled is $true. 34 Setting this property will reset the @.fill_auto to $false.
33 ]] 35 ]]
34 /* FIXME-doc
35 * See the following image to better understand the effects of this
36 * call. On this diagram, both image object and original image source
37 * have $a x $a dimensions and the image itself is a circle, with
38 * empty space around it:
39
40 * @image html image-fill.png
41 * @image rtf image-fill.png
42 * @image latex image-fill.eps
43 */
44 set {} 36 set {}
45 get {} 37 get {}
46 values { 38 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 ()
116 in @Efl.Gfx.Border_Fill_Mode. By center we mean the complementary 116 in @Efl.Gfx.Border_Fill_Mode. By center we mean the complementary
117 part of that defined by @.border.set. This is very useful for 117 part of that defined by @.border.set. This is very useful for
118 making frames and decorations. You would most probably also be 118 making frames and decorations. You would most probably also be
119 using a filled image (as in @Efl.Gfx.Fill.filled) to use as a frame. 119 using a filled image (as in @Efl.Gfx.Fill.fill_auto) to use as a frame.
120 120
121 The default value is @Efl.Gfx.Border_Fill_Mode.default, ie. render 121 The default value is @Efl.Gfx.Border_Fill_Mode.default, ie. render
122 and scale the center area, respecting its transparency. 122 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);
3325 * By center we mean the complementary part of that defined by 3325 * By center we mean the complementary part of that defined by
3326 * @ref evas_object_image_border_set. This one is very useful for making frames 3326 * @ref evas_object_image_border_set. This one is very useful for making frames
3327 * and decorations. You would most probably also be using a filled image (as in 3327 * and decorations. You would most probably also be using a filled image (as in
3328 * @ref Efl.Gfx.Fill.filled) to use as a frame. 3328 * @ref Efl.Gfx.Fill.fill_auto) to use as a frame.
3329 * 3329 *
3330 * The default value is 3330 * The default value is
3331 * 3331 *
@@ -3343,7 +3343,7 @@ EAPI void evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border
3343 * By center we mean the complementary part of that defined by 3343 * By center we mean the complementary part of that defined by
3344 * @ref evas_object_image_border_set. This one is very useful for making frames 3344 * @ref evas_object_image_border_set. This one is very useful for making frames
3345 * and decorations. You would most probably also be using a filled image (as in 3345 * and decorations. You would most probably also be using a filled image (as in
3346 * @ref Efl.Gfx.Fill.filled) to use as a frame. 3346 * @ref Efl.Gfx.Fill.fill_auto) to use as a frame.
3347 * 3347 *
3348 * The default value is 3348 * The default value is
3349 * 3349 *
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)
11 eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS)); 11 eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
12 if (!eo_obj) return NULL; 12 if (!eo_obj) return NULL;
13 13
14 efl_gfx_fill_filled_set(eo_obj, EINA_TRUE);
15 evas_obj_pass_events_set(eo_obj, EINA_TRUE); 14 evas_obj_pass_events_set(eo_obj, EINA_TRUE);
16 15
17 obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 16 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,
74 Efl.Gfx.Buffer.buffer_copy_set; 74 Efl.Gfx.Buffer.buffer_copy_set;
75 Efl.Gfx.Fill.fill.set; 75 Efl.Gfx.Fill.fill.set;
76 Efl.Gfx.Fill.fill.get; 76 Efl.Gfx.Fill.fill.get;
77 Efl.Gfx.Fill.filled.get; 77 Efl.Gfx.Fill.fill_auto.get;
78 Efl.Gfx.Fill.filled.set; 78 Efl.Gfx.Fill.fill_auto.set;
79 Efl.Gfx.Filter.filter_program.set; 79 Efl.Gfx.Filter.filter_program.set;
80 Efl.Gfx.View.view_size.get; 80 Efl.Gfx.View.view_size.get;
81 Evas.Filter.filter_input_alpha; 81 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)
16{ 16{
17 EINA_SAFETY_ON_FALSE_RETURN_VAL(eo_isa(eo_e, EVAS_CANVAS_CLASS), NULL); 17 EINA_SAFETY_ON_FALSE_RETURN_VAL(eo_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
18 return eo_add(EVAS_IMAGE_CLASS, eo_e, 18 return eo_add(EVAS_IMAGE_CLASS, eo_e,
19 efl_gfx_fill_filled_set(eo_self, EINA_FALSE), 19 efl_gfx_fill_auto_set(eo_self, EINA_FALSE),
20 evas_obj_legacy_ctor(eo_self)); 20 evas_obj_legacy_ctor(eo_self));
21} 21}
22 22
@@ -64,14 +64,14 @@ EAPI Eina_Bool
64evas_object_image_filled_get(const Evas_Object *eo_obj) 64evas_object_image_filled_get(const Evas_Object *eo_obj)
65{ 65{
66 EVAS_IMAGE_API(eo_obj, EINA_FALSE); 66 EVAS_IMAGE_API(eo_obj, EINA_FALSE);
67 return efl_gfx_fill_filled_get(eo_obj); 67 return efl_gfx_fill_auto_get(eo_obj);
68} 68}
69 69
70EAPI void 70EAPI void
71evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value) 71evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value)
72{ 72{
73 EVAS_IMAGE_API(eo_obj); 73 EVAS_IMAGE_API(eo_obj);
74 efl_gfx_fill_filled_set(eo_obj, value); 74 efl_gfx_fill_auto_set(eo_obj, value);
75} 75}
76 76
77EAPI void 77EAPI 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 *
214_evas_image_eo_base_finalize(Eo *eo_obj, Evas_Image_Data *o) 214_evas_image_eo_base_finalize(Eo *eo_obj, Evas_Image_Data *o)
215{ 215{
216 if (!o->filled_set) 216 if (!o->filled_set)
217 efl_gfx_fill_filled_set(eo_obj, EINA_TRUE); 217 efl_gfx_fill_auto_set(eo_obj, EINA_TRUE);
218 return eo_finalize(eo_super(eo_obj, MY_CLASS)); 218 return eo_finalize(eo_super(eo_obj, MY_CLASS));
219} 219}
220 220
@@ -490,7 +490,7 @@ _evas_image_efl_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_
490} 490}
491 491
492EOLIAN static void 492EOLIAN static void
493_evas_image_efl_gfx_fill_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting) 493_evas_image_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
494{ 494{
495 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 495 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
496 setting = !!setting; 496 setting = !!setting;
@@ -516,7 +516,7 @@ _evas_image_efl_gfx_fill_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool se
516} 516}
517 517
518EOLIAN static Eina_Bool 518EOLIAN static Eina_Bool
519_evas_image_efl_gfx_fill_filled_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) 519_evas_image_efl_gfx_fill_fill_auto_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
520{ 520{
521 return o->filled; 521 return o->filled;
522} 522}
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)
647 647
648 /* test eo defaults */ 648 /* test eo defaults */
649 o = eo_add(EVAS_IMAGE_CLASS, e); 649 o = eo_add(EVAS_IMAGE_CLASS, e);
650 fail_if(!efl_gfx_fill_filled_get(o)); 650 fail_if(!efl_gfx_fill_auto_get(o));
651 eo_del(o); 651 eo_del(o);
652 652
653 evas_free(e); 653 evas_free(e);