e_comp_object: remove "hiding" smart call
[platform/upstream/enlightenment.git] / src / bin / e_comp_object.c
index de74523..07fdcb4 100644 (file)
@@ -1064,10 +1064,6 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
      e_comp_object_signal_emit(cw->smart_obj, "e,state,focused", "e");
    else
      e_comp_object_signal_emit(cw->smart_obj, "e,state,unfocused", "e");
-   if (cw->ec->sticky)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
-   if (cw->ec->hung)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,hung", "e");
    /* visibility must always be enabled for re_manage clients to prevent
     * pop-in animations every time the user sees a persistent client again;
     * applying visibility for iconic clients prevents the client from getting
@@ -1665,7 +1661,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
              e_client_size_set(cw->ec, w, h);
              cw->ec->client.w = w - cw->client_inset.l - cw->client_inset.r;
              cw->ec->client.h = h - cw->client_inset.t - cw->client_inset.b;
-             evas_object_smart_callback_call(obj, "client_resize", NULL);
+             wl_signal_emit(&cw->events.resize, NULL);
           }
         return;
      }
@@ -1759,7 +1755,7 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
        (((w - fw != pw) || (h - fh != ph))))
      {
         //INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph);
-        evas_object_smart_callback_call(obj, "client_resize", NULL);
+        wl_signal_emit(&cw->events.resize, NULL);
         /* flip for CSD */
         if (cw->frame_object || cw->ec->input_only)
           e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h);
@@ -1775,11 +1771,11 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
      }
    else
      {
-        evas_object_smart_callback_call(obj, "client_resize", NULL);
-
         /* flip for CSD */
         if ((!cw->frame_object) && (!cw->ec->input_only))
           w = pw, h = ph;
+
+        wl_signal_emit(&cw->events.resize, NULL);
         /* "just do it" for overrides */
         evas_object_resize(obj, w, h);
      }
@@ -2475,7 +2471,9 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
                     _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);
@@ -2517,8 +2515,6 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
          cw->visible, cw->animating, cw->defer_hide, cw->content_type, cw->updates, cw->w, cw->h,
          ec->iconic, ec->exp_iconify.by_client, ec->exp_iconify.type, ec->input_only, ec->ignored, ec->new_client);
 
-   if (ec->sticky)
-     e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
    if (cw->visible)
      {
         if (ec->iconic && cw->animating)
@@ -3020,36 +3016,6 @@ _e_comp_smart_cb_unfullscreen(void *data, Evas_Object *obj, void *event_info EIN
 }
 
 static void
-_e_comp_smart_cb_sticky(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
-   e_comp_object_signal_emit(obj, "e,state,sticky", "e");
-}
-
-static void
-_e_comp_smart_cb_unsticky(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
-   e_comp_object_signal_emit(obj, "e,state,unsticky", "e");
-}
-
-static void
-_e_comp_smart_cb_unhung(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,unhung", "e");
-}
-
-static void
-_e_comp_smart_cb_hung(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   E_Comp_Object *cw = data;
-
-   if (!cw->ec) return; //NYI
-   e_comp_object_signal_emit(cw->smart_obj, "e,state,hung", "e");
-}
-
-static void
 _e_comp_smart_focus_in(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
    e_comp_object_signal_emit(obj, "e,state,focused", "e");
@@ -3228,6 +3194,7 @@ _e_comp_smart_add(Evas_Object *obj)
 #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);
@@ -3238,6 +3205,7 @@ _e_comp_smart_add(Evas_Object *obj)
    wl_signal_init(&cw->events.content_type_set);
    wl_signal_init(&cw->events.color_set);
    wl_signal_init(&cw->events.color_visible_set);
+   wl_signal_init(&cw->events.resize);
 
    cw->smart_obj = obj;
    cw->x = cw->y = cw->w = cw->h = -1;
@@ -3270,12 +3238,6 @@ _e_comp_smart_add(Evas_Object *obj)
    evas_object_smart_callback_add(obj, "unmaximize", _e_comp_smart_cb_unmaximize, cw);
    evas_object_smart_callback_add(obj, "unfullscreen", _e_comp_smart_cb_unfullscreen, cw);
 
-   evas_object_smart_callback_add(obj, "stick", _e_comp_smart_cb_sticky, cw);
-   evas_object_smart_callback_add(obj, "unstick", _e_comp_smart_cb_unsticky, cw);
-
-   evas_object_smart_callback_add(obj, "hung", _e_comp_smart_cb_hung, cw);
-   evas_object_smart_callback_add(obj, "unhung", _e_comp_smart_cb_unhung, cw);
-
    evas_object_smart_callback_add(obj, "frame_recalc", _e_comp_smart_cb_frame_recalc, cw);
 
    evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN, _e_comp_smart_focus_in, cw);
@@ -3287,7 +3249,6 @@ _e_comp_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
 {
    INTERNAL_ENTRY;
    evas_object_color_set(cw->clip, r, g, b, a);
-   evas_object_smart_callback_call(obj, "color_set", NULL);
 }
 
 
@@ -6733,6 +6694,13 @@ e_comp_object_hide_listener_add(Evas_Object *obj, struct wl_listener *listener)
    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)
@@ -6790,3 +6758,10 @@ e_comp_object_color_visible_set_listener_add(Evas_Object *obj, struct wl_listene
    API_ENTRY;
    wl_signal_add(&cw->events.color_visible_set, listener);
 }
+
+EINTERN void
+e_comp_object_resize_listener_add(Evas_Object *obj, struct wl_listener *listener)
+{
+   API_ENTRY;
+   wl_signal_add(&cw->events.resize, listener);
+}