gimp/app/pdb/gimpprocedure.c

443 lines
11 KiB
C
Raw Normal View History

1997-11-25 06:05:25 +08:00
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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.
1997-11-25 06:05:25 +08:00
*/
#include "config.h"
1997-11-25 06:05:25 +08:00
#include <stdarg.h>
#include <string.h>
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 23:22:01 +08:00
#include <sys/types.h>
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 23:22:01 +08:00
#include <gtk/gtk.h>
#include "core/core-types.h"
#include "app_procs.h"
#include "context_manager.h"
1997-11-25 06:05:25 +08:00
#include "plug_in.h"
1997-11-25 06:05:25 +08:00
#include "procedural_db.h"
#include "libgimp/gimpintl.h"
gave parasite undo a MISC_UNDO class for now so it compiles * app/gimpdrawable.c: gave parasite undo a MISC_UNDO class for now so it compiles * app/tools_cmds.c: fix crop invoker to give correct args to crop_image * app/color_cmds.c: s/GRAY/GRAY_LUT/g; * app/brush_select.[ch]: removed PDB procs, export brush_active_dialogs, brush_select_dialog, s/active_dialogs/brush_active_dialogs/ * app/gimage_cmds.[ch] * app/channel_ops.[ch]: removed channel ops PDB procs, moved duplicate function from gimage_cmds to channel_ops, export offset and duplicate * app/gimpbrushlist.[ch]: removed PDB procs * app/gradient.[ch]: removed PDB procs, * app/gradient_header.h: exported G_SAMPLE, GradSelect, num_gradients, grad_active_dialogs, gradient_select_dialog * app/gradient_select.c: removed PDB procs, s/active_dialogs/grad_active_dialogs/ * app/patterns.[ch]: removed PDB procs * app/pattern_select.[ch]: removed PDB procs, s/active_dialogs/pattern_active_dialogs/ * app/procedural_db.c: removed PDB procs and supporting functions * app/procedrual_db.h: fiddled with enums * app/channel_cmds.[ch] * app/drawable_cmds.[ch] * app/parasite_cmds.[ch]: pdbgenned now, removed header files * app/gimpparasite.c: minor cleanup * app/internal_procs.c: use pdbgen stuff * app/tools_cmds.c * app/text_tool_cmds.c: updated from pdbgen * app/brushes_cmds.c * app/brush_select_cmds.c * app/gradient_cmds.c * app/gradient_select_cmds.c * app/patterns_cmds.c * app/pattern_select_cmds.c * app/procedural_db_cmds.c: new pdbgen files * app/Makefile.am: file shuffle (see above) -Yosh
1999-04-24 04:54:02 +08:00
GHashTable *procedural_ht = NULL;
1997-11-25 06:05:25 +08:00
/* Local functions */
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
static guint procedural_db_hash_func (gconstpointer key);
1997-11-25 06:05:25 +08:00
void
gave parasite undo a MISC_UNDO class for now so it compiles * app/gimpdrawable.c: gave parasite undo a MISC_UNDO class for now so it compiles * app/tools_cmds.c: fix crop invoker to give correct args to crop_image * app/color_cmds.c: s/GRAY/GRAY_LUT/g; * app/brush_select.[ch]: removed PDB procs, export brush_active_dialogs, brush_select_dialog, s/active_dialogs/brush_active_dialogs/ * app/gimage_cmds.[ch] * app/channel_ops.[ch]: removed channel ops PDB procs, moved duplicate function from gimage_cmds to channel_ops, export offset and duplicate * app/gimpbrushlist.[ch]: removed PDB procs * app/gradient.[ch]: removed PDB procs, * app/gradient_header.h: exported G_SAMPLE, GradSelect, num_gradients, grad_active_dialogs, gradient_select_dialog * app/gradient_select.c: removed PDB procs, s/active_dialogs/grad_active_dialogs/ * app/patterns.[ch]: removed PDB procs * app/pattern_select.[ch]: removed PDB procs, s/active_dialogs/pattern_active_dialogs/ * app/procedural_db.c: removed PDB procs and supporting functions * app/procedrual_db.h: fiddled with enums * app/channel_cmds.[ch] * app/drawable_cmds.[ch] * app/parasite_cmds.[ch]: pdbgenned now, removed header files * app/gimpparasite.c: minor cleanup * app/internal_procs.c: use pdbgen stuff * app/tools_cmds.c * app/text_tool_cmds.c: updated from pdbgen * app/brushes_cmds.c * app/brush_select_cmds.c * app/gradient_cmds.c * app/gradient_select_cmds.c * app/patterns_cmds.c * app/pattern_select_cmds.c * app/procedural_db_cmds.c: new pdbgen files * app/Makefile.am: file shuffle (see above) -Yosh
1999-04-24 04:54:02 +08:00
procedural_db_init (void)
1997-11-25 06:05:25 +08:00
{
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
app_init_update_status (_("Procedural Database"), NULL, -1);
1997-11-25 06:05:25 +08:00
if (!procedural_ht)
gave parasite undo a MISC_UNDO class for now so it compiles * app/gimpdrawable.c: gave parasite undo a MISC_UNDO class for now so it compiles * app/tools_cmds.c: fix crop invoker to give correct args to crop_image * app/color_cmds.c: s/GRAY/GRAY_LUT/g; * app/brush_select.[ch]: removed PDB procs, export brush_active_dialogs, brush_select_dialog, s/active_dialogs/brush_active_dialogs/ * app/gimage_cmds.[ch] * app/channel_ops.[ch]: removed channel ops PDB procs, moved duplicate function from gimage_cmds to channel_ops, export offset and duplicate * app/gimpbrushlist.[ch]: removed PDB procs * app/gradient.[ch]: removed PDB procs, * app/gradient_header.h: exported G_SAMPLE, GradSelect, num_gradients, grad_active_dialogs, gradient_select_dialog * app/gradient_select.c: removed PDB procs, s/active_dialogs/grad_active_dialogs/ * app/patterns.[ch]: removed PDB procs * app/pattern_select.[ch]: removed PDB procs, s/active_dialogs/pattern_active_dialogs/ * app/procedural_db.c: removed PDB procs and supporting functions * app/procedrual_db.h: fiddled with enums * app/channel_cmds.[ch] * app/drawable_cmds.[ch] * app/parasite_cmds.[ch]: pdbgenned now, removed header files * app/gimpparasite.c: minor cleanup * app/internal_procs.c: use pdbgen stuff * app/tools_cmds.c * app/text_tool_cmds.c: updated from pdbgen * app/brushes_cmds.c * app/brush_select_cmds.c * app/gradient_cmds.c * app/gradient_select_cmds.c * app/patterns_cmds.c * app/pattern_select_cmds.c * app/procedural_db_cmds.c: new pdbgen files * app/Makefile.am: file shuffle (see above) -Yosh
1999-04-24 04:54:02 +08:00
procedural_ht = g_hash_table_new (procedural_db_hash_func, g_str_equal);
1997-11-25 06:05:25 +08:00
}
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
static void
procedural_db_free_entry (gpointer key,
gpointer value,
gpointer user_data)
{
if (value)
g_list_free (value);
}
1997-11-25 06:05:25 +08:00
void
gave parasite undo a MISC_UNDO class for now so it compiles * app/gimpdrawable.c: gave parasite undo a MISC_UNDO class for now so it compiles * app/tools_cmds.c: fix crop invoker to give correct args to crop_image * app/color_cmds.c: s/GRAY/GRAY_LUT/g; * app/brush_select.[ch]: removed PDB procs, export brush_active_dialogs, brush_select_dialog, s/active_dialogs/brush_active_dialogs/ * app/gimage_cmds.[ch] * app/channel_ops.[ch]: removed channel ops PDB procs, moved duplicate function from gimage_cmds to channel_ops, export offset and duplicate * app/gimpbrushlist.[ch]: removed PDB procs * app/gradient.[ch]: removed PDB procs, * app/gradient_header.h: exported G_SAMPLE, GradSelect, num_gradients, grad_active_dialogs, gradient_select_dialog * app/gradient_select.c: removed PDB procs, s/active_dialogs/grad_active_dialogs/ * app/patterns.[ch]: removed PDB procs * app/pattern_select.[ch]: removed PDB procs, s/active_dialogs/pattern_active_dialogs/ * app/procedural_db.c: removed PDB procs and supporting functions * app/procedrual_db.h: fiddled with enums * app/channel_cmds.[ch] * app/drawable_cmds.[ch] * app/parasite_cmds.[ch]: pdbgenned now, removed header files * app/gimpparasite.c: minor cleanup * app/internal_procs.c: use pdbgen stuff * app/tools_cmds.c * app/text_tool_cmds.c: updated from pdbgen * app/brushes_cmds.c * app/brush_select_cmds.c * app/gradient_cmds.c * app/gradient_select_cmds.c * app/patterns_cmds.c * app/pattern_select_cmds.c * app/procedural_db_cmds.c: new pdbgen files * app/Makefile.am: file shuffle (see above) -Yosh
1999-04-24 04:54:02 +08:00
procedural_db_free (void)
1997-11-25 06:05:25 +08:00
{
if (procedural_ht)
{
g_hash_table_foreach (procedural_ht, procedural_db_free_entry, NULL);
g_hash_table_destroy (procedural_ht);
}
1997-11-25 06:05:25 +08:00
procedural_ht = NULL;
}
void
procedural_db_register (ProcRecord *procedure)
{
GList *list;
if (!procedural_ht)
procedural_db_init ();
list = g_hash_table_lookup (procedural_ht, (gpointer) procedure->name);
list = g_list_prepend (list, (gpointer) procedure);
g_hash_table_insert (procedural_ht,
(gpointer) procedure->name,
(gpointer) list);
}
void
procedural_db_unregister (const gchar *name)
1997-11-25 06:05:25 +08:00
{
GList *list;
list = g_hash_table_lookup (procedural_ht, (gpointer) name);
if (list)
{
list = g_list_remove (list, list->data);
if (list)
g_hash_table_insert (procedural_ht,
(gpointer) name,
(gpointer) list);
else
g_hash_table_remove (procedural_ht,
(gpointer) name);
}
}
ProcRecord *
procedural_db_lookup (const gchar *name)
1997-11-25 06:05:25 +08:00
{
GList *list;
ProcRecord *procedure;
list = g_hash_table_lookup (procedural_ht, (gpointer) name);
if (list != NULL)
procedure = (ProcRecord *) list->data;
else
procedure = NULL;
1997-11-25 06:05:25 +08:00
return procedure;
}
Argument *
procedural_db_execute (const gchar *name,
Argument *args)
1997-11-25 06:05:25 +08:00
{
ProcRecord *procedure;
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
Argument *return_args;
GList *list;
gint i;
1997-11-25 06:05:25 +08:00
return_args = NULL;
list = g_hash_table_lookup (procedural_ht, (gpointer) name);
if (list == NULL)
{
g_message (_("PDB calling error %s not found"), name);
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
return_args = g_new (Argument, 1);
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_args->arg_type = GIMP_PDB_STATUS;
return_args->value.pdb_int = GIMP_PDB_CALLING_ERROR;
return return_args;
}
1997-11-25 06:05:25 +08:00
while (list)
{
if ((procedure = (ProcRecord *) list->data) == NULL)
{
g_message (_("PDB calling error %s not found"), name);
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
return_args = g_new (Argument, 1);
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_args->arg_type = GIMP_PDB_STATUS;
return_args->value.pdb_int = GIMP_PDB_CALLING_ERROR;
1997-11-25 06:05:25 +08:00
return return_args;
}
list = list->next;
/* check the arguments */
for (i = 0; i < procedure->num_args; i++)
{
if (args[i].arg_type != procedure->args[i].arg_type)
{
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
return_args = g_new (Argument, 1);
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_args->arg_type = GIMP_PDB_STATUS;
return_args->value.pdb_int = GIMP_PDB_CALLING_ERROR;
1997-11-25 06:05:25 +08:00
g_message (_("PDB calling error %s"), procedure->name);
1997-11-25 06:05:25 +08:00
return return_args;
}
}
/* call the procedure */
switch (procedure->proc_type)
{
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_INTERNAL:
1997-11-25 06:05:25 +08:00
return_args = (* procedure->exec_method.internal.marshal_func) (args);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PLUGIN:
return_args = plug_in_run (procedure, args, procedure->num_args, TRUE, FALSE, -1);
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_EXTENSION:
return_args = plug_in_run (procedure, args, procedure->num_args, TRUE, FALSE, -1);
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_TEMPORARY:
return_args = plug_in_run (procedure, args, procedure->num_args, TRUE, FALSE, -1);
1997-11-25 06:05:25 +08:00
break;
default:
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
return_args = g_new (Argument, 1);
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_args->arg_type = GIMP_PDB_STATUS;
return_args->value.pdb_int = GIMP_PDB_EXECUTION_ERROR;
1997-11-25 06:05:25 +08:00
break;
}
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
if ((return_args[0].value.pdb_int != GIMP_PDB_SUCCESS) &&
1997-11-25 06:05:25 +08:00
(procedure->num_values > 0))
memset (&return_args[1], 0, sizeof (Argument) * procedure->num_values);
/* Check if the return value is a PDB_PASS_THROUGH, in which case run the
* next procedure in the list
*/
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
if (return_args[0].value.pdb_int != GIMP_PDB_PASS_THROUGH)
1997-11-25 06:05:25 +08:00
break;
else if (list) /* Pass through, so destroy return values and run another procedure */
procedural_db_destroy_args (return_args, procedure->num_values);
}
return return_args;
}
Argument *
procedural_db_run_proc (const gchar *name,
gint *nreturn_vals,
1997-11-25 06:05:25 +08:00
...)
{
ProcRecord *proc;
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
Argument *params;
Argument *return_vals;
va_list args;
gint i;
1997-11-25 06:05:25 +08:00
if ((proc = procedural_db_lookup (name)) == NULL)
{
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
return_vals = g_new (Argument, 1);
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_vals->arg_type = GIMP_PDB_STATUS;
return_vals->value.pdb_int = GIMP_PDB_CALLING_ERROR;
1997-11-25 06:05:25 +08:00
return return_vals;
}
/* allocate the parameter array */
params = g_new (Argument, proc->num_args);
va_start (args, nreturn_vals);
for (i = 0; i < proc->num_args; i++)
{
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
if (proc->args[i].arg_type != (params[i].arg_type = va_arg (args, GimpPDBArgType)))
1997-11-25 06:05:25 +08:00
{
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
g_message (_("Incorrect arguments passed to procedural_db_run_proc:\n"
"Argument %d to '%s' should be a %s, but got passed a %s"),
i+1, proc->name,
pdb_type_name (proc->args[i].arg_type),
pdb_type_name (params[i].arg_type));
1997-11-25 06:05:25 +08:00
g_free (params);
return NULL;
}
switch (proc->args[i].arg_type)
{
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_INT32:
case GIMP_PDB_INT16:
case GIMP_PDB_INT8:
case GIMP_PDB_DISPLAY:
tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb 2001-01-25 Sven Neumann <sven@gimp.org> * tools/pdbgen/lib.pl * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: changed these with the help of Yosh. PDB functions take GimpRGB as color type now. * app/plug_in.c * app/pdb/channel_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/procedural_db.[ch] * app/pdb/tools_cmds.c * libgimp/gimp.[ch] * libgimp/gimpchannel.[ch] * libgimp/gimpchannel_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version and changed color type from array of chars to GimpRGB. * libgimp/Makefile.am * libgimp/gimppalette.[ch]: removed these files again * app/libgimp_glue.[ch] * libgimpwidgets/gimpcolorbutton.c * plug-ins/Lighting/lighting_main.c * plug-ins/Lighting/lighting_preview.c * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_main.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/psd.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/tiff.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gap/gap_filter_iterators.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu.c * plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need to be looked at more closely after this change. I tried to put FIXME comments into those.
2001-01-25 09:20:05 +08:00
params[i].value.pdb_int = (gint32) va_arg (args, gint);
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_FLOAT:
tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb 2001-01-25 Sven Neumann <sven@gimp.org> * tools/pdbgen/lib.pl * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: changed these with the help of Yosh. PDB functions take GimpRGB as color type now. * app/plug_in.c * app/pdb/channel_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/procedural_db.[ch] * app/pdb/tools_cmds.c * libgimp/gimp.[ch] * libgimp/gimpchannel.[ch] * libgimp/gimpchannel_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version and changed color type from array of chars to GimpRGB. * libgimp/Makefile.am * libgimp/gimppalette.[ch]: removed these files again * app/libgimp_glue.[ch] * libgimpwidgets/gimpcolorbutton.c * plug-ins/Lighting/lighting_main.c * plug-ins/Lighting/lighting_preview.c * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_main.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/psd.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/tiff.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gap/gap_filter_iterators.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu.c * plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need to be looked at more closely after this change. I tried to put FIXME comments into those.
2001-01-25 09:20:05 +08:00
params[i].value.pdb_float = (gdouble) va_arg (args, gdouble);
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_STRING:
case GIMP_PDB_INT32ARRAY:
case GIMP_PDB_INT16ARRAY:
case GIMP_PDB_INT8ARRAY:
case GIMP_PDB_FLOATARRAY:
case GIMP_PDB_STRINGARRAY:
tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb 2001-01-25 Sven Neumann <sven@gimp.org> * tools/pdbgen/lib.pl * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: changed these with the help of Yosh. PDB functions take GimpRGB as color type now. * app/plug_in.c * app/pdb/channel_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/procedural_db.[ch] * app/pdb/tools_cmds.c * libgimp/gimp.[ch] * libgimp/gimpchannel.[ch] * libgimp/gimpchannel_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version and changed color type from array of chars to GimpRGB. * libgimp/Makefile.am * libgimp/gimppalette.[ch]: removed these files again * app/libgimp_glue.[ch] * libgimpwidgets/gimpcolorbutton.c * plug-ins/Lighting/lighting_main.c * plug-ins/Lighting/lighting_preview.c * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_main.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/psd.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/tiff.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gap/gap_filter_iterators.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu.c * plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need to be looked at more closely after this change. I tried to put FIXME comments into those.
2001-01-25 09:20:05 +08:00
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_COLOR:
params[i].value.pdb_color = va_arg (args, GimpRGB);
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_REGION:
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_IMAGE:
case GIMP_PDB_LAYER:
case GIMP_PDB_CHANNEL:
case GIMP_PDB_DRAWABLE:
case GIMP_PDB_SELECTION:
case GIMP_PDB_BOUNDARY:
case GIMP_PDB_PATH:
tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb 2001-01-25 Sven Neumann <sven@gimp.org> * tools/pdbgen/lib.pl * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: changed these with the help of Yosh. PDB functions take GimpRGB as color type now. * app/plug_in.c * app/pdb/channel_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/procedural_db.[ch] * app/pdb/tools_cmds.c * libgimp/gimp.[ch] * libgimp/gimpchannel.[ch] * libgimp/gimpchannel_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version and changed color type from array of chars to GimpRGB. * libgimp/Makefile.am * libgimp/gimppalette.[ch]: removed these files again * app/libgimp_glue.[ch] * libgimpwidgets/gimpcolorbutton.c * plug-ins/Lighting/lighting_main.c * plug-ins/Lighting/lighting_preview.c * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_main.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/psd.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/tiff.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gap/gap_filter_iterators.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu.c * plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need to be looked at more closely after this change. I tried to put FIXME comments into those.
2001-01-25 09:20:05 +08:00
params[i].value.pdb_int = (gint32) va_arg (args, gint);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_PARASITE:
tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb 2001-01-25 Sven Neumann <sven@gimp.org> * tools/pdbgen/lib.pl * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: changed these with the help of Yosh. PDB functions take GimpRGB as color type now. * app/plug_in.c * app/pdb/channel_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/procedural_db.[ch] * app/pdb/tools_cmds.c * libgimp/gimp.[ch] * libgimp/gimpchannel.[ch] * libgimp/gimpchannel_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version and changed color type from array of chars to GimpRGB. * libgimp/Makefile.am * libgimp/gimppalette.[ch]: removed these files again * app/libgimp_glue.[ch] * libgimpwidgets/gimpcolorbutton.c * plug-ins/Lighting/lighting_main.c * plug-ins/Lighting/lighting_preview.c * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_main.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/psd.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/tiff.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gap/gap_filter_iterators.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu.c * plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need to be looked at more closely after this change. I tried to put FIXME comments into those.
2001-01-25 09:20:05 +08:00
params[i].value.pdb_pointer = va_arg (args, gpointer);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_STATUS:
tools/pdbgen/lib.pl tools/pdbgen/pdb.pl tools/pdbgen/pdb/channel.pdb 2001-01-25 Sven Neumann <sven@gimp.org> * tools/pdbgen/lib.pl * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: changed these with the help of Yosh. PDB functions take GimpRGB as color type now. * app/plug_in.c * app/pdb/channel_cmds.c * app/pdb/internal_procs.c * app/pdb/palette_cmds.c * app/pdb/procedural_db.[ch] * app/pdb/tools_cmds.c * libgimp/gimp.[ch] * libgimp/gimpchannel.[ch] * libgimp/gimpchannel_pdb.[ch] * libgimp/gimppalette_pdb.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimptools_pdb.[ch]: incremented Gimp protocol version and changed color type from array of chars to GimpRGB. * libgimp/Makefile.am * libgimp/gimppalette.[ch]: removed these files again * app/libgimp_glue.[ch] * libgimpwidgets/gimpcolorbutton.c * plug-ins/Lighting/lighting_main.c * plug-ins/Lighting/lighting_preview.c * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_main.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colorify.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/psd.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/tiff.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gap/gap_filter_iterators.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gfig/gfig.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu.c * plug-ins/xjt/xjt.c: changed accordingly. A few plug-ins need to be looked at more closely after this change. I tried to put FIXME comments into those.
2001-01-25 09:20:05 +08:00
params[i].value.pdb_int = (gint32) va_arg (args, gint);
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_END:
1997-11-25 06:05:25 +08:00
break;
}
}
va_end (args);
*nreturn_vals = proc->num_values;
return_vals = procedural_db_execute (name, params);
g_free (params);
return return_vals;
}
Argument *
procedural_db_return_args (ProcRecord *procedure,
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
gboolean success)
1997-11-25 06:05:25 +08:00
{
Argument *return_args;
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
gint i;
1997-11-25 06:05:25 +08:00
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
return_args = g_new (Argument, procedure->num_values + 1);
1997-11-25 06:05:25 +08:00
if (success)
{
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_args[0].arg_type = GIMP_PDB_STATUS;
return_args[0].value.pdb_int = GIMP_PDB_SUCCESS;
1997-11-25 06:05:25 +08:00
}
else
{
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
return_args[0].arg_type = GIMP_PDB_STATUS;
return_args[0].value.pdb_int = GIMP_PDB_EXECUTION_ERROR;
1997-11-25 06:05:25 +08:00
}
/* Set the arg types for the return values */
for (i = 0; i < procedure->num_values; i++)
return_args[i+1].arg_type = procedure->values[i].arg_type;
return return_args;
}
void
procedural_db_destroy_args (Argument *args,
int nargs)
{
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
gint i, j;
gint prev_val = 0;
gchar **strs;
1997-11-25 06:05:25 +08:00
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
if (!args)
return;
1997-11-25 06:05:25 +08:00
for (i = 0; i < nargs; i++)
{
switch (args[i].arg_type)
{
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_INT32:
1997-11-25 06:05:25 +08:00
/* Keep this around in case we need to free an array of strings */
prev_val = args[i].value.pdb_int;
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_INT16:
case GIMP_PDB_INT8:
case GIMP_PDB_FLOAT:
1997-11-25 06:05:25 +08:00
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_STRING:
case GIMP_PDB_INT32ARRAY:
case GIMP_PDB_INT16ARRAY:
case GIMP_PDB_INT8ARRAY:
case GIMP_PDB_FLOATARRAY:
1997-11-25 06:05:25 +08:00
g_free (args[i].value.pdb_pointer);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_STRINGARRAY:
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
strs = (gchar **) args[i].value.pdb_pointer;
1997-11-25 06:05:25 +08:00
for (j = 0; j < prev_val; j++)
g_free (strs[j]);
g_free (strs);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_COLOR:
1997-11-25 06:05:25 +08:00
g_free (args[i].value.pdb_pointer);
break;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
case GIMP_PDB_REGION:
case GIMP_PDB_DISPLAY:
case GIMP_PDB_IMAGE:
case GIMP_PDB_LAYER:
case GIMP_PDB_CHANNEL:
case GIMP_PDB_DRAWABLE:
case GIMP_PDB_SELECTION:
case GIMP_PDB_BOUNDARY:
case GIMP_PDB_PATH:
case GIMP_PDB_PARASITE:
case GIMP_PDB_STATUS:
case GIMP_PDB_END:
1997-11-25 06:05:25 +08:00
break;
}
}
g_free (args);
}
/* We could just use g_str_hash() here ... that uses a different
* hash function, though
*/
1997-11-25 06:05:25 +08:00
static guint
procedural_db_hash_func (gconstpointer key)
1997-11-25 06:05:25 +08:00
{
const gchar *string;
1997-11-25 06:05:25 +08:00
guint result;
int c;
/*
* I tried a zillion different hash functions and asked many other
* people for advice. Many people had their own favorite functions,
* all different, but no-one had much idea why they were good ones.
* I chose the one below (multiply by 9 and add new character)
* because of the following reasons:
*
* 1. Multiplying by 10 is perfect for keys that are decimal strings,
* and multiplying by 9 is just about as good.
* 2. Times-9 is (shift-left-3) plus (old). This means that each
* character's bits hang around in the low-order bits of the
* hash value for ever, plus they spread fairly rapidly up to
* the high-order bits to fill out the hash value. This seems
* works well both for decimal and non-decimal strings.
*
* tclHash.c --
*
* Implementation of in-memory hash tables for Tcl and Tcl-based
* applications.
*
* Copyright (c) 1991-1993 The Regents of the University of California.
* Copyright (c) 1994 Sun Microsystems, Inc.
*/
string = (const gchar *) key;
1997-11-25 06:05:25 +08:00
result = 0;
while (1)
{
c = *string;
string++;
if (c == 0)
break;
result += (result << 3) + c;
}
return result;
}