gimp/app/plug-in/plug-ins.h

70 lines
3.1 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
*/
badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in.[ch]: badly chopped into the new files below. Pass around much more "PlugIn" and "Gimp" pointers instead of using "current_plug_in" and "the_gimp". Needs much more hacking though... :( * app/plug-in/Makefile.am * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-params.[ch] * app/plug-in/plug-in-progress.[ch] * app/plug-in/plug-ins.[ch]: new files. * app/gui/Makefile.am * app/gui/plug-in-commands.[ch] * app/gui/plug-in-menus.[ch]: ditto. * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-types.h: changed accordingly. * app/pdb/procedural_db.c: changed procedural_db_destroy_args() so it can be used from plug_in_args_destroy(). Fixed a parasite memory leak (or introduced a new SEGV, we'll see...). * app/display/Makefile.am: another "truly ugly hack" until the plug-in menu stuff is chopped even more... * app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here, it is now in plug-in-commands.[ch]. * app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*() hacks. We have a GimpItemFactory available in most cases we used to call this functions, and can use gimp_item_factors_from_path() in all other cases. The item factory stuff needs more work anyway... * app/app_procs.c * app/gimphelp.c * app/display/gimpdisplayshell.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/menus.c * app/gui/paths-dialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes, renamed functions and gimp_menu_item_*() removal). * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2002-03-21 01:46:13 +08:00
#ifndef __PLUG_INS_H__
#define __PLUG_INS_H__
1997-11-25 06:05:25 +08:00
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
void plug_ins_init (Gimp *gimp,
GimpInitStatusFunc status_callback);
void plug_ins_exit (Gimp *gimp);
1997-11-25 06:05:25 +08:00
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
/* Register an internal plug-in. This is for file load-save
* handlers, which are organized around the plug-in data structure.
* This could all be done a little better, but oh well. -josh
*/
void plug_ins_add_internal (Gimp *gimp,
PlugInProcDef *proc_def);
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
/* Add in the file load/save handler fields procedure. */
PlugInProcDef * plug_ins_file_handler (Gimp *gimp,
gchar *name,
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
gchar *extensions,
gchar *prefixes,
gchar *magics);
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
/* Add a plug-in definition. */
void plug_ins_def_add_from_rc (Gimp *gimp,
PlugInDef *plug_in_def);
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
/* Add/Remove temporary procedures. */
void plug_ins_temp_proc_def_add (Gimp *gimp,
PlugInProcDef *proc_def);
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
void plug_ins_temp_proc_def_remove (Gimp *gimp,
PlugInProcDef *proc_def);
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
The unbelievable happened: a menu bar per display (optionally) 2002-12-10 Michael Natterer <mitch@gimp.org> The unbelievable happened: a menu bar per display (optionally) * app/widgets/gimpitemfactory.[ch]: Added the possibility to have more than one item factory per <Prefix>. Added gimp_item_factories_set_foobar() variants of all functions which set menu item properties (label, sensitive, ...). Removed the #ifndef ENABLE_NLS code since that's no longer possible. * app/widgets/gimptoolbox.c: made it robust againt the <Image> factory not existing at the time of toolbox creation. * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: added boolean "menu_bar_per_display" property. * app/gui/preferences-dialog.c: added a toggle for the new option. * app/gui/menus.[ch]: added menus_get_new_image_factory() as temporary solution. Will add a GimpMenuFactory which creates the item factories soon. * app/display/gimpdisplayshell.c: add the menu bar if requested. Changed widget packing slightly for the menu bar case. * app/display/gimpdisplayshell-callbacks.c: changed accordingly. Currently there is no right-click popup menu when we have a menu bar. This will change soon. * app/gui/file-dialog-utils.c * app/gui/gui.c: use gimp_item_factories_set_foo(). * app/gui/channels-commands.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/drawable-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/plug-in-commands.c * app/gui/select-commands.c * app/gui/tools-commands.c * app/gui/vectors-commands.c * app/gui/view-commands.c: per-display item factories pass the GimpDisplay as user_data to callbacks, not a Gimp. Changed all return_if_no_foo() macros to handle both cases. Cleaned up the plug-in menu stuff: * app/plug-in/plug-in-types.h: removed PlugInMenuEntry type. * app/plug-in/plug-ins.[ch]: added plug_ins_proc_def_add() as counterpart to plug_ins_proc_def_remove(). Added plug_ins_locale_domain() as counterpart to plug_ins_help_path(). Remember the locale domains just as the help paths. Changed plug-in initialization so that their menus can be created multiple times. * app/plug-in/plug-in.[ch]: use plug_ins_proc_def_add() instead of doing it manually. * app/gui/plug-in-menus.[ch]: added plug_in_menus_init() which just registers the locale domains. Changed plug_in_make_menu() to take a list of proc_defs, not plug_ins_defs so it can be used after plug-in query.
2002-12-11 00:38:16 +08:00
/* Retrieve a plug-ins locale domain */
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
const gchar * plug_ins_locale_domain (Gimp *gimp,
const gchar *prog_name,
const gchar **locale_path);
The unbelievable happened: a menu bar per display (optionally) 2002-12-10 Michael Natterer <mitch@gimp.org> The unbelievable happened: a menu bar per display (optionally) * app/widgets/gimpitemfactory.[ch]: Added the possibility to have more than one item factory per <Prefix>. Added gimp_item_factories_set_foobar() variants of all functions which set menu item properties (label, sensitive, ...). Removed the #ifndef ENABLE_NLS code since that's no longer possible. * app/widgets/gimptoolbox.c: made it robust againt the <Image> factory not existing at the time of toolbox creation. * app/config/gimpconfig-blurbs.h * app/config/gimpdisplayconfig.[ch]: added boolean "menu_bar_per_display" property. * app/gui/preferences-dialog.c: added a toggle for the new option. * app/gui/menus.[ch]: added menus_get_new_image_factory() as temporary solution. Will add a GimpMenuFactory which creates the item factories soon. * app/display/gimpdisplayshell.c: add the menu bar if requested. Changed widget packing slightly for the menu bar case. * app/display/gimpdisplayshell-callbacks.c: changed accordingly. Currently there is no right-click popup menu when we have a menu bar. This will change soon. * app/gui/file-dialog-utils.c * app/gui/gui.c: use gimp_item_factories_set_foo(). * app/gui/channels-commands.c * app/gui/dialogs-commands.c * app/gui/dialogs-constructors.c * app/gui/drawable-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/plug-in-commands.c * app/gui/select-commands.c * app/gui/tools-commands.c * app/gui/vectors-commands.c * app/gui/view-commands.c: per-display item factories pass the GimpDisplay as user_data to callbacks, not a Gimp. Changed all return_if_no_foo() macros to handle both cases. Cleaned up the plug-in menu stuff: * app/plug-in/plug-in-types.h: removed PlugInMenuEntry type. * app/plug-in/plug-ins.[ch]: added plug_ins_proc_def_add() as counterpart to plug_ins_proc_def_remove(). Added plug_ins_locale_domain() as counterpart to plug_ins_help_path(). Remember the locale domains just as the help paths. Changed plug-in initialization so that their menus can be created multiple times. * app/plug-in/plug-in.[ch]: use plug_ins_proc_def_add() instead of doing it manually. * app/gui/plug-in-menus.[ch]: added plug_in_menus_init() which just registers the locale domains. Changed plug_in_make_menu() to take a list of proc_defs, not plug_ins_defs so it can be used after plug-in query.
2002-12-11 00:38:16 +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
/* Retrieve a plug-ins help path */
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
const gchar * plug_ins_help_path (Gimp *gimp,
const gchar *prog_name);
1997-11-25 06:05:25 +08:00
/* Retreive a plug-ins proc_def from its ProcRecord */
PlugInProcDef * plug_ins_proc_def_find (Gimp *gimp,
ProcRecord *proc_rec);
One more Plug-In cleanup, it's still a mess... 2003-01-17 Michael Natterer <mitch@gimp.org> One more Plug-In cleanup, it's still a mess... * app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field to "needs_query". Added setters for all values. Added g_return_if_fail() stuff to all functions. * app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new(). Removed the "gboolean data_only" parameter from plug_in_proc_def_destroy() and renamed it to plug_in_proc_def_free(). Added plug_in_proc_def_get_progname() which handles GIMP_TEMPORARY procedures correctly. * app/plug-in/plug-in-rc.c: use the new stuff above. * app/plug-in/plug-in.[ch]: renamed field "user_data" to "plug_in_def" and added a comment that it is valid only during query() and init(). Use the new APIs above. Pass meaningful locale_domains and help_paths when adding temporary procedures (fixes Scrip-Fu menu translation the right way (TM)). Cleanup. * app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]() to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters to plug_ins_help_path() and plug_ins_locale_domain(). Removed unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types(). Reverse gimp->load_procs and gimp->save_procs after all procedures are registered. Removed Script-Fu translation hack. Reordered stuff. * app/gui/plug-in-menus.[ch]: changed accordingly. Named all public functions plug_in_menus_*(). Fixed Script-Fu menu translation by using plug_in_proc_def_get_progname(). Cleanup. * app/gui/file-open-menu.c * app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs and gimp->save_procs here. * app/gui/toolbox-menu.c * app/gui/image-menu.c * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly. * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated. Unrelated: * app/gui/image-menu.c * app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't get why the "1" was there. Minor cleanup.
2003-01-18 02:07:37 +08:00
GSList * plug_ins_extensions_parse (gchar *extensions);
PlugInImageType plug_ins_image_types_parse (gchar *image_types);
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
badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in.[ch]: badly chopped into the new files below. Pass around much more "PlugIn" and "Gimp" pointers instead of using "current_plug_in" and "the_gimp". Needs much more hacking though... :( * app/plug-in/Makefile.am * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-params.[ch] * app/plug-in/plug-in-progress.[ch] * app/plug-in/plug-ins.[ch]: new files. * app/gui/Makefile.am * app/gui/plug-in-commands.[ch] * app/gui/plug-in-menus.[ch]: ditto. * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-types.h: changed accordingly. * app/pdb/procedural_db.c: changed procedural_db_destroy_args() so it can be used from plug_in_args_destroy(). Fixed a parasite memory leak (or introduced a new SEGV, we'll see...). * app/display/Makefile.am: another "truly ugly hack" until the plug-in menu stuff is chopped even more... * app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here, it is now in plug-in-commands.[ch]. * app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*() hacks. We have a GimpItemFactory available in most cases we used to call this functions, and can use gimp_item_factors_from_path() in all other cases. The item factory stuff needs more work anyway... * app/app_procs.c * app/gimphelp.c * app/display/gimpdisplayshell.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/menus.c * app/gui/paths-dialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes, renamed functions and gimp_menu_item_*() removal). * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2002-03-21 01:46:13 +08:00
#endif /* __PLUG_INS_H__ */