Enlightenment CVS committal

Author  : moom
Project : e_modules
Module  : mixer

Dir     : e_modules/mixer


Modified Files:
        e_mod_main.c e_mod_types.h 


Log Message:
* Use a timer instead of an animator so we can force the framerate to be 
higher (the default framerate of e17 (30fps) makes the sliding of the 
pop-up window a bit laggy)


===================================================================
RCS file: /cvs/e/e_modules/mixer/e_mod_main.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- e_mod_main.c        12 Sep 2006 16:38:39 -0000      1.36
+++ e_mod_main.c        12 Sep 2006 16:53:46 -0000      1.37
@@ -9,6 +9,7 @@
 /* Define to 1 for testing alsa code */
 #define DEBUG 0
 #define SLIDE_LENGTH 0.5
+#define SLIDE_FRAMERATE (1.0 / 75.0)
 
 /* Gadcon Protos */
 static E_Gadcon_Client *_gc_init     (E_Gadcon * gc, const char *name, const 
char *id, const char *style);
@@ -28,8 +29,8 @@
 
 static void _mixer_window_simple_pop_up           (Instance *inst);
 static void _mixer_window_simple_pop_down         (Instance *inst);
-static int  _mixer_window_simple_animator_up_cb   (void *data);
-static int  _mixer_window_simple_animator_down_cb (void *data);
+static int  _mixer_window_simple_timer_up_cb   (void *data);
+static int  _mixer_window_simple_timer_down_cb (void *data);
 static void _mixer_window_simple_changed_cb       (void *data, Evas_Object 
*obj, void *event_info);
 static void _mixer_window_simple_mute_cb          (void *data, Evas_Object 
*obj, void *event_info);
 
@@ -644,8 +645,9 @@
    e_popup_show(win->window);
    
    win->start_time = ecore_time_get();
-   if (win->slide_animator) ecore_animator_del(win->slide_animator);
-   win->slide_animator = 
ecore_animator_add(_mixer_window_simple_animator_up_cb, win);
+   if (win->slide_timer) ecore_timer_del(win->slide_timer);
+   win->slide_timer = ecore_timer_add(SLIDE_FRAMERATE,
+                                      _mixer_window_simple_timer_up_cb, win);
    win->popped_up = 1;
 }
 
@@ -672,14 +674,15 @@
      }
    
    win->start_time = ecore_time_get();
-   if (win->slide_animator) ecore_animator_del(win->slide_animator);
-   win->slide_animator = 
ecore_animator_add(_mixer_window_simple_animator_down_cb, win);
+   if (win->slide_timer) ecore_timer_del(win->slide_timer);
+   win->slide_timer = ecore_timer_add(SLIDE_FRAMERATE,
+                                      _mixer_window_simple_timer_down_cb, win);
    win->popped_up = 0;
 }
 
 /* Makes the window slide when it pops up */
 static int 
-_mixer_window_simple_animator_up_cb(void *data)
+_mixer_window_simple_timer_up_cb(void *data)
 {
    Mixer_Win_Simple *win;
    double progress;
@@ -706,7 +709,7 @@
    
    if (h >= win->h)
      {
-        win->slide_animator = NULL;
+        win->slide_timer = NULL;
         return 0;
      }
    else
@@ -715,7 +718,7 @@
 
 /* Makes the simple window pops down in animation */
 static int 
-_mixer_window_simple_animator_down_cb(void *data)
+_mixer_window_simple_timer_down_cb(void *data)
 {
    Mixer_Win_Simple *win;
    double progress;
===================================================================
RCS file: /cvs/e/e_modules/mixer/e_mod_types.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_mod_types.h       12 Sep 2006 14:54:06 -0000      1.8
+++ e_mod_types.h       12 Sep 2006 16:53:46 -0000      1.9
@@ -49,7 +49,7 @@
    double       start_time;
    int          mute;
    
-   Ecore_Animator *slide_animator;
+   Ecore_Animator *slide_timer;
 };
 
 struct _Mixer_System 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to