summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-07 15:41:35 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-07 15:41:35 +0900
commitf161edc3f3f13feb57ea118de506c2f0e8903fae (patch)
treee8490e68b2fad5f5134598a6472931423b9e9952
parentc1a3ec99403402c156af1ecc3c827ef6b8550cff (diff)
downloadenlightenment-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.c16
-rw-r--r--src/bin/e_client_volume.h1
-rw-r--r--src/bin/e_comp_object.c15
-rw-r--r--src/bin/e_comp_object.h2
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