summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermet@hermet.pe.kr>2016-02-14 20:45:50 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-02-14 20:48:23 +0900
commit9fceae128e2f38cf2317c723c7def2ac4c49ad18 (patch)
tree42062c0cfd7cb18ccb4f14b3acdd37dd2437d904
parent8150643523176ff2bece967177ac56b21d1182a5 (diff)
transit: rename from elm_transit_revert_go() to elm_transit_revert()
elm_transit_revert_go() sounds like it triggers animation on reverse way. but this api acutally just change a current state. It doesn't trigger the transtion.
-rw-r--r--src/bin/test_transit.c2
-rw-r--r--src/bin/test_transit_bezier.c2
-rw-r--r--src/lib/elm_transit.c11
-rw-r--r--src/lib/elm_transit.h3
4 files changed, 12 insertions, 6 deletions
diff --git a/src/bin/test_transit.c b/src/bin/test_transit.c
index bfdd2d95a..17b3911d3 100644
--- a/src/bin/test_transit.c
+++ b/src/bin/test_transit.c
@@ -25,7 +25,7 @@ static void
25_transit_revert(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 25_transit_revert(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
26{ 26{
27 Elm_Transit *trans = (Elm_Transit*)data; 27 Elm_Transit *trans = (Elm_Transit*)data;
28 elm_transit_revert_go(trans); 28 elm_transit_revert(trans);
29} 29}
30 30
31static void 31static void
diff --git a/src/bin/test_transit_bezier.c b/src/bin/test_transit_bezier.c
index 24966e8cc..d44866632 100644
--- a/src/bin/test_transit_bezier.c
+++ b/src/bin/test_transit_bezier.c
@@ -29,7 +29,7 @@ static void
29_transit_revert(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 29_transit_revert(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
30{ 30{
31 Elm_Transit *trans = (Elm_Transit*)data; 31 Elm_Transit *trans = (Elm_Transit*)data;
32 elm_transit_revert_go(trans); 32 elm_transit_revert(trans);
33} 33}
34 34
35static void 35static void
diff --git a/src/lib/elm_transit.c b/src/lib/elm_transit.c
index ea70529b2..13f6d78f6 100644
--- a/src/lib/elm_transit.c
+++ b/src/lib/elm_transit.c
@@ -773,10 +773,13 @@ elm_transit_duration_get(const Elm_Transit *transit)
773 return transit->time.duration; 773 return transit->time.duration;
774} 774}
775 775
776EAPI void 776EAPI Eina_Bool
777elm_transit_revert_go(Elm_Transit *transit) 777elm_transit_revert(Elm_Transit *transit)
778{ 778{
779 ELM_TRANSIT_CHECK_OR_RETURN(transit); 779 ELM_TRANSIT_CHECK_OR_RETURN(transit, EINA_FALSE);
780
781 if (!transit->animator) return EINA_FALSE;
782
780 if (transit->revert_mode) 783 if (transit->revert_mode)
781 { 784 {
782 transit->total_revert_time += transit->time.revert_elapsed; 785 transit->total_revert_time += transit->time.revert_elapsed;
@@ -788,6 +791,8 @@ elm_transit_revert_go(Elm_Transit *transit)
788 transit->time.revert_elapsed = 0; 791 transit->time.revert_elapsed = 0;
789 transit->revert_begin_progress = 0; 792 transit->revert_begin_progress = 0;
790 } 793 }
794
795 return EINA_TRUE;
791} 796}
792 797
793EAPI void 798EAPI void
diff --git a/src/lib/elm_transit.h b/src/lib/elm_transit.h
index 6464d52c6..ced665648 100644
--- a/src/lib/elm_transit.h
+++ b/src/lib/elm_transit.h
@@ -591,11 +591,12 @@ EAPI void elm_transit_go(Elm_Transit *transit);
591 * @note @p transit can not be NULL 591 * @note @p transit can not be NULL
592 * 592 *
593 * @param transit The transit object. 593 * @param transit The transit object.
594 * @return @c EINA_TRUE if transition is reverted, @c EINA_FALSE otherwise.
594 * 595 *
595 * @since 1.18 596 * @since 1.18
596 * @ingroup Transit 597 * @ingroup Transit
597 */ 598 */
598EAPI void elm_transit_revert_go(Elm_Transit *transit); 599EAPI Eina_Bool elm_transit_revert(Elm_Transit *transit);
599 600
600/** 601/**
601 * Starts the transition in given seconds. 602 * Starts the transition in given seconds.