Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/bin


Modified Files:
      Tag: SPLIT
        ecore_evas_test.h ecore_evas_test_bg.c 
        ecore_evas_test_calibrate.c 


Log Message:


hmmmm playing with evas demo... and configure cleaning
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/ecore_evas_test.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- ecore_evas_test.h   17 Feb 2003 08:33:23 -0000      1.1.2.1
+++ ecore_evas_test.h   22 Feb 2003 10:34:05 -0000      1.1.2.2
@@ -25,6 +25,7 @@
 
 void bg_resize(double w, double h);
 void bg_start(void);
+void bg_go(void);
     
 int  app_start(int argc, const char **argv);
 void app_finish(void);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/ecore_evas_test_bg.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- ecore_evas_test_bg.c        20 Feb 2003 06:56:39 -0000      1.1.2.4
+++ ecore_evas_test_bg.c        22 Feb 2003 10:34:06 -0000      1.1.2.5
@@ -4,6 +4,11 @@
 
 Evas_Object *o_bg_rect  = NULL;
 Evas_Object *o_logo     = NULL;
+Ecore_Timer *anim_timer = NULL;
+
+#define NUM 24
+
+Evas_Object *o_fly[NUM];
 
 static int bg_animate_obj_timer(void *data);
 static void bg_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
@@ -38,17 +43,56 @@
    evas_object_show(o);
    o_logo = o;
    
+     {
+       int i;
+       
+       for (i = 0; i < NUM; i++)
+         {
+            o = evas_object_rectangle_add(evas);
+            evas_object_move(o, 10, 10);
+            evas_object_pass_events_set(o, 1);
+            evas_object_color_set(o,
+                                  (rand()) & 0xff,
+                                  (rand() / 30) & 0xff,
+                                  (rand() / 65) & 0xff,
+                                  (rand() / 156) & 0xff);
+            evas_object_resize(o, 4 + ((rand()) % 100), 4 + ((rand() / 50) % 100));
+            o_fly[i] = o;
+         }
+     }
+}
+
+void
+bg_go(void)
+{
    /* add a timer to animate them */
-//   anim_timer = ecore_timer_add(0.01, bg_animate_obj_timer, NULL);
+   anim_timer = ecore_timer_add(0.05, bg_animate_obj_timer, NULL);
 }
 
 static int
 bg_animate_obj_timer(void *data)
 {
+   Evas_Object *o;
+   double x, y;
+   double w, h;
+   double ow, oh;
    double t;
+   int m, n;
+   int i;
    
    t = ecore_time_get() - start_time;
-        /* .. */
+   for (i = 0; i < NUM; i++)
+     {
+       o = o_fly[i];
+       evas_output_viewport_get(evas_object_evas_get(o), NULL, NULL, &w, &h);
+       evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
+       m = ((int)o / 36) & 0x0f;
+       n = ((int)o / 763) & 0x0f;
+       x = sin(t * (double)m / 12) * ((w - ow) / 2);
+       y = sin(t * (double)n / 12) * ((h - oh) / 2);
+       evas_object_move(o, (w / 2) - (ow / 2) + x, (h / 2) - (oh / 2) + y);
+       evas_object_show(o);
+     }
    return 1;
 }
 
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/ecore_evas_test_calibrate.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- ecore_evas_test_calibrate.c 17 Feb 2003 08:33:24 -0000      1.1.2.1
+++ ecore_evas_test_calibrate.c 22 Feb 2003 10:34:06 -0000      1.1.2.2
@@ -110,6 +110,7 @@
    o_events = NULL;
    o_text = NULL;
    cal_pos = 0;
+   bg_go();
 }
 
 void




-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to