}
group { name: "elm/notify/top/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/center/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "bt_dis_base.png" COMP;
}
type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0 ;
+ rel1.relative: 0.0 -1.0;
+ rel2.relative: 1.0 0.0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
}
}
}
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "clipper";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/bottom/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/left/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/right/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/top_left/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/top_right/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/bottom_left/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
group { name: "elm/notify/bottom_right/default";
//this group is a design similar to the inwin group
+ data.item: "emit_hide_finished_signal" "yes";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
transition: LINEAR 0.5;
}
program { name: "hide";
- signal: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
action: STATE_SET "default" 0.0;
target: "base";
+ transition: LINEAR 0.5;
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
}
}
}
static Eina_Bool
_timer_cb(void *data)
{
+ const char *hide_signal;
Evas_Object *obj = data;
ELM_NOTIFY_DATA_GET(obj, sd);
sd->timer = NULL;
if (!evas_object_visible_get(obj)) goto end;
- evas_object_hide(obj);
+ hide_signal = edje_object_data_get(sd->notify, "emit_hide_finished_signal");
+ if ((hide_signal) && (!strcmp(hide_signal, "yes")))
+ {
+ sd->in_timeout = EINA_TRUE;
+ edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
+ }
+ else //for backport supporting: edc without emitting hide finished signal
+ {
+ evas_object_hide(obj);
+ }
evas_object_smart_callback_call(obj, SIG_TIMEOUT, NULL);
end:
{
Elm_Notify_Smart_Data *sd = _pd;
+ sd->had_hidden = EINA_FALSE;
+ sd->in_timeout = EINA_FALSE;
eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
evas_object_show(sd->notify);
static void
_elm_notify_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
{
+ const char *hide_signal;
Elm_Notify_Smart_Data *sd = _pd;
+ if (sd->had_hidden && !sd->in_timeout)
+ return;
eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
- evas_object_hide(sd->notify);
- if (!sd->allow_events) evas_object_hide(sd->block_events);
+ hide_signal = edje_object_data_get(sd->notify, "emit_hide_finished_signal");
+ if ((hide_signal) && (!strcmp(hide_signal, "yes")))
+ {
+ if (!sd->in_timeout)
+ edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
+ }
+ else //for backport supporting: edc without emitting hide finished signal
+ {
+ evas_object_hide(sd->notify);
+ if (sd->allow_events) evas_object_hide(sd->block_events);
+ }
ELM_SAFE_FREE(sd->timer, ecore_timer_del);
}
if (ret) *ret = content;
}
+static void
+_hide_finished_cb(void *data,
+ Evas_Object *obj __UNUSED__,
+ const char *emission __UNUSED__,
+ const char *source __UNUSED__)
+{
+ ELM_NOTIFY_DATA_GET(data, sd);
+ sd->had_hidden = EINA_TRUE;
+ evas_object_hide(sd->notify);
+ if (!sd->allow_events) evas_object_hide(sd->block_events);
+}
+
static void
_elm_notify_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
{
evas_object_event_callback_add
(obj, EVAS_CALLBACK_RESTACK, _restack_cb, obj);
+ edje_object_signal_callback_add
+ (priv->notify, "elm,action,hide,finished", "elm", _hide_finished_cb, obj);
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_notify_align_set(obj, 0.5, 0.0);
{
Elm_Notify_Smart_Data *sd = _pd;
+ edje_object_signal_callback_del_full
+ (sd->notify, "elm,action,hide,finished", "elm", _hide_finished_cb, obj);
elm_notify_parent_set(obj, NULL);
elm_notify_allow_events_set(obj, EINA_FALSE);
if (sd->timer) ecore_timer_del(sd->timer);