![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <glib.h>
Include dependency graph for common/module.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | DT_MODULE_MANIFEST_NAME "modules.manifest" |
| Name of the manifest each module directory must carry. | |
Functions | |
| gchar ** | dt_module_read_manifest (const char *subdir, char *moduledir) |
| Read a module directory's manifest and return the module base names it lists. | |
| GList * | dt_module_load_modules (const char *subdir, size_t module_size, int(*load_module_so)(void *module, const char *libname, const char *plugin_name), void(*init_module)(void *module), gint(*sort_modules)(gconstpointer a, gconstpointer b)) |
| Load every module the given directory's manifest lists. | |
| #define DT_MODULE_MANIFEST_NAME "modules.manifest" |
Name of the manifest each module directory must carry.
It is generated at build time from the very list of targets CMake compiled, and installed beside them. See dt_module_read_manifest().
Definition at line 34 of file common/module.h.
| GList * dt_module_load_modules | ( | const char * | subdir, |
| size_t | module_size, | ||
| int(*)(void *module, const char *libname, const char *plugin_name) | load_module_so, | ||
| void(*)(void *module) | init_module, | ||
| gint(*)(gconstpointer a, gconstpointer b) | sort_modules | ||
| ) |
Load every module the given directory's manifest lists.
Definition at line 106 of file module.c.
References dt_conf_get_bool(), dt_conf_key_exists(), dt_conf_set_bool(), dt_free, dt_module_read_manifest(), DT_PATH_MAX, IS_NULL_PTR, name, res, and TRUE.
Referenced by dt_lib_init(), and dt_view_manager_load_modules().
| gchar ** dt_module_read_manifest | ( | const char * | subdir, |
| char * | moduledir | ||
| ) |
Read a module directory's manifest and return the module base names it lists.
| subdir | directory under the module dir, e.g. "/views", leading separator included |
| moduledir | filled with the absolute directory the manifest was read from; must be at least DT_PATH_MAX bytes |
The base names are what g_module_build_path() expects: no ‘lib’ prefix, no file extension, no directory component. Entries carrying a path separator, a ‘..’, or a leading dot are rejected and reported: a manifest names the modules shipped in ITS directory and nothing else.
Definition at line 56 of file module.c.
References _manifest_entry_is_sane(), DT_DEBUG_ALWAYS, dt_loc_get_moduledir(), DT_MODULE_MANIFEST_NAME, DT_PATH_MAX, dt_print(), error(), FALSE, IS_NULL_PTR, and names.
Referenced by dt_imageio_load_modules_format(), dt_imageio_load_modules_storage(), and dt_module_load_modules().