From 80d375e6209d18bb3003b487d3bd5f623bb90729 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 18 Dec 2008 08:12:27 +0000 Subject: [PATCH] set up new init structure that will enable fast-start, when the code is done. SVN revision: 38206 --- src/bin/test.c | 27 ++++++++++++++++++++------- src/lib/Elementary.h | 3 +++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/bin/test.c b/src/bin/test.c index 629788d..cc87ef3 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -1465,17 +1465,30 @@ my_win_main(void) evas_object_show(win); } +/* this is your elementary main function - it MUSt be called IMMEDIATELY + * after elm_init() and MUSt be passed argc and argv, and MUST be called + * elm_main and not be static - must be a visible symbol with EAPI infront */ +EAPI int +elm_main(int argc, char **argv) +{ + /* put ere any init specific to this app like parsing args etc. */ + my_win_main(); /* create main window */ + elm_run(); /* and run the program now and handle all events etc. */ + /* if the mainloop that elm_run() runs exist - we exit the app */ + elm_shutdown(); /* clean up and shut down */ + /* exit code */ + return 0; +} + int 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); - - my_win_main(); - - elm_run(); /* and run the program now and handle all events etc. */ - - elm_shutdown(); /* clean up and shut down */ - return 0; + /* 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); } diff --git a/src/lib/Elementary.h b/src/lib/Elementary.h index 926080f..e1b0693 100644 --- a/src/lib/Elementary.h +++ b/src/lib/Elementary.h @@ -339,6 +339,7 @@ extern "C" { // //// (incomplete - medium priority) // * entry selection conflicts with finger scroll (make selection start/stop work on signals?) +// // * add test for photo widget // * add test for hoversel // * disabled not supported @@ -346,6 +347,7 @@ extern "C" { // * on the fly theme changes - test (should work) // * need a hold-scroll counter in elm_widget // * add fullscreen mode on/off for windows +// * hoversel only vertical right now - make horizontal // //// (more widgets/features - medium priority) // * biglist widget (restricted format label + icon intended for massive lists) @@ -370,6 +372,7 @@ extern "C" { // * dialpad widget - need one with a phone dialpad // //// (improvements - low priority) +// * need url and path entry modes for vkbd // * return list of toplevel window objects // * widgets should show who is focused (not useful for touchscreen) // * scroller could do with page up/down/left/right buttons and and idea of a page size -- 2.7.4