Enlightenment CVS committal

Author  : xcomputerman
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/client


Modified Files:
        EvasTextEntry.c entrance_config.c entrance_config.h main.c 


Log Message:
Updates:
- New config option for selecting the OpenGL engine.
  The GL rendering engine should provide better performance for most users
  with hardware acceleration enabled for their video cards -- at least
  twice as fast depending on what card you're using. I recommend enabling
  it if you have hardware acceleration.
- Updates to reflect new Evas_Coord data type
- Remove that redundant shutdown/reboot message...system will broadcast a
  warning message anyway for most linux machines.


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/EvasTextEntry.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- EvasTextEntry.c     14 Oct 2003 13:07:08 -0000      1.2
+++ EvasTextEntry.c     19 Oct 2003 19:41:02 -0000      1.3
@@ -326,7 +326,7 @@
     evas_object_stack_below(e->base, below);
 }
 static void
-evas_text_entry_move(Evas_Object *o, double x, double y)
+evas_text_entry_move(Evas_Object *o, Evas_Coord x, Evas_Coord y)
 {
     Evas_Text_Entry *e = NULL;
     e = evas_object_smart_data_get(o);
@@ -334,7 +334,7 @@
     evas_object_move(e->base, x, y);
 }
 static void
-evas_text_entry_resize(Evas_Object *o, double w, double h)
+evas_text_entry_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
 {
     Evas_Text_Entry *e = NULL;
     e = evas_object_smart_data_get(o);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_config.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- entrance_config.c   17 Sep 2003 05:52:47 -0000      1.7
+++ entrance_config.c   19 Oct 2003 19:41:02 -0000      1.8
@@ -28,6 +28,11 @@
       return;
 
    /* strings 'n things */
+   if ((str = e_db_str_get(db, "/entrance/engine")))
+      e->engine = str;
+   else
+      e->engine = strdup("software");
+
    if ((str = e_db_str_get(db, "/entrance/theme")))
       e->theme = str;
    else
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_config.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- entrance_config.h   25 Jul 2003 05:20:02 -0000      1.5
+++ entrance_config.h   19 Oct 2003 19:41:03 -0000      1.6
@@ -18,6 +18,12 @@
 struct _Entrance_Config
 {
    /**
+    * engine - the evas rendering engine to use
+    * gl - OpenGL rendering engine
+    * software - The software rendering engine (default)
+    */
+   char *engine;
+   /**
     * theme - the theme we want entrance ui to use
     */
    char *theme;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- main.c      16 Oct 2003 20:27:58 -0000      1.11
+++ main.c      19 Oct 2003 19:41:03 -0000      1.12
@@ -71,6 +71,8 @@
  * -------------------------------------------------------------------------
  */
 #include <time.h>
+#include <sys/types.h>
+#include <signal.h>
 #include "entrance.h"
 #include "entrance_session.h"
 #include "EvasTextEntry.h"
@@ -371,7 +373,9 @@
 {
     if(session->config->reboot.allow)
     {
-       execl("/bin/sh", "/bin/sh", "-c", "/sbin/shutdown -r now \"This system is 
going down for reboot NOW!\"", NULL);
+        pid_t ppid = getppid();
+       execl("/bin/sh", "/bin/sh", "-c", "/sbin/shutdown -r now", NULL);
+        kill(ppid, SIGQUIT);
     }
 }
 
@@ -390,7 +394,9 @@
 {
     if(session->config->halt.allow)
     {
-       execl("/bin/sh", "/bin/sh", "-c", "/sbin/shutdown -h now \"This system is 
being shut down NOW!\"", NULL);
+        pid_t ppid = getppid();
+       execl("/bin/sh", "/bin/sh", "-c", "/sbin/shutdown -h now", NULL);
+        kill(ppid, SIGQUIT);
     }
 }
 
@@ -423,11 +429,11 @@
     Ecore_Evas *e = NULL;
     Ecore_Timer *timer = NULL;
     Evas_Object *o = NULL, *edje = NULL;
-    double x, y, w, h;
+    Evas_Coord x, y, w, h;
     char *entries[] = { "EntranceUserEntry", "EntrancePassEntry" };
     int entries_count = 2;
 
-   openlog("entrance", LOG_NOWAIT, LOG_DAEMON);
+    openlog("entrance", LOG_NOWAIT, LOG_DAEMON);
     if(argv[1]) snprintf(buf, PATH_MAX, "%s", argv[1]);
     /* Basic ecore initialization */
     if(!ecore_init()) return(-1);
@@ -452,8 +458,20 @@
        edje_frametime_set(1.0/60.0);
 
        /* setup our ecore_evas */ 
-       /* testing mode decides entrance window size */
-       e = ecore_evas_software_x11_new(NULL, 0, 0, 0, WINW, WINH);
+       /* testing mode decides entrance window size
+     *
+     * Use rendering engine specified in config. On systems with
+     * hardware acceleration, GL should improve performance appreciably
+     */
+    if(!strcmp(session->config->engine, "software"))
+        e = ecore_evas_software_x11_new(NULL, 0, 0, 0, WINW, WINH);
+    else if(!strcmp(session->config->engine, "gl"))
+        e = ecore_evas_gl_x11_new(NULL, 0, 0, 0, WINW, WINH);
+    else {
+        fprintf(stderr, "Warning: Invalid Evas engine specified in config. Defaulting 
to software engine.\n");
+        e = ecore_evas_software_x11_new(NULL, 0, 0, 0, WINW, WINH);
+    }
+    
        ew = ecore_evas_software_x11_window_get(e);
        ecore_evas_title_set(e, "Entrance");
        ecore_evas_callback_delete_request_set(e, window_del_cb);




-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to