change the way elm_main() must be declared (fix bug on Windows).
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 27 Aug 2011 07:54:49 +0000 (07:54 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 27 Aug 2011 07:54:49 +0000 (07:54 +0000)
Instead of EAPI elm_main(***), it must be EAPI_MAIN elm_main(***) so that
it also work on Windows.

If someone knows sed a bit, can he also change all the examples ?

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@62885 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

doc/widgets/Makefile.am
doc/widgets/widget_preview_tmpl_head.c
src/bin/Makefile.am
src/bin/config.c
src/bin/test.c
src/lib/Elementary.h.in

index 9bacc93..86343c8 100644 (file)
@@ -21,10 +21,6 @@ AM_CPPFLAGS = \
 @ELEMENTARY_EMAP_CFLAGS@ \
 @EIO_CFLAGS@
 
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
 noinst_PROGRAMS = \
 widget_preview_button1 \
 widget_preview_button2 \
index cfec07d..f5fdeda 100644 (file)
@@ -5,7 +5,7 @@
 # define __UNUSED__
 #endif
 
-EAPI int
+EAPI_MAIN int
 elm_main(int argc __UNUSED__, char **argv)
 {
    Evas_Object *win, *bg;
index 6691a7b..43fa6c3 100644 (file)
@@ -21,10 +21,6 @@ AM_CPPFLAGS = \
 @ELEMENTARY_EMAP_CFLAGS@ \
 @EIO_CFLAGS@
 
-if ELEMENTARY_WINDOWS_BUILD
-AM_CPPFLAGS += -DELEMENTARY_BUILD
-endif
-
 bin_PROGRAMS = @ELEMENTARY_TEST_PRG@ @ELEMENTARY_CONFIG_PRG@
 if BUILD_QUICKLAUNCH
 bin_PROGRAMS += elementary_quicklaunch elementary_run elementary_testql
index 5f32d19..72d01e9 100644 (file)
@@ -2967,7 +2967,7 @@ _exit_timer(void *data __UNUSED__)
 /* 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
+EAPI_MAIN int
 elm_main(int    argc,
          char **argv)
 {
index debd5ec..49fd727 100644 (file)
@@ -466,7 +466,7 @@ add_tests:
 /* 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
+EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
    Eina_Bool test_win_only = EINA_FALSE;
index 1d31ea8..b93c74c 100644 (file)
@@ -52,7 +52,7 @@ organisations behind this, as listed in the @ref authors page.
  *
 @code
 #include <Elementary.h>
-EAPI int
+EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
    // create window(s) here and do any application init
@@ -191,7 +191,7 @@ on_done(void *data, Evas_Object *obj, void *event_info)
    elm_exit();
 }
 
-EAPI int
+EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
    Evas_Object *win, *bg, *box, *lab, *btn;
@@ -420,6 +420,11 @@ contact with the developers and maintainers.
 # endif
 #endif /* ! _WIN32 */
 
+#ifdef _WIN32
+# define EAPI_MAIN
+#else
+# define EAPI_MAIN EAPI
+#endif
 
 /* allow usage from c++ */
 #ifdef __cplusplus
@@ -12560,7 +12565,7 @@ extern "C" {
     * @code
     * #include <Elementary.h>
     * #ifndef ELM_LIB_QUICKLAUNCH
-    * EAPI int
+    * EAPI_MAIN int
     * elm_main(int argc, char **argv)
     * {
     *    Ethumb_Client *client;