Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/engines/ecore_fb


Modified Files:
        ecore_fb.c 


Log Message:
* [Etk_Main] Add etk_init_full() that adds the ability to pass 
      custom options to Etk initialisation
* [Etk_Main] Change the prototype of etk_init() to "int etk_init(int 
      argc, char **argv). Existing programs have to be fixed!
* [Etk_Argument] No longer need to pass argc/argv to parse the arguments 
      and add etk_argument_get() to retrieve the argc/argv couple passed 
      to etk_init()


===================================================================
RCS file: /cvs/e/e17/libs/etk/src/engines/ecore_fb/ecore_fb.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ecore_fb.c  29 Jun 2007 20:26:09 -0000      1.24
+++ ecore_fb.c  14 Oct 2007 20:39:57 -0000      1.25
@@ -21,7 +21,7 @@
 typedef Etk_Engine_Ecore_Fb_Window_Data Etk_Engine_Window_Data;
 
 /* General engine functions */
-Etk_Engine *engine_open(int *argc, char ***argv);
+Etk_Engine *engine_open(void);
 void engine_close(void);
 
 static Etk_Bool _engine_init(void);
@@ -183,8 +183,12 @@
  **************************/
 
 /* Called when the engine is loaded */
-Etk_Engine *engine_open(int *argc, char ***argv)
+Etk_Engine *engine_open(void)
 {
+   char *use_x11_arg = NULL;
+   char *fb_width_arg = NULL;
+   char *fb_height_arg = NULL;
+   
    _wm_theme_file = _theme_find(etk_config_wm_theme_get());
    if (!_wm_theme_file)
    {
@@ -201,39 +205,32 @@
 
 #if ENGINE_E_FB_X11_SUPPORT
    /* Parse the arguments */
-   if (argc && argv)
+   etk_argument_value_get("ecore-fb-use-x11", 0, ETK_TRUE, &use_x11_arg);
+   if (use_x11_arg)
    {
-      char *use_x11_arg = NULL;
-      char *fb_width_arg = NULL;
-      char *fb_height_arg = NULL;
+      _use_x11 = ETK_TRUE;
+
+      etk_argument_value_get("ecore-fb-x11-engine", 0, ETK_TRUE, &_x11_engine);
+      if (!_x11_engine)
+      {
+         _x11_engine = strdup("ecore_evas_software_x11");
+      }
 
-      etk_argument_value_get(argc, argv, "ecore-fb-use-x11", 0, ETK_TRUE, 
&use_x11_arg);
-      if (use_x11_arg)
+      /* Note that this values are only used when X11 is enabled */
+      etk_argument_value_get("ecore-fb-width", 0, ETK_TRUE, &fb_width_arg);
+      if (fb_width_arg)
       {
-         _use_x11 = ETK_TRUE;
+         _fb_width = (int) strtol(fb_width_arg, (char **) NULL, 10);
+         if (_fb_width <= 0)
+            _fb_width = DEFAULT_FB_WIDTH;
+      }
 
-         etk_argument_value_get(argc, argv, "ecore-fb-x11-engine", 0, 
ETK_TRUE, &_x11_engine);
-         if (!_x11_engine)
-         {
-            _x11_engine = strdup("ecore_evas_software_x11");
-         }
-
-         /* Note that this values are only used when X11 is enabled */
-         etk_argument_value_get(argc, argv, "ecore-fb-width", 0, ETK_TRUE, 
&fb_width_arg);
-         if (fb_width_arg)
-         {
-            _fb_width = (int) strtol(fb_width_arg, (char **) NULL, 10);
-            if (_fb_width <= 0)
-               _fb_width = DEFAULT_FB_WIDTH;
-         }
-
-         etk_argument_value_get(argc, argv, "ecore-fb-height", 0, ETK_TRUE, 
&fb_height_arg);
-         if (fb_height_arg)
-         {
-            _fb_height = (int) strtol(fb_height_arg, (char **) NULL, 10);
-            if (_fb_height <= 0)
-               _fb_height = DEFAULT_FB_HEIGHT;
-         }
+      etk_argument_value_get("ecore-fb-height", 0, ETK_TRUE, &fb_height_arg);
+      if (fb_height_arg)
+      {
+         _fb_height = (int) strtol(fb_height_arg, (char **) NULL, 10);
+         if (_fb_height <= 0)
+            _fb_height = DEFAULT_FB_HEIGHT;
       }
    }
 #endif



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to