summaryrefslogtreecommitdiff
path: root/src/lib/evas/file/evas_module.c
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-10-12 18:39:10 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-12 18:39:10 +0900
commit0d9b168146f2b505d298a763d5bfaa6918074366 (patch)
treeae77b12de8c44b8d2e74cff9d0ba90eeadfe6893 /src/lib/evas/file/evas_module.c
parentbdf79fa8f0ffd0b968cf607365b3a6e842595d08 (diff)
evas/module: Added a new module vg_loader for svg
Reviewers: cedric, jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4346
Diffstat (limited to '')
-rw-r--r--src/lib/evas/file/evas_module.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index 8be56c6345..f8d2787ccc 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -20,8 +20,13 @@
20#define EVAS_MODULE_NO_IMAGE_SAVERS 0 20#define EVAS_MODULE_NO_IMAGE_SAVERS 0
21#endif 21#endif
22 22
23#ifndef EVAS_MODULE_NO_VG_LOADERS
24#define EVAS_MODULE_NO_VG_LOADERS 0
25#endif
26
23 27
24static Eina_Hash *evas_modules[4] = { 28static Eina_Hash *evas_modules[5] = {
29 NULL,
25 NULL, 30 NULL,
26 NULL, 31 NULL,
27 NULL, 32 NULL,
@@ -124,6 +129,10 @@ EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic);
124EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11); 129EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
125#endif 130#endif
126 131
132#if !EVAS_MODULE_NO_VG_LOADERS
133EVAS_EINA_STATIC_MODULE_DEFINE(vg_loader, svg);
134#endif
135
127#if !EVAS_MODULE_NO_IMAGE_LOADERS 136#if !EVAS_MODULE_NO_IMAGE_LOADERS
128EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp); 137EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp);
129EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, dds); 138EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, dds);
@@ -190,6 +199,11 @@ static const struct {
190 EVAS_EINA_STATIC_MODULE_USE(engine, software_x11), 199 EVAS_EINA_STATIC_MODULE_USE(engine, software_x11),
191#endif 200#endif
192#endif 201#endif
202#if !EVAS_MODULE_NO_VG_LOADERS
203#ifdef EVAS_STATIC_BUILD_VG_SVG
204 EVAS_EINA_STATIC_MODULE_USE(vg_loader, svg),
205#endif
206#endif
193#if !EVAS_MODULE_NO_IMAGE_LOADERS 207#if !EVAS_MODULE_NO_IMAGE_LOADERS
194#ifdef EVAS_STATIC_BUILD_BMP 208#ifdef EVAS_STATIC_BUILD_BMP
195 EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp), 209 EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp),
@@ -282,6 +296,7 @@ evas_module_init(void)
282 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); 296 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
283 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); 297 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
284 evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); 298 evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
299 evas_modules[EVAS_MODULE_TYPE_VG_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
285 300
286 evas_engines = eina_array_new(4); 301 evas_engines = eina_array_new(4);
287 302
@@ -455,6 +470,7 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
455 case EVAS_MODULE_TYPE_IMAGE_LOADER: type_str = "image_loaders"; break; 470 case EVAS_MODULE_TYPE_IMAGE_LOADER: type_str = "image_loaders"; break;
456 case EVAS_MODULE_TYPE_IMAGE_SAVER: type_str = "image_savers"; break; 471 case EVAS_MODULE_TYPE_IMAGE_SAVER: type_str = "image_savers"; break;
457 case EVAS_MODULE_TYPE_OBJECT: type_str = "object"; break; 472 case EVAS_MODULE_TYPE_OBJECT: type_str = "object"; break;
473 case EVAS_MODULE_TYPE_VG_LOADER: type_str = "vg_loaders"; break;
458 } 474 }
459 475
460 buffer[0] = '\0'; 476 buffer[0] = '\0';
@@ -656,6 +672,7 @@ evas_module_shutdown(void)
656 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], _cb_mod_close, NULL); 672 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], _cb_mod_close, NULL);
657 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER], _cb_mod_close, NULL); 673 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER], _cb_mod_close, NULL);
658 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_OBJECT], _cb_mod_close, NULL); 674 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_OBJECT], _cb_mod_close, NULL);
675 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_VG_LOADER], _cb_mod_close, NULL);
659 676
660 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]); 677 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]);
661 evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL; 678 evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL;
@@ -665,6 +682,8 @@ evas_module_shutdown(void)
665 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL; 682 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL;
666 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]); 683 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]);
667 evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL; 684 evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL;
685 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_VG_LOADER]);
686 evas_modules[EVAS_MODULE_TYPE_VG_LOADER] = NULL;
668 687
669 EINA_LIST_FREE(evas_module_paths, path) 688 EINA_LIST_FREE(evas_module_paths, path)
670 free(path); 689 free(path);