1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
2006-04-29 06:26:51 +08:00
|
|
|
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
|
1997-11-25 06:05:25 +08:00
|
|
|
*
|
2006-04-29 06:26:51 +08:00
|
|
|
* gimppluginmanager.h
|
2004-09-22 23:12:24 +08:00
|
|
|
*
|
1997-11-25 06:05:25 +08:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
#ifndef __GIMP_PLUG_IN_MANAGER_H__
|
|
|
|
#define __GIMP_PLUG_IN_MANAGER_H__
|
1997-11-25 06:05:25 +08:00
|
|
|
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
#include "core/gimpobject.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_TYPE_PLUG_IN_MANAGER (gimp_plug_in_manager_get_type ())
|
|
|
|
#define GIMP_PLUG_IN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PLUG_IN_MANAGER, GimpPlugInManager))
|
|
|
|
#define GIMP_PLUG_IN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PLUG_IN_MANAGER, GimpPlugInManagerClass))
|
|
|
|
#define GIMP_IS_PLUG_IN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PLUG_IN_MANAGER))
|
|
|
|
#define GIMP_IS_PLUG_IN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PLUG_IN_MANAGER))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GimpPlugInManagerClass GimpPlugInManagerClass;
|
|
|
|
|
|
|
|
struct _GimpPlugInManager
|
|
|
|
{
|
|
|
|
GimpObject parent_instance;
|
|
|
|
|
|
|
|
Gimp *gimp;
|
|
|
|
|
|
|
|
GSList *plug_in_defs;
|
|
|
|
gboolean write_pluginrc;
|
|
|
|
|
|
|
|
GSList *plug_in_procedures;
|
|
|
|
|
|
|
|
GSList *load_procs;
|
|
|
|
GSList *save_procs;
|
|
|
|
|
|
|
|
GSList *menu_branches;
|
|
|
|
GSList *locale_domains;
|
|
|
|
GSList *help_domains;
|
|
|
|
|
|
|
|
PlugIn *current_plug_in;
|
|
|
|
GSList *open_plug_ins;
|
|
|
|
GSList *plug_in_stack;
|
|
|
|
GSList *last_plug_ins;
|
|
|
|
|
|
|
|
GimpPlugInShm *shm;
|
|
|
|
GimpInterpreterDB *interpreter_db;
|
|
|
|
GimpEnvironTable *environ_table;
|
|
|
|
GimpPlugInDebug *debug;
|
|
|
|
GList *data_list;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpPlugInManagerClass
|
|
|
|
{
|
|
|
|
GimpObjectClass parent_class;
|
|
|
|
|
|
|
|
void (* menu_branch_added) (GimpPlugInManager *manager,
|
|
|
|
const gchar *prog_name,
|
|
|
|
const gchar *menu_path,
|
|
|
|
const gchar *menu_label);
|
|
|
|
void (* last_plug_ins_changed) (GimpPlugInManager *manager);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GType gimp_plug_in_manager_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GimpPlugInManager * gimp_plug_in_manager_new (Gimp *gimp);
|
|
|
|
|
|
|
|
void gimp_plug_in_manager_initialize (GimpPlugInManager *manager,
|
|
|
|
GimpInitStatusFunc status_callback);
|
|
|
|
void gimp_plug_in_manager_restore (GimpPlugInManager *manager,
|
|
|
|
GimpContext *context,
|
|
|
|
GimpInitStatusFunc status_callback);
|
|
|
|
void gimp_plug_in_manager_exit (GimpPlugInManager *manager);
|
2004-11-14 01:06:06 +08:00
|
|
|
|
2006-04-10 04:35:15 +08:00
|
|
|
/* Register a plug-in. This function is public for file load-save
|
|
|
|
* handlers, which are organized around the plug-in data structure.
|
|
|
|
* This could all be done a little better, but oh well. -josh
|
|
|
|
*/
|
2006-04-29 06:26:51 +08:00
|
|
|
void gimp_plug_in_manager_add_procedure (GimpPlugInManager *manager,
|
|
|
|
GimpPlugInProcedure *procedure);
|
|
|
|
|
|
|
|
void gimp_plug_in_manager_add_temp_proc (GimpPlugInManager *manager,
|
|
|
|
GimpTemporaryProcedure *procedure);
|
|
|
|
void gimp_plug_in_manager_remove_temp_proc (GimpPlugInManager *manager,
|
|
|
|
GimpTemporaryProcedure *procedure);
|
|
|
|
|
|
|
|
void gimp_plug_in_manager_set_last_plug_in (GimpPlugInManager *manager,
|
|
|
|
GimpPlugInProcedure *procedure);
|
2006-04-10 04:35:15 +08:00
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
gint gimp_plug_in_manager_get_shm_ID (GimpPlugInManager *manager);
|
|
|
|
guchar * gimp_plug_in_manager_get_shm_addr (GimpPlugInManager *manager);
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
#endif /* __GIMP_PLUG_IN_MANAGER_H__ */
|