_e_comp_object_animating_begin(cw);
if (!_e_comp_object_effect_visibility_start(cw, 0)) return;
}
- evas_object_smart_callback_call(obj, "hiding", cw->ec);
+
+ wl_signal_emit(&cw->events.hiding, NULL);
+
cw->defer_hide = !!cw->animating;
if (!cw->animating)
e_comp_object_effect_set(obj, NULL);
#endif
wl_signal_init(&cw->events.show);
wl_signal_init(&cw->events.hide);
+ wl_signal_init(&cw->events.hiding);
#ifdef REFACTOR_DESK_AREA
wl_signal_init(&cw->events.set_layer);
wl_signal_init(&cw->events.stack_above);
wl_signal_add(&cw->events.hide, listener);
}
+EINTERN void
+e_comp_object_hiding_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+ API_ENTRY;
+ wl_signal_add(&cw->events.hiding, listener);
+}
+
#ifdef REFACTOR_DESK_AREA
EINTERN void
e_comp_object_set_layer_listener_add(Evas_Object *obj, struct wl_listener *listener)
#include "e_policy_intern.h"
#include "e_comp_wl_intern.h"
#include "e_config_intern.h"
+#include "e_comp_object_intern.h"
#include <wayland-server.h>
#include <tizen-extension-server-protocol.h>
E_Client_Hook *owner_del_hook;
} Defer_Job;
+
typedef struct
{
+ Conformant_Type type;
+ E_Client *ec;
+ E_Client *owner;
struct
- {
- E_Client *ec;
- E_Client *owner;
- struct
- {
- Eina_Bool restore;
- Eina_Bool visible;
- int x, y, w, h;
- Eina_Bool will_hide;
- } state;
+ {
+ Eina_Bool restore;
+ Eina_Bool visible;
+ int x, y, w, h;
+ Eina_Bool will_hide;
+ } state;
+
+ Eina_Bool changed : 1;
+ Eina_List *defer_jobs;
+ uint32_t last_serial;
- Eina_Bool changed : 1;
- Eina_List *defer_jobs;
- uint32_t last_serial;
- } part[CONFORMANT_TYPE_MAX];
+ // comp_object listeners
+ struct wl_listener comp_object_hiding;
+} Conformant_Part;
+
+typedef struct
+{
+ Conformant_Part part[CONFORMANT_TYPE_MAX];
Eina_Hash *client_hash;
Eina_List *handlers;
}
static void
-_conf_cb_part_obj_hiding(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_conf_part_cb_comp_object_hiding(struct wl_listener *listener, void *data)
{
- Conformant_Type type = (Conformant_Type)data;
+ Conformant_Part *conf_part;
- if (!g_conf)
- return;
+ conf_part = wl_container_of(listener, conf_part, comp_object_hiding);
- DBG("PART %s win(%zx), ec(%p) Hiding", _conf_type_to_str(type), e_client_util_win_get(g_conf->part[type].ec), g_conf->part[type].ec);
- _conf_state_update(type,
+ DBG("PART %s win(%zx), ec(%p) Hiding",
+ _conf_type_to_str(conf_part->type), e_client_util_win_get(conf_part->ec), conf_part->ec);
+
+ _conf_state_update(conf_part->type,
EINA_FALSE,
- g_conf->part[type].state.x,
- g_conf->part[type].state.y,
- g_conf->part[type].state.w,
- g_conf->part[type].state.h);
- g_conf->part[type].owner = NULL;
+ conf_part->state.x,
+ conf_part->state.y,
+ conf_part->state.w,
+ conf_part->state.h);
+
+ conf_part->owner = NULL;
}
+
static void
_conf_cb_part_obj_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
INF("%s Registered ec:%p", _conf_type_to_str(type), ec);
g_conf->part[type].ec = ec;
+ g_conf->part[type].type = type;
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL, _conf_cb_part_obj_del, (void*)type);
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW, _conf_cb_part_obj_show, (void*)type);
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOVE, _conf_cb_part_obj_move, (void*)type);
evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE, _conf_cb_part_obj_resize, (void*)type);
- evas_object_smart_callback_add(ec->frame, "hiding", _conf_cb_part_obj_hiding, (void*)type);
+ g_conf->part[type].comp_object_hiding.notify = _conf_part_cb_comp_object_hiding;
+ e_comp_object_hiding_listener_add(ec->frame, &g_conf->part[type].comp_object_hiding);
}
static void
return;
}
+ // wl_list remove
+ wl_list_remove(&g_conf->part[type].comp_object_hiding.link);
+
// deregister callback
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_DEL, _conf_cb_part_obj_del, (void*)type);
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_SHOW, _conf_cb_part_obj_show, (void*)type);
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_MOVE, _conf_cb_part_obj_move, (void*)type);
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_RESIZE, _conf_cb_part_obj_resize, (void*)type);
- evas_object_smart_callback_del_full(ec->frame, "hiding", _conf_cb_part_obj_hiding, (void*)type);
-
-
+ g_conf->part[type].type = CONFORMANT_TYPE_MAX;
g_conf->part[type].ec = NULL;
g_conf->part[type].state.will_hide = EINA_FALSE;
g_conf->part[type].last_serial = 0;