diff options
author | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2013-11-14 13:27:19 -0200 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2013-11-14 13:27:19 -0200 |
commit | 8e362c7ad41bd4c48960400c890dd362e50f5389 (patch) | |
tree | 56058db11e7f69e0e4a69485655e2dfe181b3144 /src/lib/ecore | |
parent | a55a8ed3fb50f9ecb4d2eaaa0837f293ea397826 (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/lib/ecore')
-rw-r--r-- | src/lib/ecore/Ecore_Common.h | 16 | ||||
-rw-r--r-- | src/lib/ecore/ecore.c | 11 |
2 files changed, 26 insertions, 1 deletions
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); | |||
1741 | EAPI void ecore_app_restart(void); | 1741 | EAPI 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 | */ | ||
1757 | EAPI 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 | ||
55 | static Eina_Bool _no_system_modules = EINA_FALSE; | ||
56 | |||
55 | Eo *_ecore_parent = NULL; | 57 | Eo *_ecore_parent = NULL; |
56 | 58 | ||
57 | static const char *_ecore_magic_string_get(Ecore_Magic m); | 59 | static const char *_ecore_magic_string_get(Ecore_Magic m); |
@@ -194,6 +196,12 @@ ecore_system_modules_unload(void) | |||
194 | } | 196 | } |
195 | } | 197 | } |
196 | 198 | ||
199 | EAPI void | ||
200 | ecore_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, |