/*
* This is what gets executed to initialize all of the modules. For
* the internal modules this involves 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
#ifdef HAVE_POPPLER
# include "internal/pdfinput/pdf-input.h"
#endif
#include "path-prefix.h"
#include "inkscape.h"
#include <glibmm/fileutils.h>
#include "system.h"
#include "db.h"
# include "internal/emf-inout.h"
# include "internal/emf-print.h"
# include "internal/wmf-inout.h"
# include "internal/wmf-print.h"
#ifdef HAVE_CAIRO_PDF
# include "internal/cairo-renderer-pdf-out.h"
# include "internal/cairo-png-out.h"
# include "internal/cairo-ps-out.h"
#endif
#include "internal/javafx-out.h"
#include "internal/latex-pstricks-out.h"
#include "internal/latex-pstricks.h"
#include "internal/gdkpixbuf-input.h"
#include "internal/bluredge.h"
#include "internal/gimpgrad.h"
#ifdef WITH_LIBWPG
#include "internal/wpg-input.h"
#endif
#ifdef WITH_LIBVISIO
#include "internal/vsd-input.h"
#endif
#ifdef WITH_LIBCDR
#include "internal/cdr-input.h"
#endif
#include "preferences.h"
#ifdef WITH_DBUS
#include "dbus/dbus-init.h"
#endif
#ifdef WITH_IMAGE_MAGICK
#include "internal/bitmap/adaptiveThreshold.h"
#include "internal/bitmap/addNoise.h"
#include "internal/bitmap/charcoal.h"
#include "internal/bitmap/colorize.h"
#include "internal/bitmap/contrast.h"
#include "internal/bitmap/cycleColormap.h"
#include "internal/bitmap/despeckle.h"
#include "internal/bitmap/equalize.h"
#include "internal/bitmap/gaussianBlur.h"
#include "internal/bitmap/levelChannel.h"
#include "internal/bitmap/medianFilter.h"
#include "internal/bitmap/modulate.h"
#include "internal/bitmap/normalize.h"
#include "internal/bitmap/oilPaint.h"
#include "internal/bitmap/reduceNoise.h"
#include "internal/bitmap/solarize.h"
//#include "internal/bitmap/threshold.h"
#include "internal/bitmap/unsharpmask.h"
#endif /* WITH_IMAGE_MAGICK */
#include "init.h"
namespace Inkscape {
namespace Extension {
/** This is the extention that all files are that are pulled from
the extension directory and parsed */
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 update
* \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
//g_print ("Using CairoRendererPdfOutput: new pdf exporter\n");
#endif
#ifdef HAVE_POPPLER
#endif
#ifdef WITH_LIBWPG
#endif
#ifdef WITH_LIBVISIO
#endif
#ifdef WITH_LIBCDR
#endif
/* Effects */
#ifdef WITH_DBUS
#endif
/* Raster Effects */
#ifdef WITH_IMAGE_MAGICK
//Internal::Bitmap::Threshold::init();
#endif /* WITH_IMAGE_MAGICK */
/* Load search path for extensions */
{
Inkscape::Extension::Extension::search_path.push_back(Inkscape::Application::profile_path("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) {
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;
}
}
return;
}
static void
{
in_plug->deactivate();
(*count)++;
}
}
static void check_extensions()
{
while (count != 0) {
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:fileencoding=utf-8:textwidth=99 :