[elm_animator.c] removed delete parent delete calllback
authorChunEon Park <chuneon.park@samsung.com>
Tue, 13 Jul 2010 13:52:22 +0000 (22:52 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Tue, 13 Jul 2010 13:52:22 +0000 (22:52 +0900)
debian/changelog
src/lib/elm_animator.c
src/lib/elm_coverflow.c
src/lib/elm_ctxpopup.c
src/lib/elm_pager.c

index 8fb9027..435e170 100644 (file)
@@ -2,7 +2,7 @@ elementary (0.4.0+svn.49550slp2+3build16) unstable; urgency=low
 
   * repackaging.
   * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/EFL-pkgs/elementary
-  * Tag: elementary_0.4.0+svn.49550slp2+3build15
+  * Tag: elementary_0.4.0+svn.49550slp2+3build16
 
  -- ChunEon Park <chuneon.park@samsung.com>  Mon, 12 Jul 2010 19:51:42 +0900
 
index 30b2c74..4b4098a 100644 (file)
@@ -57,30 +57,30 @@ static double
 _animator_curve_in_out(double frame)
 {
    if (frame < 0.5)
-      return _animator_curve_out(frame * 2) * 0.5;
+      return _animator_curve_in(frame * 2) * 0.5;
    else
-      return (_animator_curve_in(frame * 2 - 1) * 0.5) + 0.5;
+      return (_animator_curve_out(frame * 2 - 1) * 0.5) + 0.5;
 }
 
 static double
 _animator_curve_in(double frame)
 {
-   return sqrt(1 - pow(frame - 1, 2));
+   return 1 - sqrt(1 - pow(frame, 2));
 }
 
 static double
 _animator_curve_out(double frame)
 {
-   return 1 - sqrt(1 - pow(frame, 2));
+   return sqrt(1 - pow(frame - 1, 2));
 }
 
 static void
 _delete_animator(Elm_Animator *animator)
 {
-   if (animator->animator)
+       if (animator->animator)
      {
-       ecore_animator_del(animator->animator);
-       animator->animator = NULL;
+                ecore_animator_del(animator->animator);
+               animator->animator = NULL;
      }
 }
 
@@ -131,7 +131,8 @@ _animator_animate_cb(void *data)
 static void
 _animator_parent_del(void *data)
 {
-   elm_animator_del(data);
+       Elm_Animator* animator = data; //
+       //elm_animator_del(data);
 }
 
 /**
@@ -285,9 +286,10 @@ elm_animator_add(Evas_Object *parent)
    elm_animator_auto_reverse_set(animator, EINA_FALSE);
    elm_animator_curve_style_set(animator, ELM_ANIMATOR_CURVE_LINEAR);
 
-   if (parent)
+   if (parent) {
       evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
                                     _animator_parent_del, animator);
+       }
 
    animator->parent = parent;
 
@@ -322,10 +324,13 @@ elm_animator_del(Elm_Animator *animator)
 {
    if (!animator)
       return;
-   _delete_animator(animator);
-   
-   if(animator->parent) 
+
+       _delete_animator(animator);
+
+   if(animator->parent) {
        evas_object_event_callback_del(animator->parent, EVAS_CALLBACK_DEL, _animator_parent_del);
+       }
+
    free(animator);
 }
 
@@ -363,7 +368,7 @@ elm_animator_stop(Elm_Animator *animator)
    if (!animator)
       return;
    animator->on_animating = EINA_FALSE;
-   _delete_animator(animator);
+       _delete_animator(animator);
 }
 
 /**
@@ -401,8 +406,9 @@ elm_animator_animate(Elm_Animator *animator)
       return;
    animator->begin_time = ecore_loop_time_get();
    animator->cur_repeat_cnt = animator->repeat_cnt;
-   if (!animator->animator) 
+   if (!animator->animator) {
       animator->animator = ecore_animator_add(_animator_animate_cb, animator);
+       }
    if (animator->animator)
       animator->on_animating = EINA_TRUE;
 }
index b9f31e4..200312c 100644 (file)
@@ -516,7 +516,8 @@ static void _render_visible_items( Widget_Data* wd )
 static void _mouse_down_ev( void* data, Evas* evas, Evas_Object* obj, void* event_info )
 {
        Widget_Data* wd = (Widget_Data*) data;
-       
+
+       fprintf( stderr, "down!\n");
        if( wd->base_ani_data.animator ) {
                elm_animator_stop( wd->base_ani_data.animator );
                elm_animator_del( wd->base_ani_data.animator );
@@ -930,27 +931,34 @@ static void _mouse_up_ev( void* data, Evas* evas, Evas_Object* obj, void* event_
        //Rotation 
        if( wd->sliding_vector > 0 ) {
                wd->stack_raise = EINA_FALSE;
+               fprintf( stderr, "update roatation degree first!\n" );
                _update_rotation_degree( wd, 180 - ROTATION_DEGREE );
        }else {
                wd->stack_raise = EINA_TRUE;
+               fprintf( stderr, "update roatation degree second!\n" );
                _update_rotation_degree( wd, ROTATION_DEGREE );
        }
-       
+
+       fprintf( stderr, "up!\n" );
+
        //Check Bouncing
        Evas_Coord w;
        evas_object_geometry_get( obj, NULL, NULL, &w, NULL );
        
        //bounce to left directly  
        if( wd->cur_pos.x > 0 ) {
+                         fprintf( stderr, "_direct_bounce! first\n" );
                _direct_bounce( wd, 0 );
                return ;
        //bounce to right directly
        }else if( wd->cur_pos.x + (Evas_Coord) wd->valid_item_length < w ) {
+                         fprintf( stderr, "_direct_bounce! second\n" );
                _direct_bounce( wd, w - (Evas_Coord) wd->valid_item_length );
                return ;
        }
 
        if( _bounce_to_left( wd ) == EINA_TRUE ) {
+                         fprintf( stderr, "_bounce_to_left!\n" );
                return ;
        }
 /*
@@ -1226,7 +1234,6 @@ inline static void _zoom_in( Widget_Data* wd )
        elm_animator_completion_callback_set( wd->base_ani_data.animator,
                                             _zoom_in_completion_cb, wd );
        elm_animator_animate( wd->base_ani_data.animator );
-
 }
 
 
index 3b0d052..a994f75 100644 (file)
@@ -344,7 +344,7 @@ _update_arrow_obj(Evas_Object *obj, Arrow_Direction arrow_dir)
      default:
        break;
      }
-  
        evas_object_move(wd->arrow, arrow_x, arrow_y);
 }
 
@@ -370,9 +370,9 @@ _sizing_eval(Evas_Object *obj)
        if((!wd->arrow_disabled) && (arrow_dir!=NONE_ARROW)) 
        {
                _update_arrow_obj(obj, arrow_dir);
-       _shift_base_by_arrow(wd->arrow, arrow_dir, &rect);
+               _shift_base_by_arrow(wd->arrow, arrow_dir, &rect);
        }
-   
        evas_object_move(wd->scroller, rect.x, rect.y);
    evas_object_resize(wd->scroller, rect.w, rect.h);
    evas_object_move(wd->base, rect.x, rect.y);
@@ -1162,3 +1162,5 @@ elm_ctxpopup_screen_dimmed_disabled_set(Evas_Object *obj, Eina_Bool disabled)
        wd->screen_dimmed_disabled = disabled;
 }
 
+
+
index 3a6a434..4a44289 100644 (file)
@@ -129,7 +129,7 @@ _eval_top(Evas_Object *obj)
        Evas_Coord w, y;
        Elm_Transit *transit;
 
-       transit = elm_transit_add(obj);
+//     transit = elm_transit_add(obj);
        evas_object_geometry_get( obj, NULL, &y, &w, NULL );
 
        if (wd->top)
@@ -140,9 +140,10 @@ _eval_top(Evas_Object *obj)
             if (wd->top->popme) pop = EINA_TRUE;
             if (ani) 
                {
-                 if (pop) elm_transit_fx_insert( transit, elm_fx_translation_add(o , 0, y, w, y));
-                 else elm_transit_fx_insert( transit, elm_fx_translation_add(o , 0, y, -w, y));
-                 elm_transit_completion_callback_set( transit, _complete_cb, it);
+                 if (pop) evas_object_move( o, w, y );//elm_transit_fx_insert( transit, elm_fx_translation_add(o , 0, y, w, y));
+                 else evas_object_move(o, -w, y);//elm_transit_fx_insert( transit, elm_fx_translation_add(o , 0, y, -w, y));
+                 //elm_transit_completion_callback_set( transit, _complete_cb, it);
+                 _complete_cb( it );
                }
             else 
                {
@@ -163,11 +164,11 @@ _eval_top(Evas_Object *obj)
        //add show/hide transition direction & animation on/off. 10.04.14 sohyun
        if (ani && o) 
          {
-           if (pop) elm_transit_fx_insert( transit, elm_fx_translation_add(prev_o, -w, y, 0, y));
-           else elm_transit_fx_insert( transit, elm_fx_translation_add(prev_o, w, y, 0, y));
-           elm_transit_run( transit, 0.3 );
+           if (pop) evas_object_move(prev_o, 0, y );//elm_transit_fx_insert( transit, elm_fx_translation_add(prev_o, -w, y, 0, y));
+           else evas_object_move( prev_o, 0, y );//elm_transit_fx_insert( transit, elm_fx_translation_add(prev_o, w, y, 0, y));
+           //elm_transit_run( transit, 0.3 );
          }
-       elm_transit_del( transit ); 
+       //elm_transit_del( transit ); 
 
        onshow = edje_object_data_get(prev_o, "onshow");
        if (onshow)
@@ -363,13 +364,17 @@ elm_pager_content_pop(Evas_Object *obj)
               {
                  Elm_Effect *transit;
                  Evas_Coord w, y;
-      
+/*      
                  transit = elm_transit_add(obj);
                  evas_object_geometry_get(obj, NULL, &y, &w, NULL);
                  elm_transit_fx_insert(transit, elm_fx_translation_add(o , 0, y, w, y));
                  elm_transit_completion_callback_set(transit, _complete_cb, it);
                  elm_transit_run(transit, 0.3 );
-                 elm_transit_del(transit); 
+                 elm_transit_del(transit);  */
+                 evas_object_move( o, w, y );
+                 _complete_cb( it );
+                 
+                 
                }
             else _signal_hide_finished(wd->top, o, "elm,action,hide,finished", "");