int user_b;
int user_a;
} transparent;
+
+ struct
+ {
+ struct wl_signal lower;
+ struct wl_signal show;
+ struct wl_signal hide;
+ } events;
} E_Comp_Object;
typedef struct _E_Input_Rect_Data
}
static void
-_e_comp_object_lower(Evas_Object *obj)
+_e_comp_object_lower(E_Comp_Object *cw, Evas_Object *obj)
{
evas_object_lower(obj);
#ifdef REFACTOR_FOCUS_POLICY
{
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RESTACK, ec);
- _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_LOWER, ec);
+ wl_signal_emit_mutable(&cw->events.lower, NULL);
}
#else
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_RESTACK, ec);
if (cw->ec->layer_pending)
e_comp_object_layer_update(obj, NULL, obj);
- _e_comp_object_lower(obj);
+ _e_comp_object_lower(cw, obj);
goto end;
}
if (!EINA_INLIST_GET(cw->ec)->prev) goto end; //already lowest on layer
if (evas_object_layer_get(o) != evas_object_layer_get(obj)) goto end; //already at bottom!
if (obj == e_comp->layers[cw->layer].obj) goto end; //never lower a layer marker!
evas_object_data_set(obj, "client_restack", (void*)1);
- _e_comp_object_lower(obj);
+ _e_comp_object_lower(cw, obj);
evas_object_data_del(obj, "client_restack");
if (!cw->visible) goto end;
e_comp_render_queue();
ELOGF("COMP", "Hide hidden evas_object:%p", cw->ec, obj);
evas_object_hide(obj);
#ifdef REFACTOR_FOCUS_POLICY
- _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_HIDE, cw->ec);
+ wl_signal_emit_mutable(&cw->events.hide, NULL);
#endif
return;
}
ELOGF("COMP", "Hide input_only evas_object:%p", cw->ec, obj);
evas_object_hide(obj);
#ifdef REFACTOR_FOCUS_POLICY
- _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_HIDE, cw->ec);
+ wl_signal_emit_mutable(&cw->events.hide, NULL);
#endif
return;
}
ELOGF("COMP", "Hide normal object:%p", cw->ec, obj);
evas_object_hide(obj);
#ifdef REFACTOR_FOCUS_POLICY
- _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_HIDE, cw->ec);
+ wl_signal_emit_mutable(&cw->events.hide, NULL);
#endif
}
#ifdef REFACTOR_FOCUS_POLICY
_e_comp_object_hook_call(E_COMP_OBJECT_HOOK_SHOW, cw->ec);
+ wl_signal_emit_mutable(&cw->events.show, NULL);
#endif
}
cw = E_NEW(E_Comp_Object, 1);
EINA_SAFETY_ON_NULL_RETURN(cw);
+ wl_signal_init(&cw->events.lower);
+ wl_signal_init(&cw->events.show);
+ wl_signal_init(&cw->events.hide);
+
cw->smart_obj = obj;
cw->x = cw->y = cw->w = cw->h = -1;
evas_object_smart_data_set(obj, cw);
return evas_object_render_op_get(cw->obj);
}
+
+EINTERN void
+e_comp_object_lower_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.lower, listener);
+}
+
+EINTERN struct wl_listener *
+e_comp_object_lower_listener_get(Evas_Object *obj, wl_notify_func_t notify)
+{
+ API_ENTRY NULL;
+ return wl_signal_get(&cw->events.lower, notify);
+}
+
+EINTERN void
+e_comp_object_show_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.show, listener);
+}
+
+EINTERN struct wl_listener *
+e_comp_object_show_listener_get(Evas_Object *obj, wl_notify_func_t notify)
+{
+ API_ENTRY NULL;
+ return wl_signal_get(&cw->events.show, notify);
+}
+
+EINTERN void
+e_comp_object_hide_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.hide, listener);
+}
+
+EINTERN struct wl_listener *
+e_comp_object_hide_listener_get(Evas_Object *obj, wl_notify_func_t notify)
+{
+ API_ENTRY NULL;
+ return wl_signal_get(&cw->events.hide, notify);
+}