char *type;
} gvplugin_active_textlayout_t;
+ typedef struct gvplugin_package_s gvplugin_package_t;
+
+ struct gvplugin_package_s {
+ gvplugin_package_t *next;
+ char *path;
+ char *packagename;
+ };
+
struct gvplugin_available_s {
gvplugin_available_t *next; /* next plugin in linked list, or NULL */
const char *typestr; /* type string, e.g. "png" or "ps" */
gvplugin_available_t *apis[ APIS ]; /* array of linked-list of plugins per api */
gvplugin_available_t *api[ APIS ]; /* array of current plugins per api */
#undef ELEM
+ gvplugin_package_t *packages; /* list of available packages */
/* keybindings for keyboard events */
gvevent_key_binding_t *keybindings;
return t;
}
+static gvplugin_package_t * gvplugin_package_record(GVC_t * gvc, char *path, char *packagename)
+{
+ gvplugin_package_t *package = gmalloc(sizeof(gvplugin_package_t));
+ package->path = strdup(path);
+ package->packagename = strdup(packagename);
+ package->next = gvc->packages;
+ gvc->packages = package;
+ return package;
+}
+
static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s)
{
char *path, *packagename, *api;
api_t gv_api;
int quality, rc;
int nest = 0;
+ gvplugin_package_t *package;
separator(&nest, &s);
while (*s) {
packagename = token(&nest, &s);
else
packagename = "x";
+ package = gvplugin_package_record(gvc, path, packagename);
do {
api = token(&nest, &s);
gv_api = gvplugin_api(api);
for (apis = library->apis; (types = apis->types); apis++) {
for (i = 0; types[i].type; i++) {
- /* FIXME - should only install if dependencies on other plugins are satisfied */
- /* e.g. "render" "gtk" depends on "device" "gtk" */
- /* only need to check during actual loading, so no need to store dependencies in config */
gvplugin_install(gvc, apis->api, types[i].type,
types[i].quality, library->packagename, path, &types[i]);
}
int gvFreeContext(GVC_t * gvc)
{
GVG_t *gvg, *gvg_next;
+ gvplugin_package_t *package, *package_next;
if (gvc->active_jobs)
gvrender_end_job(gvc->active_jobs);
gvg_next = gvg->next;
free(gvg);
}
+ package_next = gvc->packages;
+ while ((package = package_next)) {
+ package_next = package->next;
+ free(package->path);
+ free(package->packagename);
+ free(package);
+ }
gvjobs_delete(gvc);
if (gvc->config_path)
free(gvc->config_path);