init.cpp revision 1e65babae29f5d489b28a25fbc75de615912bb98
/*
* This is what gets executed to initialize all of the modules. For
* the internal modules this invovles executing their initialization
* functions, for external ones it involves reading their .spmodule
* files and bringing them into Sodipodi.
*
* Authors:
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2002-2004 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "path-prefix.h"
#include "inkscape.h"
#include "system.h"
#include "db.h"
#ifdef HAVE_CAIRO_PDF
# include "internal/pdf-cairo.h"
#endif
#ifdef WITH_GNOME_PRINT
#endif
#ifdef WIN32
# include "internal/emf-win32-inout.h"
# include "internal/emf-win32-print.h"
#endif
#ifdef HAVE_CAIRO_PDF
# include "internal/cairo-pdf-out.h"
# include "internal/cairo-renderer-pdf-out.h"
# include "internal/cairo-png-out.h"
#endif
#include "internal/latex-pstricks-out.h"
#include "internal/latex-pstricks.h"
#include "internal/gdkpixbuf-input.h"
#include "internal/bluredge.h"
#include "internal/gimpgrad.h"
#include "internal/wpg-input.h"
#include "prefs-utils.h"
namespace Inkscape {
namespace Extension {
/** This is the extention that all files are that are pulled from
the extension directory and parsed */
#define SP_MODULE_EXTENSION "inx"
static void check_extensions();
/**
* \return none
* \brief Examines the given string preference and checks to see
* that at least one of the registered extensions matches
* it. If not, a default is assigned.
* \param pref_path Preference path to load
* \param pref_attr Attribute to load from the preference
* \param pref_default Default string to set
* \param extension_family List of extensions to search
*/
static void
{
/*
gboolean missing=TRUE;
for (GSList *list = extension_family; list; list = g_slist_next(list)) {
g_assert( list->data );
Inkscape::Extension *extension;
extension = reinterpret_cast<Inkscape::Extension *>(list->data);
if (!strcmp(extension->get_id(),pref)) missing=FALSE;
}
*/
}
}
/**
* Invokes the init routines for internal modules.
*
* This should be a list of all the internal modules that need to initialized. This is just a
* convinent place to put them. Also, this function calls build_module_from_dir to parse the
* Inkscape extensions directory.
*/
void
init()
{
/* TODO: Change to Internal */
#ifdef HAVE_CAIRO_PDF
if (0) {
}
#endif
#ifdef WITH_GNOME_PRINT
#endif
#ifdef WIN32
#endif
/* Effects */
/* Load search path for extensions */
{
}
}
/* this is at the very end because it has several catch-alls
* that are possibly over-ridden by other extensions (such as
* svgz)
*/
/* now we need to check and make sure everyone is happy */
/* This is a hack to deal with updating saved outdated module
* names in the prefs...
*/
// Inkscape::Extension::db.get_output_list()
);
}
/**
* \return none
* \brief This function parses a directory for files of SP_MODULE_EXTENSION
* type and loads them.
* \param dirname The directory that should be searched for modules
*
* Here is just a basic function that moves through a directory. It looks at every entry, and
* compares its filename with SP_MODULE_EXTENSION. Of those that pass, build_from_file is called
* with their filenames.
*/
static void
{
if (!dirname) {
g_warning(_("Null external module directory name. Modules will not be loaded."));
return;
}
return;
}
//# Hopefully doing this the Glib way is portable
if (!directory) {
g_warning(_("Modules directory (%s) is unavailable. External modules in that directory will not be loaded."), safeDir);
return;
}
continue;
}
continue;
}
}
}
static void
{
in_plug->deactivate();
(*count)++;
}
}
static void
{
int count = 1;
bool anyfail = false;
// int pass = 0;
while (count != 0) {
// printf("Check extensions pass %d\n", pass++);
count = 0;
}
}
} } /* namespace Inkscape::Extension */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :