provide a #defined macro for the standard main() for elementary apps.

SVN revision: 38510
This commit is contained in:
Carsten Haitzler 2009-01-09 11:34:55 +00:00
parent d63440b865
commit a8d40d0d5f
2 changed files with 4 additions and 14 deletions

View File

@ -2017,16 +2017,5 @@ elm_main(int argc, char **argv)
/* exit code */ /* exit code */
return 0; return 0;
} }
/* all emeentary apps should use this. but it right after elm_main() */
int ELM_MAIN()
main(int argc, char **argv)
{
/* init Elementary (all Elementary calls begin with elm_ and all data
* types, enums and macros will be Elm_ and ELM_ etc.) */
elm_init(argc, argv);
/* this must be called right after elm_init(). this function is used for
* fast-starting elementary apps by caching a pre-init and x connect etc.
* in elm_init(). the ONLY call allowed to be done before elm_main() is
* elm_init() and nothing else. */
return elm_main(argc, argv);
}

View File

@ -130,6 +130,8 @@ extern "C" {
ELM_WIN_KEYBOARD_TERMINAL, ELM_WIN_KEYBOARD_TERMINAL,
ELM_WIN_KEYBOARD_PASSWORD ELM_WIN_KEYBOARD_PASSWORD
} Elm_Win_Keyboard_Mode; } Elm_Win_Keyboard_Mode;
#define ELM_MAIN() int main(int argc, char **argv) {elm_init(argc, argv); return elm_main(argc, argv);}
/**************************************************************************/ /**************************************************************************/
/* General calls */ /* General calls */
@ -425,7 +427,6 @@ extern "C" {
EAPI const void *elm_list_item_data_get(Elm_List_Item *item); EAPI const void *elm_list_item_data_get(Elm_List_Item *item);
EAPI Evas_Object *elm_list_item_icon_get(Elm_List_Item *item); EAPI Evas_Object *elm_list_item_icon_get(Elm_List_Item *item);
EAPI Evas_Object *elm_list_item_end_get(Elm_List_Item *item); EAPI Evas_Object *elm_list_item_end_get(Elm_List_Item *item);
/* smart callbacks called: /* smart callbacks called:
* "clicked" - when the user double-clicked an item * "clicked" - when the user double-clicked an item
* "selected" - when the user selected an item * "selected" - when the user selected an item