el - ELM_MAIN() cleanup. don't need shutdown in elm_main() anymore

this shouldnt be an abi or api break. it simply makes elm_shutdown
iside elm_main() optional. this is cleaner and more symmetric
This commit is contained in:
Carsten Haitzler 2014-09-01 15:29:07 +09:00
parent 9df412f9b8
commit 6c7619b0ea
5 changed files with 4 additions and 7 deletions

View File

@ -3750,7 +3750,6 @@ elm_main(int argc,
}
elm_run(); /* and run the program now and handle all events, etc. */
/* if the mainloop that elm_run() runs exists, we exit the app */
elm_shutdown(); /* clean up and shut down */
/* exit code */
return 0;
}

View File

@ -927,7 +927,6 @@ elm_main(int argc, char **argv)
EINA_LIST_FREE(tests, t)
free(t);
elm_shutdown(); /* clean up and shut down */
/* exit code */
return 0;
}

View File

@ -141,13 +141,13 @@ typedef Eina_Bool (*Elm_Event_Cb)(void *data, Evas_Object *obj, Evas
extern EAPI double _elm_startup_time;
#ifndef ELM_LIB_QUICKLAUNCH
#define ELM_MAIN() int main(int argc, char **argv) { int ret; _elm_startup_time = ecore_time_unix_get(); elm_init(argc, argv); ret = elm_main(argc, argv); return ret; } /**< macro to be used after the elm_main() function */
#define ELM_MAIN() int main(int argc, char **argv) { int ret; _elm_startup_time = ecore_time_get(); elm_init(argc, argv); ret = elm_main(argc, argv); elm_shutdown(); return ret; } /**< macro to be used after the elm_main() function */
#else
/** @deprecated macro to be used after the elm_main() function.
* Do not define ELM_LIB_QUICKLAUNCH
* Compile your programs with -fpie and -pie -rdynamic instead, to generate a single binary (linkable executable).
*/
#define ELM_MAIN() int main(int argc, char **argv) { _elm_startup_time = ecore_time_unix_get(); return elm_quicklaunch_fallback(argc, argv); }
#define ELM_MAIN() int main(int argc, char **argv) { int ret; _elm_startup_time = ecore_time_get(); ret = elm_quicklaunch_fallback(argc, argv); elm_shutdown(); return ret; }
#endif
/**************************************************************************/

View File

@ -11,8 +11,7 @@
* {
* // create window(s) here and do any application init
* elm_run(); // run main loop
* elm_shutdown(); // after mainloop finishes running, shutdown
* return 0; // exit 0 for exit code
* return 0; // exit 0 for exit code
* }
* ELM_MAIN()
* @endcode

View File

@ -297,7 +297,7 @@ EAPI double _elm_startup_time = 0;
static void
_elm_win_first_frame_do(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
{
double end = ecore_time_unix_get();
double end = ecore_time_get();
char *first = data;
switch (*first)