ecore_wl2: support tizen_effect_listener
authorJuyeon Lee <juyeonne.lee@samsung.com>
Fri, 10 Nov 2017 08:11:30 +0000 (17:11 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 19 Dec 2017 05:34:13 +0000 (14:34 +0900)
@tizen_feature

Change-Id: I28e014ed935a6ae31aff63fc2bf0194cfa9ec3ee

src/lib/ecore_wl2/ecore_wl2_display.c
src/lib/elementary/efl_ui_win.c

index 7c6544b..17a5821 100644 (file)
@@ -400,11 +400,35 @@ static const struct tizen_policy_ext_listener _tizen_policy_ext_listener =
 static void
 _tizen_effect_cb_start(void *data EINA_UNUSED, struct tizen_effect *tizen_effect EINA_UNUSED, struct wl_surface *surface_resource, unsigned int type)
 {
+   struct wl_surface *surface = surface_resource;
+   Ecore_Wl2_Window *win = NULL;
+   Ecore_Wl2_Event_Effect_Start *ev;
+
+   if (!surface) return;
+   win = ecore_wl2_window_surface_find(surface);
+   if (!win) return;
+
+   if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Effect_Start)))) return;
+   ev->win = win->id;
+   ev->type = type;
+   ecore_event_add(ECORE_WL2_EVENT_EFFECT_START, ev, NULL, NULL);
 }
 
 static void
 _tizen_effect_cb_end(void *data EINA_UNUSED, struct tizen_effect *tizen_effect EINA_UNUSED, struct wl_surface *surface_resource, unsigned int type)
 {
+   struct wl_surface *surface = surface_resource;
+   Ecore_Wl2_Window *win = NULL;
+   Ecore_Wl2_Event_Effect_End *ev;
+
+   if (!surface) return;
+   win = ecore_wl2_window_surface_find(surface);
+   if (!win) return;
+
+   if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Effect_End)))) return;
+   ev->win = win->id;
+   ev->type = type;
+   ecore_event_add(ECORE_WL2_EVENT_EFFECT_END, ev, NULL, NULL);
 }
 
 static const struct tizen_effect_listener _tizen_effect_listener =
index df76348..8b85ac6 100644 (file)
@@ -4325,7 +4325,7 @@ _elm_win_wl_effect_start(void *data, int type EINA_UNUSED, void *event)
 
    if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON;
 
-   if ((ecore_wl2_window_id_get(sd->wl.win) != e->win))
+   if (ecore_wl2_window_id_get(sd->wl.win) != e->win)
      return ECORE_CALLBACK_PASS_ON;
 
    evas_object_smart_callback_call(data, SIG_EFFECT_STARTED, (void*)e->type);
@@ -4342,10 +4342,10 @@ _elm_win_wl_effect_end(void *data, int type EINA_UNUSED, void *event)
 
    if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON;
 
-   if ((ecore_wl2_window_id_get(sd->wl.win) != e->win))
+   if (ecore_wl2_window_id_get(sd->wl.win) != e->win)
      return ECORE_CALLBACK_PASS_ON;
 
-     evas_object_smart_callback_call(data, SIG_EFFECT_DONE, (void*)e->type);
+   evas_object_smart_callback_call(data, SIG_EFFECT_DONE, (void*)e->type);
 
    return ECORE_CALLBACK_PASS_ON;
 }