aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-10-07 16:25:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-12 11:25:55 +0900
commit52969ccd9beec884c330736b15e2776d4faf5154 (patch)
treef176612250a66e7491eb314d33153b771f9ef46b /src/lib
parentevas: Add pseudo-internal API to intercept basic calls (diff)
downloadefl-52969ccd9beec884c330736b15e2776d4faf5154.tar.gz
evas: Remove method group_color_set
Widgets should simply override efl_gfx_color_set and call super all the way up to evas object. Legacy compatibility with call interceptors and early call abortion (eg. delete_me or obj->layer == NULL) are implemented with an internal call. See the previous commit introducing the API.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/efl_ui_image.c7
-rw-r--r--src/lib/elementary/efl_ui_image.eo2
-rw-r--r--src/lib/elementary/elm_widget.c5
-rw-r--r--src/lib/elementary/elm_widget.eo2
-rw-r--r--src/lib/emotion/efl_canvas_video.eo2
-rw-r--r--src/lib/emotion/emotion_smart.c6
-rw-r--r--src/lib/evas/canvas/efl_canvas_group.eo12
-rw-r--r--src/lib/evas/canvas/efl_canvas_group_clipped.eo2
-rw-r--r--src/lib/evas/canvas/evas_object_main.c7
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c10
-rw-r--r--src/lib/evas/canvas/evas_object_smart_clipped.c2
11 files changed, 24 insertions, 33 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 1d02c897b5..4ee2e14fef 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -621,9 +621,12 @@ _efl_ui_image_efl_canvas_group_group_member_add(Eo *obj, Efl_Ui_Image_Data *sd,
}
EOLIAN static void
-_efl_ui_image_efl_canvas_group_group_color_set(Eo *obj, Efl_Ui_Image_Data *sd, int r, int g, int b, int a)
+_efl_ui_image_efl_gfx_color_set(Eo *obj, Efl_Ui_Image_Data *sd, int r, int g, int b, int a)
{
- efl_canvas_group_color_set(efl_super(obj, MY_CLASS), r, g, b, a);
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_COLOR_SET, 0, r, g, b, a))
+ return;
+
+ efl_gfx_color_set(efl_super(obj, MY_CLASS), r, g, b, a);
evas_object_color_set(sd->hit_rect, 0, 0, 0, 0);
evas_object_color_set(sd->img, r, g, b, a);
diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo
index 165576875d..9f04fe30a4 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -122,6 +122,7 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.File.file.set;
Efl.File.file.get;
Efl.File.mmap.set;
+ Efl.Gfx.color.set;
Efl.Gfx.View.view_size.get;
Efl.Image.Load.load_size.set;
Efl.Image.Load.load_size.get;
@@ -143,7 +144,6 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.Canvas.Group.group_clip.set;
Efl.Canvas.Group.group_clip_unset;
Efl.Canvas.Group.group_show;
- Efl.Canvas.Group.group_color.set;
Efl.Canvas.Group.group_move;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index ee3da4d063..937de3a925 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -559,11 +559,14 @@ _elm_widget_efl_canvas_group_group_hide(Eo *obj, Elm_Widget_Smart_Data *_pd)
}
EOLIAN static void
-_elm_widget_efl_canvas_group_group_color_set(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, int r, int g, int b, int a)
+_elm_widget_efl_gfx_color_set(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, int r, int g, int b, int a)
{
Eina_Iterator *it;
Evas_Object *o;
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_COLOR_SET, 0, r, g, b, a))
+ return;
+
it = evas_object_smart_iterator_new(obj);
EINA_ITERATOR_FOREACH(it, o)
{
diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo
index e9adc4bd30..ac6def3bbb 100644
--- a/src/lib/elementary/elm_widget.eo
+++ b/src/lib/elementary/elm_widget.eo
@@ -847,12 +847,12 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter
Efl.Object.destructor;
Efl.Object.dbg_info_get;
Efl.Object.provider_find;
+ Efl.Gfx.color.set;
Efl.Canvas.Object.no_render.set;
Efl.Canvas.Group.group_hide;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_clip_unset;
Efl.Canvas.Group.group_show;
- Efl.Canvas.Group.group_color.set;
Efl.Canvas.Group.group_move;
Efl.Canvas.Group.group_member_del;
Efl.Canvas.Group.group_add;
diff --git a/src/lib/emotion/efl_canvas_video.eo b/src/lib/emotion/efl_canvas_video.eo
index c6e797ae0c..64b920c1d0 100644
--- a/src/lib/emotion/efl_canvas_video.eo
+++ b/src/lib/emotion/efl_canvas_video.eo
@@ -51,13 +51,13 @@ class Efl.Canvas.Video (Efl.Canvas.Group, Efl.File, Efl.Player, Efl.Image, Efl.I
}
implements {
Efl.Object.constructor;
+ Efl.Gfx.color.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_move;
Efl.Canvas.Group.group_resize;
Efl.Canvas.Group.group_show;
Efl.Canvas.Group.group_hide;
- Efl.Canvas.Group.group_color.set;
Efl.Canvas.Group.group_clip.set;
Efl.Canvas.Group.group_clip_unset;
Efl.File.file.set;
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 3ec92c5fa8..3a9ebdeec0 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -1966,8 +1966,12 @@ _efl_canvas_video_efl_canvas_group_group_hide(Evas_Object *obj EINA_UNUSED, Efl_
}
EOLIAN static void
-_efl_canvas_video_efl_canvas_group_group_color_set(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, int r, int g, int b, int a)
+_efl_canvas_video_efl_gfx_color_set(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int r, int g, int b, int a)
{
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_COLOR_SET, 0, r, g, b, a))
+ return;
+
+ efl_gfx_color_set(efl_super(obj, MY_CLASS), r, g, b, a);
evas_object_color_set(sd->obj, r, g, b, a);
evas_object_color_set(sd->crop.clipper, r, g, b, a);
}
diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo
index 0a3657a804..32b1168472 100644
--- a/src/lib/evas/canvas/efl_canvas_group.eo
+++ b/src/lib/evas/canvas/efl_canvas_group.eo
@@ -87,18 +87,6 @@ class Efl.Canvas.Group (Efl.Canvas.Object)
clip: Efl.Canvas.Object;
}
}
- @property group_color {
- set {
- [[No description supplied by the EAPI.]]
- legacy: null;
- }
- values {
- r: int;
- g: int;
- b: int;
- a: int;
- }
- }
group_show {
[[No description supplied by the EAPI.]]
legacy: null;
diff --git a/src/lib/evas/canvas/efl_canvas_group_clipped.eo b/src/lib/evas/canvas/efl_canvas_group_clipped.eo
index 8a57f6f789..6e04df518a 100644
--- a/src/lib/evas/canvas/efl_canvas_group_clipped.eo
+++ b/src/lib/evas/canvas/efl_canvas_group_clipped.eo
@@ -3,12 +3,12 @@ abstract Efl.Canvas.Group.Clipped (Efl.Canvas.Group)
[[Internal class representing a canvas object group with a clipper.]]
data: Evas_Object_Smart_Clipped_Data;
implements {
+ Efl.Gfx.color.set;
Efl.Canvas.Object.no_render.set;
Efl.Canvas.Group.group_hide;
Efl.Canvas.Group.group_clip.set;
Efl.Canvas.Group.group_clip_unset;
Efl.Canvas.Group.group_show;
- Efl.Canvas.Group.group_color.set;
Efl.Canvas.Group.group_move;
Efl.Canvas.Group.group_member_del;
Efl.Canvas.Group.group_add;
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index e2a38ac589..fe7ea0e43a 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1520,8 +1520,11 @@ _efl_canvas_object_efl_gfx_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
- if (obj->is_smart)
- efl_canvas_group_color_set(eo_obj, r, g, b, a);
+ if (obj->is_smart && obj->smart.smart->smart_class &&
+ obj->smart.smart->smart_class->color_set)
+ {
+ obj->smart.smart->smart_class->color_set(eo_obj, r, g, b, a);
+ }
evas_object_clip_dirty(eo_obj, obj);
if ((prev_a == 0) && (a == 0) && (obj->cur->render_op == EVAS_RENDER_BLEND)) return;
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index b09f814acd..5e13239d63 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -650,16 +650,6 @@ _efl_canvas_group_group_hide(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
}
EOLIAN static void
-_efl_canvas_group_group_color_set(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, int r, int g, int b, int a)
-{
- // If this function is reached, so we do nothing except trying to call
- // the function of the legacy smart class.
- Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- Evas_Smart *s = obj->smart.smart;
- if (s && s->smart_class->color_set) s->smart_class->color_set(eo_obj, r, g, b, a);
-}
-
-EOLIAN static void
_efl_canvas_group_group_clip_set(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, Evas_Object *clip)
{
// If this function is reached, so we do nothing except trying to call
diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c
index bf80f4fc56..b0f1a09e80 100644
--- a/src/lib/evas/canvas/evas_object_smart_clipped.c
+++ b/src/lib/evas/canvas/evas_object_smart_clipped.c
@@ -163,7 +163,7 @@ evas_object_smart_clipped_smart_color_set(Evas_Object *eo_obj, int r, int g, int
}
EOLIAN static void
-_efl_canvas_group_clipped_efl_canvas_group_group_color_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, int r, int g, int b, int a)
+_efl_canvas_group_clipped_efl_gfx_color_set(Eo *eo_obj, Evas_Object_Smart_Clipped_Data *obj EINA_UNUSED, int r, int g, int b, int a)
{
evas_object_smart_clipped_smart_color_set(eo_obj, r, g, b, a);
}