summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2013-11-14 13:27:19 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2013-11-14 13:27:19 -0200
commit8e362c7ad41bd4c48960400c890dd362e50f5389 (patch)
tree56058db11e7f69e0e4a69485655e2dfe181b3144 /src
parenta55a8ed3fb50f9ecb4d2eaaa0837f293ea397826 (diff)
allow ecore to not load system modules.
this won't go to changelog/news as it's mainly internal, I can't see people wanting to use it except rare cases as edje tools.
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc.c2
-rw-r--r--src/bin/edje/edje_codegen.c2
-rw-r--r--src/bin/edje/edje_convert_main.c2
-rw-r--r--src/bin/edje/edje_decc.c3
-rw-r--r--src/bin/edje/edje_external_inspector.c2
-rw-r--r--src/bin/edje/edje_inspector.c2
-rw-r--r--src/bin/edje/edje_pick.c2
-rw-r--r--src/lib/ecore/Ecore_Common.h16
-rw-r--r--src/lib/ecore/ecore.c11
9 files changed, 41 insertions, 1 deletions
diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c
index 1ce51689cd..d714355677 100644
--- a/src/bin/edje/edje_cc.c
+++ b/src/bin/edje/edje_cc.c
@@ -116,6 +116,8 @@ main(int argc, char **argv)
116 116
117 setlocale(LC_NUMERIC, "C"); 117 setlocale(LC_NUMERIC, "C");
118 118
119 ecore_app_no_system_modules();
120
119 if (!eina_init()) 121 if (!eina_init())
120 return -1; 122 return -1;
121 123
diff --git a/src/bin/edje/edje_codegen.c b/src/bin/edje/edje_codegen.c
index d03f450a79..f2ddc7f08b 100644
--- a/src/bin/edje/edje_codegen.c
+++ b/src/bin/edje/edje_codegen.c
@@ -1098,6 +1098,8 @@ main(int argc, char *argv[])
1098 1098
1099 setlocale(LC_NUMERIC, "C"); 1099 setlocale(LC_NUMERIC, "C");
1100 1100
1101 ecore_app_no_system_modules();
1102
1101 eina_init(); 1103 eina_init();
1102 ecore_init(); 1104 ecore_init();
1103 ecore_evas_init(); 1105 ecore_evas_init();
diff --git a/src/bin/edje/edje_convert_main.c b/src/bin/edje/edje_convert_main.c
index e17d4125b3..97a96d8763 100644
--- a/src/bin/edje/edje_convert_main.c
+++ b/src/bin/edje/edje_convert_main.c
@@ -113,6 +113,8 @@ main(int argc, char **argv)
113 113
114 setlocale(LC_NUMERIC, "C"); 114 setlocale(LC_NUMERIC, "C");
115 115
116 ecore_app_no_system_modules();
117
116 if (!eina_init()) 118 if (!eina_init())
117 return -1; 119 return -1;
118 120
diff --git a/src/bin/edje/edje_decc.c b/src/bin/edje/edje_decc.c
index 2065d90a82..1cbaf29202 100644
--- a/src/bin/edje/edje_decc.c
+++ b/src/bin/edje/edje_decc.c
@@ -142,6 +142,9 @@ main(int argc, char **argv)
142 int i; 142 int i;
143 143
144 setlocale(LC_NUMERIC, "C"); 144 setlocale(LC_NUMERIC, "C");
145
146 ecore_app_no_system_modules();
147
145 if (!eina_init()) 148 if (!eina_init())
146 exit(-1); 149 exit(-1);
147 _edje_cc_log_dom = eina_log_domain_register 150 _edje_cc_log_dom = eina_log_domain_register
diff --git a/src/bin/edje/edje_external_inspector.c b/src/bin/edje/edje_external_inspector.c
index 6bd9a35e0a..6b1a521246 100644
--- a/src/bin/edje/edje_external_inspector.c
+++ b/src/bin/edje/edje_external_inspector.c
@@ -602,6 +602,8 @@ main(int argc, char **argv)
602 602
603 setlocale(LC_NUMERIC, "C"); 603 setlocale(LC_NUMERIC, "C");
604 604
605 ecore_app_no_system_modules();
606
605 ecore_init(); 607 ecore_init();
606 eina_init(); 608 eina_init();
607 edje_init(); 609 edje_init();
diff --git a/src/bin/edje/edje_inspector.c b/src/bin/edje/edje_inspector.c
index 01cf1045c8..81fe4279ae 100644
--- a/src/bin/edje/edje_inspector.c
+++ b/src/bin/edje/edje_inspector.c
@@ -1536,6 +1536,8 @@ main(int argc, char **argv)
1536 1536
1537 setlocale(LC_NUMERIC, "C"); 1537 setlocale(LC_NUMERIC, "C");
1538 1538
1539 ecore_app_no_system_modules();
1540
1539 ecore_init(); 1541 ecore_init();
1540 ecore_evas_init(); 1542 ecore_evas_init();
1541 eina_init(); 1543 eina_init();
diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
index 4635dfe765..c057d3ade6 100644
--- a/src/bin/edje/edje_pick.c
+++ b/src/bin/edje/edje_pick.c
@@ -1207,6 +1207,8 @@ main(int argc, char **argv)
1207 void *n; 1207 void *n;
1208 int k, bytes; 1208 int k, bytes;
1209 1209
1210 ecore_app_no_system_modules();
1211
1210 eina_init(); 1212 eina_init();
1211 eet_init(); 1213 eet_init();
1212 ecore_init(); 1214 ecore_init();
diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h
index 5536d22cd4..bf6d1de8ed 100644
--- a/src/lib/ecore/Ecore_Common.h
+++ b/src/lib/ecore/Ecore_Common.h
@@ -1741,6 +1741,22 @@ EAPI void ecore_app_args_get(int *argc, char ***argv);
1741EAPI void ecore_app_restart(void); 1741EAPI void ecore_app_restart(void);
1742 1742
1743/** 1743/**
1744 * @brief Do not load system modules for this application.
1745 *
1746 * Ecore will now load platform-specific system modules such as
1747 * power-management, time and locate monitors.
1748 *
1749 * Whenever this function is called @b before ecore_init(), ecore
1750 * won't load such modules.
1751 *
1752 * This may be useful to some command-line utilities, hardly will be
1753 * useful for end-user applications.
1754 *
1755 * @since 1.8
1756 */
1757EAPI void ecore_app_no_system_modules(void);
1758
1759/**
1744 * @} 1760 * @}
1745 */ 1761 */
1746 1762
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 1e7a1b7b0c..d9c194c77f 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -52,6 +52,8 @@ static FILE *_ecore_memory_statistic_file = NULL;
52#endif 52#endif
53#endif 53#endif
54 54
55static Eina_Bool _no_system_modules = EINA_FALSE;
56
55Eo *_ecore_parent = NULL; 57Eo *_ecore_parent = NULL;
56 58
57static const char *_ecore_magic_string_get(Ecore_Magic m); 59static const char *_ecore_magic_string_get(Ecore_Magic m);
@@ -194,6 +196,12 @@ ecore_system_modules_unload(void)
194 } 196 }
195} 197}
196 198
199EAPI void
200ecore_app_no_system_modules(void)
201{
202 _no_system_modules = EINA_TRUE;
203}
204
197/** 205/**
198 * @addtogroup Ecore_Init_Group 206 * @addtogroup Ecore_Init_Group
199 * 207 *
@@ -320,7 +328,8 @@ ecore_init(void)
320 } 328 }
321#endif 329#endif
322 330
323 ecore_system_modules_load(); 331 if (!_no_system_modules)
332 ecore_system_modules_load();
324 333
325 eina_log_timing(_ecore_log_dom, 334 eina_log_timing(_ecore_log_dom,
326 EINA_LOG_STATE_STOP, 335 EINA_LOG_STATE_STOP,