Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/bin


Modified Files:
      Tag: SPLIT
        Makefile.am ecore_test.c 


Log Message:


working working....

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/Makefile.am,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- Makefile.am 6 Feb 2003 06:19:40 -0000       1.1.2.4
+++ Makefile.am 8 Feb 2003 01:30:56 -0000       1.1.2.5
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
 INCLUDES = \
--I../lib/ecore \
--I../lib/ecore_job \
--I../lib/ecore_x \
--I../lib/ecore_evas \
+-I$(top_srcdir)/src/lib/ecore \
+-I$(top_srcdir)/src/lib/ecore_job \
+-I$(top_srcdir)/src/lib/ecore_x \
+-I$(top_srcdir)/src/lib/ecore_evas \
 @evas_cflags@ \
 @x_cflags@
 
@@ -15,10 +15,10 @@
 ecore_test.c
 
 ecore_test_LDADD = \
-../lib/ecore/libecore.la \
-../lib/ecore_job/libecore_job.la \
-../lib/ecore_x/libecore_x.la \
-../lib/ecore_evas/libecore_evas.la
+$(top_builddir)/src/lib/ecore/libecore.la \
+$(top_builddir)/src/lib/ecore_job/libecore_job.la \
+$(top_builddir)/src/lib/ecore_x/libecore_x.la \
+$(top_builddir)/src/lib/ecore_evas/libecore_evas.la
 
 ecore_test_LDFLAGS = \
 $(LDFLAGS) \
@@ -29,7 +29,7 @@
 $(INCLUDES)
 
 ecore_test_DEPENDENCIES = \
-../lib/ecore/libecore.la \
-../lib/ecore_job/libecore_job.la \
-../lib/ecore_x/libecore_x.la \
-../lib/ecore_evas/libecore_evas.la
+$(top_builddir)/src/lib/ecore/libecore.la \
+$(top_builddir)/src/lib/ecore_job/libecore_job.la \
+$(top_builddir)/src/lib/ecore_x/libecore_x.la \
+$(top_builddir)/src/lib/ecore_evas/libecore_evas.la
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/Attic/ecore_test.c,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -3 -r1.1.2.14 -r1.1.2.15
--- ecore_test.c        7 Feb 2003 00:24:02 -0000       1.1.2.14
+++ ecore_test.c        8 Feb 2003 01:30:56 -0000       1.1.2.15
@@ -3,11 +3,13 @@
 #include "Ecore_X.h"
 #include "Ecore_Evas.h"
 
-#include <unistd.h>
-#include <fcntl.h>
+#include <math.h>
 
 double start_time = 0;
 Window win = 0;
+Ecore_Evas *ee = NULL;
+Evas *evas = NULL;
+Evas_Object *objects[64];
 
 void
 job_call(void *data)
@@ -18,7 +20,7 @@
 int
 idle_enterer(void *data)
 {
-   printf("-> Entering idle %3.3f\n", ecore_time_get() - start_time);
+//   printf("-> Entering idle %3.3f\n", ecore_time_get() - start_time);
    return 1;
 }
 
@@ -37,6 +39,32 @@
 }
 
 int
+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();
+   for (i = 0; i < (sizeof(objects) / sizeof(Evas_Object *)); i++)
+     {
+       o = objects[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) & 0x3f;
+       n = ((int)o / 763) & 0x3f;
+       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);
+     }
+   return 1;
+}
+
+int
 handler_signal_exit(int ev_type, void *ev, void *data)
 {
    Ecore_Event_Signal_Exit *e;
@@ -219,8 +247,9 @@
    ecore_app_args_set(argc, argv);
 
    if (!ecore_x_init(NULL)) return -1;
+   if (!ecore_evas_init()) return -1;
 
-   win = ecore_x_window_new(0, 0, 0, 240, 320);
+   win = ecore_x_window_new(0, 0, 0, 120, 60);
    ecore_x_window_prop_title_set(win, "Ecore Test Program");
    ecore_x_window_prop_name_class_set(win, "ecore_test", "main");
    ecore_x_window_prop_delete_request_set(win, 1);
@@ -247,9 +276,45 @@
    ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE, 
handler_x_window_prop_title_change, NULL);
    ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE, 
handler_x_window_prop_name_class_change, NULL);
 
+   ee = ecore_evas_software_x11_new(NULL, 0,  0, 0, 240, 320);
+   ecore_evas_title_set(ee, "Ecore Evas Test");
+   ecore_evas_name_class_set(ee, "ecore_test", "test_evas");   
+   evas = ecore_evas_get(ee);
+     {
+       Evas_Object *o;
+       int i;
+       
+       o = evas_object_rectangle_add(evas);
+       evas_object_color_set(o, 255, 255, 255, 255);
+       evas_object_move(o, 0, 0);
+       evas_object_resize(o, 100000, 100000);
+       evas_object_layer_set(o, -1000000);
+       evas_object_show(o);
+       
+       for (i = 0; i < (sizeof(objects) / sizeof(Evas_Object *)); 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, 
+                                  ((int)o) & 0xff, 
+                                  ((int)o / 30) & 0xff, 
+                                  ((int)o / 65) & 0xff, 
+                                  ((int)o / 156) & 0xff);
+            evas_object_resize(o, 4 + (((int)o) % 100), 4 + (((int)o / 50) % 100));
+            evas_object_show(o);
+            objects[i] = o;
+         }
+       ecore_timer_add(0.01, obj_timer, NULL);
+     }
+   ecore_evas_show(ee);
+   
    ecore_x_flush();
    
    ecore_main_loop_begin();
+   
+   ecore_evas_shutdown();
+   ecore_x_shutdown();
    ecore_shutdown();
    return 0;
 }




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to