summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-11-07 13:08:12 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-11-07 13:08:12 -0500
commit50e4a3012632105dcfb49c50dce7acb4f993850c (patch)
treead5443e41e08fe1c276680e118ad952f1a011b07
parentd4614e1aadc7cc4a68cf526497c6708082bbf9b9 (diff)
add counter and smart callbacks for comp object visible mirrors
ref T2788
-rw-r--r--src/bin/e_comp_object.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index fd411bd19..90c0d9f0b 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -99,6 +99,7 @@ typedef struct _E_Comp_Object
99 99
100 unsigned int animating; // it's busy animating 100 unsigned int animating; // it's busy animating
101 unsigned int failures; //number of consecutive e_pixmap_image_draw() failures 101 unsigned int failures; //number of consecutive e_pixmap_image_draw() failures
102 unsigned int force_visible; //number of visible obj_mirror objects
102 Eina_Bool delete_pending : 1; // delete pending 103 Eina_Bool delete_pending : 1; // delete pending
103 Eina_Bool defer_hide : 1; // flag to get hide to work on deferred hide 104 Eina_Bool defer_hide : 1; // flag to get hide to work on deferred hide
104 Eina_Bool showing : 1; // object is currently in "show" animation 105 Eina_Bool showing : 1; // object is currently in "show" animation
@@ -191,6 +192,26 @@ _e_comp_object_cb_mirror_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
191 cw->obj_mirror = eina_list_remove(cw->obj_mirror, obj); 192 cw->obj_mirror = eina_list_remove(cw->obj_mirror, obj);
192} 193}
193 194
195static void
196_e_comp_object_cb_mirror_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
197{
198 E_Comp_Object *cw = data;
199
200 if ((!cw->force_visible) && (!e_object_is_del(E_OBJECT(cw->ec))))
201 evas_object_smart_callback_call(cw->smart_obj, "visibility_force", cw->ec);
202 cw->force_visible++;
203}
204
205static void
206_e_comp_object_cb_mirror_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
207{
208 E_Comp_Object *cw = data;
209
210 cw->force_visible--;
211 if ((!cw->force_visible) && (!e_object_is_del(E_OBJECT(cw->ec))))
212 evas_object_smart_callback_call(cw->smart_obj, "visibility_normal", cw->ec);
213}
214
194///////////////////////////////////// 215/////////////////////////////////////
195 216
196static inline Eina_Bool 217static inline Eina_Bool
@@ -3756,6 +3777,8 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
3756 evas_object_image_smooth_scale_set(o, e_comp_config_get()->smooth_windows); 3777 evas_object_image_smooth_scale_set(o, e_comp_config_get()->smooth_windows);
3757 cw->obj_mirror = eina_list_append(cw->obj_mirror, o); 3778 cw->obj_mirror = eina_list_append(cw->obj_mirror, o);
3758 evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _e_comp_object_cb_mirror_del, cw); 3779 evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _e_comp_object_cb_mirror_del, cw);
3780 evas_object_event_callback_add(o, EVAS_CALLBACK_SHOW, _e_comp_object_cb_mirror_show, cw);
3781 evas_object_event_callback_add(o, EVAS_CALLBACK_HIDE, _e_comp_object_cb_mirror_hide, cw);
3759 evas_object_data_set(o, "E_Client", cw->ec); 3782 evas_object_data_set(o, "E_Client", cw->ec);
3760 evas_object_data_set(o, "comp_mirror", cw); 3783 evas_object_data_set(o, "comp_mirror", cw);
3761 3784