Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_embed.c ewl_engines.c ewl_engines.h ewl_misc.c Log Message: - ewl_engine_new doesnt' need to call the init param as all of the create_engine functions have to do it already. - remove init function pointer. - pass the argc and argv array to the engines so they can pull out params if needed =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -3 -r1.106 -r1.107 --- ewl_embed.c 5 Jan 2007 21:07:49 -0000 1.106 +++ ewl_embed.c 8 Jan 2007 13:32:41 -0000 1.107 @@ -142,7 +142,7 @@ ecore_string_release(embed->engine_name); embed->engine_name = ecore_string_instance(engine); - embed->engine = ewl_engine_new(engine); + embed->engine = ewl_engine_new(engine, NULL, NULL); if (!embed->engine) { DERROR("Error creating engine ...\n"); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- ewl_engines.c 8 Jan 2007 03:25:51 -0000 1.35 +++ ewl_engines.c 8 Jan 2007 13:32:41 -0000 1.36 @@ -105,14 +105,16 @@ /** * @param name: The name of the engine to create + * @param argc: Arguments count + * @param argv: Arguments * @return Returns the Ewl_Engine or NULL on failure * @brief Retrieves, or creates the given Ewl_Engine, or NULL on failure */ Ewl_Engine * -ewl_engine_new(const char *name) +ewl_engine_new(const char *name, int *argc, char ** argv) { Ewl_Engine *engine = NULL; - Ewl_Engine *(*create_engine)(void); + Ewl_Engine *(*create_engine)(int *argc, char ** argv); Ecore_DList *(*dependancies)(void); Ecore_DList *deps = NULL; Ecore_DList *dep_list; @@ -173,7 +175,7 @@ { Ewl_Engine *parent; - parent = ewl_engine_new(dep_name); + parent = ewl_engine_new(dep_name, argc, argv); if (!parent) { FREE(dep_name); @@ -194,7 +196,7 @@ DRETURN_PTR(NULL, DLEVEL_STABLE); } - engine = EWL_ENGINE(create_engine()); + engine = EWL_ENGINE(create_engine(argc, argv)); if (!engine) { fprintf(stderr, "Unable to create engine.\n"); @@ -203,8 +205,6 @@ engine->handle = handle; engine->dependancies = deps; - if (engine->functions->init) - engine->functions->init(engine); ecore_hash_set(ewl_engines, strdup(name), engine); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_engines.h 4 Jan 2007 05:09:47 -0000 1.19 +++ ewl_engines.h 8 Jan 2007 13:32:41 -0000 1.20 @@ -115,7 +115,6 @@ typedef struct Ewl_Engine_Info Ewl_Engine_Info; struct Ewl_Engine_Info { - int (*init)(Ewl_Engine *engine); /**< Initialize the engine */ void (*shutdown)(Ewl_Engine *engine); /**< Shutdown the engine */ struct @@ -142,7 +141,8 @@ Ecore_List *ewl_engine_names_get(void); -Ewl_Engine *ewl_engine_new(const char *name); +Ewl_Engine *ewl_engine_new(const char *name, + int *argc, char ** argv); void ewl_engine_event_handlers_init(void); void ewl_engine_event_handlers_shutdown(void); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_misc.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -3 -r1.79 -r1.80 --- ewl_misc.c 6 Jan 2007 13:14:13 -0000 1.79 +++ ewl_misc.c 8 Jan 2007 13:32:41 -0000 1.80 @@ -207,7 +207,7 @@ /* we create the engine we will be working with here so that it is * initialized before we start to use it. */ if (!ewl_engine_new(ewl_config_string_get(ewl_config, - EWL_CONFIG_ENGINE_NAME))) { + EWL_CONFIG_ENGINE_NAME), argc, argv)) { fprintf(stderr, "Could not initialize Ewl Engine.\n"); goto ERROR; } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs