Enlightenment CVS committal

Author  : rbdpngn
Project : misc
Module  : elapse

Dir     : misc/elapse/src


Modified Files:
        Elapse.h gui.c main.c 


Log Message:
Set app args so that it can be remembered and restarted by e16. Also set the
layer to below and the window to borderless.

===================================================================
RCS file: /cvsroot/enlightenment/misc/elapse/src/Elapse.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- Elapse.h    16 Apr 2004 18:09:49 -0000      1.2
+++ Elapse.h    16 Apr 2004 18:25:30 -0000      1.3
@@ -1,7 +1,8 @@
-#include <Esmart/Esmart_Trans.h>
-#include <Ecore_Evas.h>
 #include <Ecore.h>
+#include <Ecore_X.h>
+#include <Ecore_Evas.h>
 #include <Edje.h>
+#include <Esmart/Esmart_Trans.h>
 
 #include <unistd.h>
 #include <string.h>
@@ -37,7 +38,7 @@
 } Elapse;
 
 /* gui.c */
-void elapse_gui_init(Elapse *elapse);
+void elapse_gui_init(Elapse *elapse, int argc, const char **argv);
 void elapse_cb_window_move(Ecore_Evas *ee);
 
 /* main.c */
===================================================================
RCS file: /cvsroot/enlightenment/misc/elapse/src/gui.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gui.c       16 Apr 2004 18:09:49 -0000      1.2
+++ gui.c       16 Apr 2004 18:25:30 -0000      1.3
@@ -1,22 +1,27 @@
 #include "Elapse.h"
 
-void elapse_gui_init(Elapse *elapse)
+void elapse_gui_init(Elapse *elapse, int argc, const char **argv)
 {
        double iw, ih;
        int x, y, w, h;
+       Ecore_X_Window win;
        debug(DEBUG_INFO, elapse, "elapse_gui_init()");
 
        debug(DEBUG_INFO, elapse, "ecore_init()");
        ecore_init();
+       ecore_app_args_set(argc, argv);
 
        debug(DEBUG_INFO, elapse, "ecore_evas_init()");
        ecore_evas_init();
        elapse->ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 0, 0);
        ecore_evas_title_set(elapse->ee, "Elapse");
-       ecore_evas_borderless_set(elapse->ee, 0);
+       ecore_evas_borderless_set(elapse->ee, 1);
+       win = ecore_evas_software_x11_window_get(elapse->ee);
+       ecore_x_window_prop_layer_set(win, ECORE_X_WINDOW_LAYER_BELOW);
+       ecore_x_window_prop_sticky_set(win, 1);
        
        elapse->evas = ecore_evas_get(elapse->ee);
-
+       
        debug(DEBUG_INFO, elapse, "esmart_trans_x11_new()");
        elapse->smart = esmart_trans_x11_new(elapse->evas);
        evas_object_move(elapse->smart, 0, 0);
@@ -68,14 +73,3 @@
 
        esmart_trans_x11_freshen(o, x, y, w, h);
 }
-
-
-
-
-
-
-
-
-
-
-       
===================================================================
RCS file: /cvsroot/enlightenment/misc/elapse/src/main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- main.c      16 Apr 2004 18:09:49 -0000      1.2
+++ main.c      16 Apr 2004 18:25:30 -0000      1.3
@@ -1,7 +1,7 @@
 #include "Elapse.h"
 #include "config.h"
 
-int main(int argc, char *argv[])
+int main(int argc, const char *argv[])
 {
        Elapse elapse;
        int i = 0;
@@ -33,7 +33,7 @@
                if (!strcmp(argv[i], "-f") ||
                    !strcmp(argv[i], "--format")) {
                        if (!argv[++i]) show_help();
-                       elapse.conf.format = malloc(sizeof(argv[i]));
+                       elapse.conf.format = malloc(strlen(argv[i]) + 1);
                        strcpy(elapse.conf.format, argv[i]);
                }
 
@@ -49,7 +49,7 @@
                }
        }
 
-       elapse_gui_init(&elapse);
+       elapse_gui_init(&elapse, argc, argv);
 
        debug(DEBUG_INFO, &elapse, "ecore_timer_add()");
        elapse.timer = ecore_timer_add(1, (void *)elapse_time_set, &elapse);




-------------------------------------------------------
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