pui_sample : modify to resume the paused animation 80/220680/1
authorSung-Jin Park <sj76.park@samsung.com>
Tue, 3 Sep 2019 02:34:36 +0000 (11:34 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Fri, 20 Dec 2019 07:22:59 +0000 (16:22 +0900)
Change-Id: Id8e859037ed38a19330ec402550a8038b59adb4b
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
samples/PUI_sample.c

index a6b04d5..c8b16e0 100644 (file)
@@ -212,7 +212,7 @@ _cb_ani_stopped(void *data, int type EINA_UNUSED, void *event)
 }
 
 static Eina_Bool
-_cb_ani_ready_to_start(void *data, int type EINA_UNUSED, void *event)
+_cb_ani_ready_to_resume(void *data, int type EINA_UNUSED, void *event)
 {
        app_data_t *app = (app_data_t *)data;
        PUI_Event_Animation_Status *ev;
@@ -221,7 +221,8 @@ _cb_ani_ready_to_start(void *data, int type EINA_UNUSED, void *event)
        ev = event;
        debug_info("[%s] ani id=%s, status=%d, window=0x%x\n", __FUNCTION__, pui_ani_get_id(ev->ani_h), ev->status, ev->win);
 
-       /* start animation */
+       /* resume animation */
+       app->ani_idx--;
        ani_collection_play(app);
 
        return ECORE_CALLBACK_PASS_ON;
@@ -251,7 +252,7 @@ event_handlers_init(app_data_t *app)
        h = ecore_event_handler_add(PUI_EVENT_ANI_STOPPED, _cb_ani_stopped, app);
        eina_array_push(_ecore_event_hdls, h);
 
-       h = ecore_event_handler_add(PUI_EVENT_ANI_READY_TO_START, _cb_ani_ready_to_start, app);
+       h = ecore_event_handler_add(PUI_EVENT_ANI_READY_TO_RESUME, _cb_ani_ready_to_resume, app);
        eina_array_push(_ecore_event_hdls, h);
 }