diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-11-07 15:41:35 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-11-07 15:41:35 +0900 |
commit | f161edc3f3f13feb57ea118de506c2f0e8903fae (patch) | |
tree | e8490e68b2fad5f5134598a6472931423b9e9952 | |
parent | c1a3ec99403402c156af1ecc3c827ef6b8550cff (diff) | |
download | enlightenment-f161edc3f3f13feb57ea118de506c2f0e8903fae.tar.gz |
comp object -> propgate signals to the volume objects from the frame
if frame changes (eg by focus signals) the volume object cant adapt.
send signals to it too so it can adapt if it wants to.
@feat
-rw-r--r-- | src/bin/e_client_volume.c | 16 | ||||
-rw-r--r-- | src/bin/e_client_volume.h | 1 | ||||
-rw-r--r-- | src/bin/e_comp_object.c | 15 | ||||
-rw-r--r-- | src/bin/e_comp_object.h | 2 |
4 files changed, 33 insertions, 1 deletions
diff --git a/src/bin/e_client_volume.c b/src/bin/e_client_volume.c index aea8fd648b..d1a4eaa6ee 100644 --- a/src/bin/e_client_volume.c +++ b/src/bin/e_client_volume.c @@ -430,7 +430,6 @@ e_client_volume_object_add(E_Client *ec, Evas *evas) edje_object_message_send(o, EDJE_MESSAGE_INT_SET, 0, msg); edje_object_signal_emit(o, "e,action,volume,change", "e"); evas_object_show(o); - } if (edje_object_part_exists(bx, "e.swallow.volume")) { @@ -464,3 +463,18 @@ e_client_volume_object_add(E_Client *ec, Evas *evas) _e_client_volume_object_del_cb, handlers); return bx; } + +E_API void +e_client_volume_object_emit(E_Client *ec, const char *sig, const char *src) +{ + Evas_Object *o; + + EINA_SAFETY_ON_NULL_RETURN(ec); + o = e_comp_object_frame_volume_get(ec->frame); + if (o) + { + edje_object_signal_emit(o, sig, src); + o = edje_object_part_swallow_get(o, "e.swallow.volume_icon"); + if (o) edje_object_signal_emit(o, sig, src); + } +} diff --git a/src/bin/e_client_volume.h b/src/bin/e_client_volume.h index 68e172b673..12ae836289 100644 --- a/src/bin/e_client_volume.h +++ b/src/bin/e_client_volume.h @@ -55,5 +55,6 @@ E_API void e_client_volume_sink_remove(E_Client *ec, E_Client_Volume_Sin E_API void e_client_volume_sink_update(E_Client_Volume_Sink *mixer); E_API void e_client_volume_display_set(E_Client *ec, int volume, Eina_Bool mute); +E_API void e_client_volume_object_emit(E_Client *ec, const char *sig, const char *src); #endif diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 2fb36f415d..2468e689d1 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3700,6 +3700,7 @@ e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src) API_ENTRY; //INF("EMIT %p: %s %s", cw->ec, sig, src); edje_object_signal_emit(cw->shobj, sig, src); + e_client_volume_object_emit(cw->ec, sig, src); if (cw->frame_object) edje_object_signal_emit(cw->frame_object, sig, src); if (cw->frame_icon && e_icon_edje_get(cw->frame_icon)) edje_object_signal_emit(e_icon_edje_get(cw->frame_icon), sig, src); @@ -4630,3 +4631,17 @@ e_comp_object_util_autoclose(Evas_Object *obj, E_Comp_Object_Autoclose_Cb del_cb evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show, e_comp); evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp); } + +E_API Evas_Object * +e_comp_object_frame_icon_get(Evas_Object *obj) +{ + API_ENTRY NULL; + return cw->frame_icon; +} + +E_API Evas_Object * +e_comp_object_frame_volume_get(Evas_Object *obj) +{ + API_ENTRY NULL; + return cw->frame_volume; +} diff --git a/src/bin/e_comp_object.h b/src/bin/e_comp_object.h index 106b4e81b3..aa62ce1b19 100644 --- a/src/bin/e_comp_object.h +++ b/src/bin/e_comp_object.h @@ -94,6 +94,8 @@ E_API Eina_Bool e_comp_object_effect_stop(Evas_Object *obj, Edje_Signal_Cb end_c E_API E_Comp_Object_Mover *e_comp_object_effect_mover_add(int pri, const char *sig, E_Comp_Object_Mover_Cb provider, const void *data); E_API void e_comp_object_effect_mover_del(E_Comp_Object_Mover *prov); E_API void e_comp_object_frame_volume_update(Evas_Object *obj); +E_API Evas_Object *e_comp_object_frame_icon_get(Evas_Object *obj); +E_API Evas_Object *e_comp_object_frame_volume_get(Evas_Object *obj); #endif #endif |