gimp/app/plug-in/plug-in-def.h
Michael Natterer 5f211479ac ref all registered procedures.
2006-04-07  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimp-pdb.c (gimp_pdb_register)
	(gimp_pdb_unregister): ref all registered procedures.

	* app/xcf/xcf.c
	* tools/pdbgen/app.pl: unref newly created procedures after
	registering them.

	* app/core/gimp.[ch]: renamed member "plug_in_proc_defs" to
	"plug_in_procedures". Renamed "proc_def" variables to "procedure".

	* app/actions/plug-in-actions.c
	* app/menus/plug-in-menus.c: changed accordingly.

	* app/plug-in/plug-ins.[ch]: keep a reference to all procs which
	are in gimp->plug_in_procedures.

	(plug_ins_exit): unref them all and free the list. Apparently we
	were leaking them before on exit.

	* app/plug-in/plug-in-def.[ch]: s/proc_defs/procedures/. Ref
	procedures added with plug_in_def_add_procedure(). Added
	plug_in_def_remove_procedure() which unrefs them again. Removed
	"free_proc_defs" parameter from plug_in_def_free() and always
	unref the procedures.

	* app/plug-in/plug-in.[ch]: added plug_in_add_temp_proc() and
	plug_in_remove_temp() proc. Ref the added procedures.

	* app/plug-in/plug-in-message.c: use the new APIs instead of
	adding/removing procs and temp procs from their lists manually.
	Unref the newly created procedure after adding then to the
	plug_in_def or plug_in.

	* app/plug-in/plug-in-rc.[ch]
	* app/plug-in/plug-ins-query.c
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.

	* app/pdb/*_cmds.c: regenerated.
2006-04-07 08:16:26 +00:00

67 lines
2.9 KiB
C

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* plug-in-def.h
*
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PLUG_IN_DEF_H__
#define __PLUG_IN_DEF_H__
#include <time.h>
struct _PlugInDef
{
gchar *prog;
GSList *procedures;
gchar *locale_domain_name;
gchar *locale_domain_path;
gchar *help_domain_name;
gchar *help_domain_uri;
time_t mtime;
gboolean needs_query; /* Does the plug-in need to be queried ? */
gboolean has_init; /* Does the plug-in need to be initialized ? */
};
PlugInDef * plug_in_def_new (const gchar *prog);
void plug_in_def_free (PlugInDef *plug_in_def);
void plug_in_def_add_procedure (PlugInDef *plug_in_def,
GimpPlugInProcedure *proc);
void plug_in_def_remove_procedure (PlugInDef *plug_in_def,
GimpPlugInProcedure *proc);
void plug_in_def_set_locale_domain_name (PlugInDef *plug_in_def,
const gchar *domain_name);
void plug_in_def_set_locale_domain_path (PlugInDef *plug_in_def,
const gchar *domain_path);
void plug_in_def_set_help_domain_name (PlugInDef *plug_in_def,
const gchar *domain_name);
void plug_in_def_set_help_domain_uri (PlugInDef *plug_in_def,
const gchar *domain_uri);
void plug_in_def_set_mtime (PlugInDef *plug_in_def,
time_t mtime);
void plug_in_def_set_needs_query (PlugInDef *plug_in_def,
gboolean needs_query);
void plug_in_def_set_has_init (PlugInDef *plug_in_def,
gboolean has_init);
#endif /* __PLUG_IN_DEF_H__ */