gimp/libgimpmodule/gimpmodule.c

519 lines
13 KiB
C
Raw Normal View History

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
* gimpmodule.c
* (C) 1999 Austin Donnelly <austin@gimp.org>
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <string.h>
#include <gio/gio.h>
#include "libgimpbase/gimpbase.h"
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
#include "gimpmodule.h"
#include "libgimp/libgimp-intl.h"
/**
* SECTION: gimpmodule
* @title: GimpModule
* @short_description: A #GTypeModule subclass which implements module
* loading using #GModule.
* @see_also: #GModule, #GTypeModule
*
* A #GTypeModule subclass which implements module loading using #GModule.
**/
enum
{
MODIFIED,
LAST_SIGNAL
};
static void gimp_module_finalize (GObject *object);
static gboolean gimp_module_load (GTypeModule *module);
static void gimp_module_unload (GTypeModule *module);
static gboolean gimp_module_open (GimpModule *module);
static gboolean gimp_module_close (GimpModule *module);
static void gimp_module_set_last_error (GimpModule *module,
const gchar *error_str);
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
G_DEFINE_TYPE (GimpModule, gimp_module, G_TYPE_TYPE_MODULE)
#define parent_class gimp_module_parent_class
static guint module_signals[LAST_SIGNAL];
static void
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_class_init (GimpModuleClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass);
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
module_signals[MODIFIED] =
g_signal_new ("modified",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpModuleClass, modified),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
object_class->finalize = gimp_module_finalize;
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
module_class->load = gimp_module_load;
module_class->unload = gimp_module_unload;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
klass->modified = NULL;
}
static void
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_init (GimpModule *module)
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
module->filename = NULL;
module->verbose = FALSE;
module->state = GIMP_MODULE_STATE_ERROR;
module->on_disk = FALSE;
module->load_inhibit = FALSE;
module->module = NULL;
module->info = NULL;
module->last_module_error = NULL;
module->query_module = NULL;
module->register_module = NULL;
}
static void
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_finalize (GObject *object)
{
GimpModule *module = GIMP_MODULE (object);
2019-07-25 18:37:52 +08:00
g_clear_pointer (&module->info, gimp_module_info_free);
g_clear_pointer (&module->last_module_error, g_free);
g_clear_pointer (&module->filename, g_free);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
static gboolean
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_load (GTypeModule *module)
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
{
GimpModule *gimp_module = GIMP_MODULE (module);
gpointer func;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
g_return_val_if_fail (gimp_module->filename != NULL, FALSE);
g_return_val_if_fail (gimp_module->module == NULL, FALSE);
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (gimp_module->verbose)
g_print ("Loading module '%s'\n",
gimp_filename_to_utf8 (gimp_module->filename));
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (! gimp_module_open (gimp_module))
return FALSE;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (! gimp_module_query_module (gimp_module))
return FALSE;
/* find the gimp_module_register symbol */
if (! g_module_symbol (gimp_module->module, "gimp_module_register", &func))
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_set_last_error (gimp_module,
"Missing gimp_module_register() symbol");
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
g_message (_("Module '%s' load error: %s"),
gimp_filename_to_utf8 (gimp_module->filename),
gimp_module->last_module_error);
gimp_module_close (gimp_module);
gimp_module->state = GIMP_MODULE_STATE_ERROR;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
return FALSE;
}
gimp_module->register_module = func;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
if (! gimp_module->register_module (module))
{
gimp_module_set_last_error (gimp_module,
"gimp_module_register() returned FALSE");
g_message (_("Module '%s' load error: %s"),
gimp_filename_to_utf8 (gimp_module->filename),
gimp_module->last_module_error);
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
gimp_module_close (gimp_module);
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
gimp_module->state = GIMP_MODULE_STATE_LOAD_FAILED;
return FALSE;
}
gimp_module->state = GIMP_MODULE_STATE_LOADED;
return TRUE;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
}
static void
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_unload (GTypeModule *module)
{
GimpModule *gimp_module = GIMP_MODULE (module);
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
g_return_if_fail (gimp_module->module != NULL);
if (gimp_module->verbose)
g_print ("Unloading module '%s'\n",
gimp_filename_to_utf8 (gimp_module->filename));
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_close (gimp_module);
}
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
/* public functions */
/**
* gimp_module_new:
* @filename: The filename of a loadable module.
* @load_inhibit: Pass %TRUE to exclude this module from auto-loading.
* @verbose: Pass %TRUE to enable debugging output.
*
* Creates a new #GimpModule instance.
*
* Returns: The new #GimpModule object.
**/
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
GimpModule *
gimp_module_new (const gchar *filename,
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gboolean load_inhibit,
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gboolean verbose)
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
GimpModule *module;
g_return_val_if_fail (filename != NULL, NULL);
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
module = g_object_new (GIMP_TYPE_MODULE, NULL);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
module->filename = g_strdup (filename);
module->load_inhibit = load_inhibit ? TRUE : FALSE;
module->verbose = verbose ? TRUE : FALSE;
module->on_disk = TRUE;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (! module->load_inhibit)
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
if (gimp_module_load (G_TYPE_MODULE (module)))
gimp_module_unload (G_TYPE_MODULE (module));
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
}
else
{
if (verbose)
g_print ("Skipping module '%s'\n",
gimp_filename_to_utf8 (filename));
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
module->state = GIMP_MODULE_STATE_NOT_LOADED;
Ported module loading to GTypeModule, getting rid of all own module 2002-10-20 Michael Natterer <mitch@gimp.org> Ported module loading to GTypeModule, getting rid of all own module registering/bookkeeping stuff for color selectors and display filters. The modules now simply register GimpColorSelector and GimpColorDisplay subclasses, the list of registered subclasses can then be obtained calling g_type_children() on the abstract base classes. This is work in progress and just the first working state after I started breaking everything... * app/gui/color-select.[ch] * libgimp/gimpcolordisplay.h * libgimp/gimpcolorselector.h: removed. * app/gui/Makefile.am * libgimp/Makefile.am: changed accordingly. * libgimp/gimpmodule.h: massively simplified. All voodoo is gone. * libgimpwidgets/gimpcolordisplay.[ch] * libgimpwidgets/gimpcolorselector.[ch]: new abstract base classes which need to be subclassed by modules. * libgimpwidgets/gimpcolorselect.[ch]: the built-in color selector from app/gui/color-select.* ported to be a GimpColorSelector subclass. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetsmarshal.list * libgimpwidgets/gimpwidgetstypes.h: changed accordingly. * app/core/gimpmoduleinfo.[ch]: made it a GTypeModule subclass * app/core/gimpmodules.c: changed accordingly. * app/core/gimpcontainer.c * app/core/gimplist.c: HACKED around to allow GimpLists of GObjects (not GimpObjects). This is EEKy, so I will either make gimp->modules a simple GList and revert this bit of change, or allow GObjects all over the place in GimpContainer land... * app/display/gimpdisplayshell-filter.[ch] * app/gui/color-notebook.c: removed all module stuff and use g_type_children() to get the list of available color_selectors and display_filters. * app/display/gimpdisplayshell-filter-dialog.c * app/display/gimpdisplayshell-render.c * app/gui/module-browser.c: changed accordingly. * app/gui/gui.c: ref the built-in color selector's class before the modules are queried so it appears first in the list of GimpColorSelector's children. * modules/Makefile.am: build the water color selector again. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: ported them all to the new API. * modules/gimpmodregister.[ch]: removed the old EMX module hack.
2002-10-20 18:14:17 +08:00
}
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
return module;
}
/**
* gimp_module_query_module:
* @module: A #GimpModule.
*
* Queries the module without actually registering any of the types it
* may implement. After successful query, the @info field of the
* #GimpModule struct will be available for further inspection.
*
* Returns: %TRUE on success.
**/
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gboolean
gimp_module_query_module (GimpModule *module)
{
const GimpModuleInfo *info;
gboolean close_module = FALSE;
gpointer func;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_return_val_if_fail (GIMP_IS_MODULE (module), FALSE);
if (! module->module)
{
if (! gimp_module_open (module))
return FALSE;
close_module = TRUE;
}
/* find the gimp_module_query symbol */
if (! g_module_symbol (module->module, "gimp_module_query", &func))
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
{
gimp_module_set_last_error (module,
"Missing gimp_module_query() symbol");
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_message (_("Module '%s' load error: %s"),
gimp_filename_to_utf8 (module->filename),
module->last_module_error);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_close (module);
module->state = GIMP_MODULE_STATE_ERROR;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
return FALSE;
}
module->query_module = func;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (module->info)
{
gimp_module_info_free (module->info);
module->info = NULL;
}
info = module->query_module (G_TYPE_MODULE (module));
if (! info || info->abi_version != GIMP_MODULE_ABI_VERSION)
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
{
gimp_module_set_last_error (module,
info ?
"module ABI version does not match" :
"gimp_module_query() returned NULL");
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
g_message (_("Module '%s' load error: %s"),
gimp_filename_to_utf8 (module->filename),
module->last_module_error);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_close (module);
module->state = GIMP_MODULE_STATE_ERROR;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
return FALSE;
}
module->info = gimp_module_info_copy (info);
if (close_module)
return gimp_module_close (module);
return TRUE;
}
/**
* gimp_module_modified:
* @module: A #GimpModule.
*
* Emits the "modified" signal. Call it whenever you have modified the module
* manually (which you shouldn't do).
**/
void
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_modified (GimpModule *module)
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
g_return_if_fail (GIMP_IS_MODULE (module));
g_signal_emit (module, module_signals[MODIFIED], 0);
}
/**
* gimp_module_set_load_inhibit:
* @module: A #GimpModule.
* @load_inhibit: Pass %TRUE to exclude this module from auto-loading.
*
* Sets the @load_inhibit property if the module. Emits "modified".
**/
void
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
gimp_module_set_load_inhibit (GimpModule *module,
gboolean load_inhibit)
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
g_return_if_fail (GIMP_IS_MODULE (module));
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (load_inhibit != module->load_inhibit)
{
module->load_inhibit = load_inhibit ? TRUE : FALSE;
gimp_module_modified (module);
}
}
/**
* gimp_module_state_name:
* @state: A #GimpModuleState.
*
* Returns the translated textual representation of a #GimpModuleState.
* The returned string must not be freed.
*
* Returns: The @state's name.
**/
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
const gchar *
gimp_module_state_name (GimpModuleState state)
{
static const gchar * const statenames[] =
{
N_("Module error"),
N_("Loaded"),
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
N_("Load failed"),
N_("Not loaded")
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
};
g_return_val_if_fail (state >= GIMP_MODULE_STATE_ERROR &&
state <= GIMP_MODULE_STATE_NOT_LOADED, NULL);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
return gettext (statenames[state]);
}
/**
* gimp_module_error_quark:
*
* This function is never called directly. Use GIMP_MODULE_ERROR() instead.
*
* Returns: the #GQuark that defines the GIMP module error domain.
*
* Since: 2.8
**/
GQuark
gimp_module_error_quark (void)
{
return g_quark_from_static_string ("gimp-module-error-quark");
}
/* private functions */
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
static gboolean
gimp_module_open (GimpModule *module)
{
module->module = g_module_open (module->filename, 0);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
if (! module->module)
{
module->state = GIMP_MODULE_STATE_ERROR;
gimp_module_set_last_error (module, g_module_error ());
g_message (_("Module '%s' load error: %s"),
gimp_filename_to_utf8 (module->filename),
module->last_module_error);
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
return FALSE;
}
return TRUE;
}
static gboolean
gimp_module_close (GimpModule *module)
{
g_module_close (module->module); /* FIXME: error handling */
module->module = NULL;
module->query_module = NULL;
module->register_module = NULL;
module->state = GIMP_MODULE_STATE_NOT_LOADED;
Moved generic datafile loading to LibGimpBase: 2002-10-23 Michael Natterer <mitch@gimp.org> Moved generic datafile loading to LibGimpBase: * app/core/gimpdatafiles.[ch]: removed... * libgimpbase/gimpdatafiles.[ch]: ...and add here with a changed API which requires no more global variables. * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * app/core/Makefile.am * app/core/core-types.h * app/core/gimpdatafactory.c * app/gui/gui.c * app/plug-in/plug-in.c * app/plug-in/plug-ins.c * app/tools/tools.c: changed accordingly. Moved module loading to LibGimpModule: * app/core/gimpmodules.c: removed lots of code... * libgimpmodule/gimpmoduledb.[ch]: ...and added it here as GimpModuleDB object. * libgimpmodule/Makefile.am * libgimpmodule/gimpmoduletypes.h: changed accordingly. * app/core/gimp.[ch]: replaced gimp->modules by gimp->module_db. * libgimpmodule/gimpmodule.[ch]: added gimp_module_query(). Internal cleanup. Stuff... * app/gui/module-browser.c: changed accordingly. Unfinished... * app/core/gimpcontainer.c * app/core/gimplist.c: reverted the HACKS introduced recently. * app/core/gimpobject.[ch]: added gimp_g_object_get_memsize() utility function. * libgimpproxy/gimpobject.[ch]: regenerated. Changed display filter configuration stuff: * libgimpwidgets/gimpcolordisplay.[ch]: made the virtual configure() function return a GtkWidget instead of opening a dialog. Changed configure_cancel() to configure_reset(). Added "changed" signal. * app/display/gimpdisplayshell-filter-dialog.c: embed the filters' config GUI in the dialog. Connect to "changed" and added a "Reset" button which resets the filter. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c: changed accordingly. * modules/colorsel_triangle.c * modules/colorsel_water.c: minor fixes. 2002-10-23 Michael Natterer <mitch@gimp.org> * libgimpbase/libgimpbase-docs.sgml * libgimpbase/libgimpbase-sections.txt * libgimpbase/tmpl/gimpbasetypes.sgml * libgimpbase/tmpl/gimpdatafiles.sgml: added GimpDatafiles * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/tmpl/gimpmoduledb.sgml: added GimpModuleDB. * libgimpwidgets/libgimpwidgets.types: added gimp_dialog_get_type * libgimpmodule/tmpl/gimpmodule.sgml * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpdialog.sgml: updated.
2002-10-23 22:55:07 +08:00
return TRUE;
}
static void
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
gimp_module_set_last_error (GimpModule *module,
const gchar *error_str)
{
if (module->last_module_error)
g_free (module->last_module_error);
module->last_module_error = g_strdup (error_str);
}
/* GimpModuleInfo functions */
/**
* gimp_module_info_new:
* @abi_version: The #GIMP_MODULE_ABI_VERSION the module was compiled against.
* @purpose: The module's general purpose.
* @author: The module's author.
* @version: The module's version.
* @copyright: The module's copyright.
* @date: The module's release date.
*
* Creates a newly allocated #GimpModuleInfo struct.
*
* Returns: The new #GimpModuleInfo struct.
**/
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
GimpModuleInfo *
gimp_module_info_new (guint32 abi_version,
const gchar *purpose,
const gchar *author,
const gchar *version,
const gchar *copyright,
const gchar *date)
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
{
GimpModuleInfo *info = g_slice_new0 (GimpModuleInfo);
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
info->abi_version = abi_version;
info->purpose = g_strdup (purpose);
info->author = g_strdup (author);
info->version = g_strdup (version);
info->copyright = g_strdup (copyright);
info->date = g_strdup (date);
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
return info;
}
/**
* gimp_module_info_copy:
* @info: The #GimpModuleInfo struct to copy.
*
* Copies a #GimpModuleInfo struct.
*
* Returns: The new copy.
**/
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
GimpModuleInfo *
gimp_module_info_copy (const GimpModuleInfo *info)
{
g_return_val_if_fail (info != NULL, NULL);
return gimp_module_info_new (info->abi_version,
info->purpose,
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
info->author,
info->version,
info->copyright,
info->date);
}
/**
* gimp_module_info_free:
* @info: The #GimpModuleInfo struct to free
*
* Frees the passed #GimpModuleInfo.
**/
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
void
gimp_module_info_free (GimpModuleInfo *info)
{
Makefile.am libgimpmodule/.cvsignore libgimpmodule/Makefile.am 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/gimpmodule.[ch] * libgimpmodule/gimpmodule.def * libgimpmodule/gimpmoduletypes.h * libgimpmodule/makefile.msc: new library for module loading. * configure.in: generate Makefiles for libgimpmodule and its devel-docs. Added GMODULE_CFLAGS and GMODULE_LIBS. * app/Makefile.am: link the app against it. * libgimp/gimpmodule.h * app/core/gimpmoduleinfo.[ch]: removed. * libgimp/Makefile.am * app/core/Makefile.am * app/core/core-types.h * app/core/gimpmodules.c * app/gui/module-browser.c: changed accordingly. * modules/cdisplay_gamma.c * modules/cdisplay_highcontrast.c * modules/colorsel_triangle.c * modules/colorsel_water.c: #include "libgimpmodule/gimpmodule.h" 2002-10-21 Michael Natterer <mitch@gimp.org> * Makefile.am * libgimpmodule/.cvsignore * libgimpmodule/Makefile.am * libgimpmodule/libgimpmodule-docs.sgml * libgimpmodule/libgimpmodule-sections.txt * libgimpmodule/libgimpmodule.types * libgimpmodule/tmpl/.cvsignore * libgimpmodule/tmpl/gimpmodule.sgml * libgimpmodule/tmpl/gimpmoduletypes.sgml: added API docs for the new module loading lib. * libgimp/tmpl/gimpmodule.sgml: removed. * libgimp/libgimp-docs.sgml * libgimp/libgimp-sections.txt: changed accordingly. * libgimpwidgets/tmpl/gimpcolordisplay.sgml * libgimpwidgets/tmpl/gimpcolorselect.sgml * libgimpwidgets/tmpl/gimpcolorselector.sgml: updated. 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: removed app/core/gimpmoduleinfo.c 2002-10-21 Michael Natterer <mitch@gimp.org> * POTFILES.in: added libgimpmodule/gimpmodule.c
2002-10-21 22:15:02 +08:00
g_return_if_fail (info != NULL);
g_free (info->purpose);
g_free (info->author);
g_free (info->version);
g_free (info->copyright);
g_free (info->date);
g_slice_free (GimpModuleInfo, info);
}