forked from enlightenment/enlightenment
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
This commit is contained in:
parent
c1a3ec9940
commit
f161edc3f3
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue