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;
|
|
|
|
|
2006-05-04 02:05:06 +08:00
|
|
|
GimpPlugIn *current_plug_in;
|
2006-04-29 06:26:51 +08:00
|
|
|
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;
|
|
|
|
|
2006-05-05 06:51:21 +08:00
|
|
|
void (* plug_in_opened) (GimpPlugInManager *manager,
|
|
|
|
GimpPlugIn *plug_in);
|
|
|
|
void (* plug_in_closed) (GimpPlugInManager *manager,
|
|
|
|
GimpPlugIn *plug_in);
|
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
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-05-05 06:51:21 +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);
|
2006-04-29 06:26:51 +08:00
|
|
|
|
2006-05-05 06:51:21 +08:00
|
|
|
void gimp_plug_in_manager_add_open_plug_in (GimpPlugInManager *manager,
|
|
|
|
GimpPlugIn *plug_in);
|
|
|
|
void gimp_plug_in_manager_remove_open_plug_in (GimpPlugInManager *manager,
|
|
|
|
GimpPlugIn *plug_in);
|
2006-04-29 06:26:51 +08:00
|
|
|
|
2006-05-05 06:51:21 +08:00
|
|
|
void gimp_plug_in_manager_set_last_plug_in (GimpPlugInManager *manager,
|
|
|
|
GimpPlugInProcedure *procedure);
|
2006-04-10 04:35:15 +08:00
|
|
|
|
2006-05-05 06:51:21 +08:00
|
|
|
void gimp_plug_in_manager_plug_in_push (GimpPlugInManager *manager,
|
|
|
|
GimpPlugIn *plug_in);
|
|
|
|
void gimp_plug_in_manager_plug_in_pop (GimpPlugInManager *manager);
|
2006-04-30 03:03:44 +08:00
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
#endif /* __GIMP_PLUG_IN_MANAGER_H__ */
|