Enlightenment CVS committal

Author  : xcomputerman
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        config.c engage.h window.c 


Log Message:
GL engine support. Bah, how come CPU usage has jumped 5x?

===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- config.c    14 Apr 2004 22:59:15 -0000      1.5
+++ config.c    17 Apr 2004 22:00:28 -0000      1.6
@@ -12,6 +12,7 @@
   ecore_config_default_int("engage.options.width", 1024);
   ecore_config_default_int("engage.options.height", 100);
   ecore_config_default_string("engage.options.theme", "gentoo");
+  ecore_config_default_string("engage.options.engine", "software");
   options.icon_path = PACKAGE_DATA_DIR "/icons/";
   ecore_config_default_int_bound("engage.options.mode", OM_ONTOP, 0, 1, 1);
   ecore_config_default_int_bound("engage.options.grab_min_icons", 1, 0, 1, 1);
@@ -34,6 +35,7 @@
   ecore_config_load();
   options.width = ecore_config_get_int("engage.options.width");
   options.height = ecore_config_get_int("engage.options.height");
+  options.engine = ecore_config_get_string("engage.options.engine");
   options.theme = ecore_config_get_string("engage.options.theme");
   options.mode = ecore_config_get_int("engage.options.mode");
   options.grab_min_icons =
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- engage.h    14 Apr 2004 23:40:31 -0000      1.8
+++ engage.h    17 Apr 2004 22:00:29 -0000      1.9
@@ -69,7 +69,7 @@
 
 struct _OD_Options {
   int             width, height;
-  char           *icon_path, *theme;
+  char           *icon_path, *theme, *engine;
   OD_Mode         mode;
   int             grab_min_icons, grab_app_icons;
 
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- window.c    17 Apr 2004 15:51:58 -0000      1.8
+++ window.c    17 Apr 2004 22:00:29 -0000      1.9
@@ -71,10 +71,24 @@
   res_x = scr->width;
   res_y = scr->height;
 
-  ee = ecore_evas_software_x11_new(NULL, 0,
-                                   (int) ((res_x - options.width) / 2.0),
-                                   (int) (res_y - options.height),
-                                   options.width, options.height);
+  if (!(strcmp(options.engine, "gl")))
+    ee = ecore_evas_gl_x11_new(NULL, 0,
+                               (int) ((res_x - options.width) / 2.0),
+                               (int) (res_y - options.height),
+                               options.width, options.height);
+  else
+  {
+    if (strcmp(options.engine, "software"))
+    {
+      fprintf(stderr, "Warning: Invalid engine type \"%s\" specified in config.\n");
+      fprintf(stderr, "         Defaulting to software engine.\n");
+    }
+    ee = ecore_evas_software_x11_new(NULL, 0,
+                                     (int) ((res_x - options.width) / 2.0),
+                                     (int) (res_y - options.height),
+                                     options.width, options.height);
+  }
+  
   ecore_evas_title_set(ee, "Engage");
   ecore_evas_name_class_set(ee, "engage", "engage");
   ecore_evas_borderless_set(ee, 1);




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to