[Elementary.h.in]
authorChunEon Park <chuneon.park@samsung.com>
Fri, 6 Aug 2010 07:15:51 +0000 (16:15 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Fri, 6 Aug 2010 07:15:51 +0000 (16:15 +0900)
[elm_animator.c]
[elm_transit.c]

src/lib/Elementary.h.in
src/lib/elm_animator.c
src/lib/elm_transit.c

index 6557493..97558c6 100644 (file)
@@ -1957,8 +1957,6 @@ extern "C" {
    EAPI Eina_Bool     elm_animator_auto_reverse_get(Elm_Animator *animator);
    EAPI Eina_Bool     elm_animator_operating_get(Elm_Animator *animator);
    EAPI unsigned int  elm_animator_repeat_get(Elm_Animator *animator);
-   EAPI void           elm_animator_frame_pos_set(Elm_Animator *animator, double pos);
-   EAPI double         elm_animator_frame_pos_get(Elm_Animator *animator);
    EAPI void           elm_animator_pause(Elm_Animator *animator);
    EAPI void           elm_animator_resume(Elm_Animator *animator);
   
@@ -1981,8 +1979,6 @@ extern "C" {
    EAPI Eina_Bool    elm_transit_event_block_disabled_get(Elm_Transit *transit);  
    EAPI void           elm_transit_pause(Elm_Transit *transit);
    EAPI void                   elm_transit_resume(Elm_Transit *transit);
-   EAPI void                   elm_transit_frame_pos_set(Elm_Transit *transit, double pos);
-   EAPI double         elm_transit_frame_pos_get(Elm_Transit *transit);
 
    /* Translation FX */
    EAPI Elm_Effect  *elm_fx_translation_add(Evas_Object *obj, Evas_Coord from_x, Evas_Coord from_y, Evas_Coord to_x, Evas_Coord to_y);
index 96d088f..601b0c0 100644 (file)
@@ -13,7 +13,6 @@ struct _Animator
    Ecore_Animator *animator;
    double begin_time;
    double cur_time;
-   double prev_time;
    double duration;
    unsigned int repeat_cnt;
    unsigned int cur_repeat_cnt;
@@ -91,17 +90,13 @@ _animator_animate_cb(void *data)
    Elm_Animator *animator = (Elm_Animator *) data;
    double elapsed_time, frame, cur_time;
 
-   cur_time = ecore_loop_time_get();
-
-   animator->cur_time += (cur_time - animator->prev_time);
-   animator->prev_time = cur_time;
-
-   if(animator->cur_time > (animator->begin_time+animator->duration) ) {
-          animator->cur_time = animator->begin_time+animator->duration;
-   }
+   animator->cur_time = ecore_loop_time_get();
 
    elapsed_time = animator->cur_time - animator->begin_time;
 
+   if(elapsed_time > animator->duration)
+          elapsed_time = animator->duration;
+
    frame = animator->curve_op(elapsed_time / animator->duration);
 
    //Reverse?
@@ -401,51 +396,6 @@ elm_animator_resume(Elm_Animator *animator)
 }
 
 /**
- * Set the frame position
- *
- * @param  animator Animator object
- * @param frame_pos frame position (range:0 ~ 1)
- *
- * @ingroup Animator
- */
-EAPI void
-elm_animator_frame_pos_set(Elm_Animator *animator, double pos)
-{
-       double cur_time;
-
-       if(!animator)
-               return;
-
-       if(!animator->on_animating)
-               return ;
-
-       cur_time = animator->begin_time + (pos * animator->duration);
-
-       if(cur_time < animator->begin_time)
-               cur_time = animator->begin_time;
-
-       animator->prev_time = animator->cur_time = cur_time;
-       _animator_animate_cb(animator);
-}
-
-/**
- * Get the current frame position
- *
- * @param  animator Animator object
- * @return current frame position
- *
- * @ingroup Animator
- */
-EAPI double
-elm_animator_frame_pos_get(Elm_Animator* animator)
-{
-       if(!animator)
-               return 0;
-
-       return ((animator->cur_time - animator->begin_time) / animator->duration);
-}
-
-/**
  * Stop animator.
  *
  * @param animator Animator object 
@@ -494,7 +444,7 @@ elm_animator_animate(Elm_Animator *animator)
       return;
    if (!animator->animator_op)
       return;
-   animator->prev_time = animator->cur_time = animator->begin_time = ecore_loop_time_get();
+   animator->begin_time = ecore_loop_time_get();
    animator->cur_repeat_cnt = animator->repeat_cnt;
    if (!animator->animator) {
       animator->animator = ecore_animator_add(_animator_animate_cb, animator);
index 1f59dd3..38cb786 100644 (file)
@@ -530,41 +530,6 @@ elm_transit_resume(Elm_Transit *transit)
        elm_animator_resume(transit->animator);
 }
 
-/**
- * Get the current frame position
- *
- * @param  transit Transit
- * @return current frame position (range: 0~1)
- *
- * @ingroup Transit
- */
-EAPI void
-elm_transit_frame_pos_set(Elm_Transit *transit, double pos)
-{
-       if(!transit)
-               return;
-
-       elm_animator_frame_pos_set(transit->animator, pos);
-}
-
-/**
- * Get the current frame position
- *
- * @param  transit Transit
- * @return current frame position
- *
- * @ingroup Transit
- */
-EAPI double
-elm_transit_frame_pos_get(Elm_Transit *transit )
-{
-       if(!transit)
-               return 0;
-
-       return elm_animator_frame_pos_get(transit->animator);
-}
-
-
 
 
 /////////////////////////////////////////////////////////////////////////////////////