gimp/pdb/groups/plug_in.pdb

295 lines
8.4 KiB
Plaintext
Raw Normal View History

# GIMP - The GNU 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 3 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, see <https://www.gnu.org/licenses/>.
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
sub plug_ins_query {
$blurb = 'Queries the plug-in database for its contents.';
$help = 'This procedure queries the contents of the plug-in database.';
&andy_pdb_misc('1998');
$lib_private = 1;
@inargs = (
{ name => 'search_string', type => 'string', no_validate => 1,
export GimpBrushGeneratedShape to the PDB. 2006-03-22 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB. * tools/pdbgen/pdb/brush.pdb: use it instead of int32. * libgimp/gimp.def: add gimp_brush_generated_shape_get_type(). * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/fonts.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/misc.pdb * tools/pdbgen/pdb/paint_tools.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation, removed some more utility functions, cleanup. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/display_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fonts_cmds.c * app/pdb/gimprc_cmds.c * app/pdb/gradients_cmds.c * app/pdb/layer_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/enums.pl * libgimp/gimpbrush_pdb.[ch] * libgimp/gimpenums.c.tail * libgimp/gimpenums.h: regenerated.
2006-03-22 17:58:08 +08:00
desc => 'If not an empty string then use this as a search pattern' }
);
@outargs = (
{ name => 'procedures', type => 'stringarray',
desc => 'The plug-in procedure name',
array => { name => 'num_procedures',
desc => 'The number of matching procedures' } },
{ name => 'accelerators', type => 'stringarray',
desc => 'String representing keyboard accelerator (could be empty
string)',
array => { name => 'num_accelerators',
desc => 'The number of matching procedures' } },
{ name => 'locations', type => 'stringarray',
desc => 'Location of the plug-in program',
array => { name => 'num_locations',
desc => 'The number of matching procedures' } },
{ name => 'install_times', type => 'int32array',
desc => 'Time that the plug-in was installed',
array => { name => 'num_install_times',
desc => 'The number of matching procedures' } }
);
%invoke = (
code => <<'CODE'
{
num_procedures = gimp_plug_in_manager_query (gimp->plug_in_manager,
search_string,
&procedures,
&accelerators,
&locations,
&install_times);
num_accelerators = num_procedures;
num_locations = num_procedures;
num_install_times = num_procedures;
}
CODE
);
}
sub plug_in_domain_register {
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
$blurb = 'Registers a textdomain for localisation.';
$help = <<'HELP';
This procedure adds a textdomain to the list of domains Gimp searches
for strings when translating its menu entries. There is no need to
call this function for plug-ins that have their strings included in
the 'gimp-std-plugins' domain as that is used by default. If the compiled
message catalog is not in the standard location, you may specify an
absolute path to another location. This procedure can only be called
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
in the query function of a plug-in and it has to be called before any
procedure is installed.
HELP
&neo_pdb_misc('2000');
$lib_private = 1;
@inargs = (
{ name => 'domain_name', type => 'string',
desc => 'The name of the textdomain (must be unique)' },
{ name => 'domain_file', type => 'file',
desc => 'The path to the locally installed compiled message catalog (may be NULL)' }
);
%invoke = (
export GimpBrushGeneratedShape to the PDB. 2006-03-22 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB. * tools/pdbgen/pdb/brush.pdb: use it instead of int32. * libgimp/gimp.def: add gimp_brush_generated_shape_get_type(). * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/fonts.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/misc.pdb * tools/pdbgen/pdb/paint_tools.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation, removed some more utility functions, cleanup. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/display_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fonts_cmds.c * app/pdb/gimprc_cmds.c * app/pdb/gradients_cmds.c * app/pdb/layer_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/enums.pl * libgimp/gimpbrush_pdb.[ch] * libgimp/gimpenums.c.tail * libgimp/gimpenums.h: regenerated.
2006-03-22 17:58:08 +08:00
code => <<'CODE'
{
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps 2006-04-29 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager.[ch]: new object which keeps all plug-in related stuff that was kept in the Gimp instance. Has "menu-branch-added" and "last-plug-in-changed" signals. * app/plug-in/plug-ins.[ch]: removed, all its functions are in GimpPlugInManager now. * app/core/gimpmarshal.list: new marshaller for the new object. * app/core/gimp.[ch]: removed all plug-in related stuff and keep a GimpPlugInManager around. * app/plug-in/plug-in-data.[ch] * app/plug-in/plug-in-file.[ch] * app/plug-in/plug-in-help-domain.[ch] * app/plug-in/plug-in-locale-domain.[ch] * app/plug-in/plug-in-menu-branch.[ch] * app/plug-in/plug-ins-query.[ch]: removed... * app/plug-in/gimppluginmanager-data.[ch] * app/plug-in/gimppluginmanager-file.[ch] * app/plug-in/gimppluginmanager-help-domain.[ch] * app/plug-in/gimppluginmanager-locale-domain.[ch] * app/plug-in/gimppluginmanager-menu-branch.[ch] * app/plug-in/gimppluginmanager-query.[ch]: ...and added as methods of GimpPlugInManager. * app/plug-in/plug-in-debug.[ch] * app/plug-in/plug-in-shm.[ch]: removed... * app/plug-in/gimpplugindebug.[ch] * app/plug-in/gimppluginshm.[ch]: ...and added as properly namespeced structs with constructors and destructors. * app/core/Makefile.am * app/core/gimpenvirontable.[ch] * app/core/gimpinterpreterdb.[ch]: removed... * app/plug-in/gimpenvirontable.[ch] * app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all related stuff. * app/actions/plug-in-actions.[ch]: connect to the plug-in-manager's "menu-path-added" signal and create menu branch actions accordingly. * app/plug-in/plug-in-context.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/plug-in/plug-in.[ch] * app/app_procs.c * app/actions/file-commands.c * app/actions/plug-in-commands.c * app/core/gimpimage.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/gui/gui.c * app/menus/plug-in-menus.c * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c * app/xcf/xcf.c * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: follow above refactoring. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-04-29 06:26:51 +08:00
if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY)
{
gchar *domain_path = domain_file ? g_file_get_path (domain_file) : NULL;
gimp_plug_in_def_set_locale_domain (plug_in->plug_in_def,
domain_name, domain_path);
g_free (domain_path);
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_help_register {
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
$blurb = "Register a help path for a plug-in.";
$help = <<HELP;
This procedure registers user documentation for the calling plug-in
with the GIMP help system. The domain_uri parameter points to the root
directory where the plug-in help is installed. For each supported
language there should be a file called 'gimp-help.xml' that maps the
help IDs to the actual help files.
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
HELP
&mitch_pdb_misc('2000');
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
$lib_private = 1;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
@inargs = (
{ name => 'domain_name', type => 'string',
desc => "The XML namespace of the plug-in's help pages" },
{ name => 'domain_file', type => 'file',
desc => "The root URI of the plug-in's help pages" }
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
);
%invoke = (
export GimpBrushGeneratedShape to the PDB. 2006-03-22 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB. * tools/pdbgen/pdb/brush.pdb: use it instead of int32. * libgimp/gimp.def: add gimp_brush_generated_shape_get_type(). * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/fonts.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/misc.pdb * tools/pdbgen/pdb/paint_tools.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation, removed some more utility functions, cleanup. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/display_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fonts_cmds.c * app/pdb/gimprc_cmds.c * app/pdb/gradients_cmds.c * app/pdb/layer_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/enums.pl * libgimp/gimpbrush_pdb.[ch] * libgimp/gimpenums.c.tail * libgimp/gimpenums.h: regenerated.
2006-03-22 17:58:08 +08:00
code => <<'CODE'
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
{
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps 2006-04-29 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager.[ch]: new object which keeps all plug-in related stuff that was kept in the Gimp instance. Has "menu-branch-added" and "last-plug-in-changed" signals. * app/plug-in/plug-ins.[ch]: removed, all its functions are in GimpPlugInManager now. * app/core/gimpmarshal.list: new marshaller for the new object. * app/core/gimp.[ch]: removed all plug-in related stuff and keep a GimpPlugInManager around. * app/plug-in/plug-in-data.[ch] * app/plug-in/plug-in-file.[ch] * app/plug-in/plug-in-help-domain.[ch] * app/plug-in/plug-in-locale-domain.[ch] * app/plug-in/plug-in-menu-branch.[ch] * app/plug-in/plug-ins-query.[ch]: removed... * app/plug-in/gimppluginmanager-data.[ch] * app/plug-in/gimppluginmanager-file.[ch] * app/plug-in/gimppluginmanager-help-domain.[ch] * app/plug-in/gimppluginmanager-locale-domain.[ch] * app/plug-in/gimppluginmanager-menu-branch.[ch] * app/plug-in/gimppluginmanager-query.[ch]: ...and added as methods of GimpPlugInManager. * app/plug-in/plug-in-debug.[ch] * app/plug-in/plug-in-shm.[ch]: removed... * app/plug-in/gimpplugindebug.[ch] * app/plug-in/gimppluginshm.[ch]: ...and added as properly namespeced structs with constructors and destructors. * app/core/Makefile.am * app/core/gimpenvirontable.[ch] * app/core/gimpinterpreterdb.[ch]: removed... * app/plug-in/gimpenvirontable.[ch] * app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all related stuff. * app/actions/plug-in-actions.[ch]: connect to the plug-in-manager's "menu-path-added" signal and create menu branch actions accordingly. * app/plug-in/plug-in-context.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/plug-in/plug-in.[ch] * app/app_procs.c * app/actions/file-commands.c * app/actions/plug-in-commands.c * app/core/gimpimage.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/gui/gui.c * app/menus/plug-in-menus.c * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c * app/xcf/xcf.c * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: follow above refactoring. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-04-29 06:26:51 +08:00
if (plug_in && plug_in->call_mode == GIMP_PLUG_IN_CALL_QUERY)
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
{
gchar *domain_uri = domain_file ? g_file_get_uri (domain_file) : NULL;
gimp_plug_in_def_set_help_domain (plug_in->plug_in_def,
domain_name, domain_uri);
g_free (domain_uri);
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
}
else
success = FALSE;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
}
CODE
);
}
sub plug_in_menu_branch_register {
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
$blurb = "Register a sub-menu.";
$help = <<HELP;
This procedure installs a sub-menu which does not belong to any procedure.
The menu-name should be the untranslated menu label. GIMP will look up the
translation in the textdomain registered for the plug-in.
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
HELP
&mitch_pdb_misc('2005', '2.4');
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
$lib_private = 1;
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
@inargs = (
{ name => 'menu_path', type => 'string',
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
desc => "The sub-menu's menu path" },
{ name => 'menu_name', type => 'string',
desc => 'The name of the sub-menu' }
);
%invoke = (
export GimpBrushGeneratedShape to the PDB. 2006-03-22 Michael Natterer <mitch@gimp.org> * app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB. * tools/pdbgen/pdb/brush.pdb: use it instead of int32. * libgimp/gimp.def: add gimp_brush_generated_shape_get_type(). * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/fonts.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/misc.pdb * tools/pdbgen/pdb/paint_tools.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation, removed some more utility functions, cleanup. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/display_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fonts_cmds.c * app/pdb/gimprc_cmds.c * app/pdb/gradients_cmds.c * app/pdb/layer_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/enums.pl * libgimp/gimpbrush_pdb.[ch] * libgimp/gimpenums.c.tail * libgimp/gimpenums.h: regenerated.
2006-03-22 17:58:08 +08:00
code => <<'CODE'
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
{
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps 2006-04-29 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager.[ch]: new object which keeps all plug-in related stuff that was kept in the Gimp instance. Has "menu-branch-added" and "last-plug-in-changed" signals. * app/plug-in/plug-ins.[ch]: removed, all its functions are in GimpPlugInManager now. * app/core/gimpmarshal.list: new marshaller for the new object. * app/core/gimp.[ch]: removed all plug-in related stuff and keep a GimpPlugInManager around. * app/plug-in/plug-in-data.[ch] * app/plug-in/plug-in-file.[ch] * app/plug-in/plug-in-help-domain.[ch] * app/plug-in/plug-in-locale-domain.[ch] * app/plug-in/plug-in-menu-branch.[ch] * app/plug-in/plug-ins-query.[ch]: removed... * app/plug-in/gimppluginmanager-data.[ch] * app/plug-in/gimppluginmanager-file.[ch] * app/plug-in/gimppluginmanager-help-domain.[ch] * app/plug-in/gimppluginmanager-locale-domain.[ch] * app/plug-in/gimppluginmanager-menu-branch.[ch] * app/plug-in/gimppluginmanager-query.[ch]: ...and added as methods of GimpPlugInManager. * app/plug-in/plug-in-debug.[ch] * app/plug-in/plug-in-shm.[ch]: removed... * app/plug-in/gimpplugindebug.[ch] * app/plug-in/gimppluginshm.[ch]: ...and added as properly namespeced structs with constructors and destructors. * app/core/Makefile.am * app/core/gimpenvirontable.[ch] * app/core/gimpinterpreterdb.[ch]: removed... * app/plug-in/gimpenvirontable.[ch] * app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all related stuff. * app/actions/plug-in-actions.[ch]: connect to the plug-in-manager's "menu-path-added" signal and create menu branch actions accordingly. * app/plug-in/plug-in-context.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/plug-in/plug-in.[ch] * app/app_procs.c * app/actions/file-commands.c * app/actions/plug-in-commands.c * app/core/gimpimage.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/gui/gui.c * app/menus/plug-in-menus.c * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c * app/xcf/xcf.c * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: follow above refactoring. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-04-29 06:26:51 +08:00
if (plug_in)
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
{
app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps 2006-04-29 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager.[ch]: new object which keeps all plug-in related stuff that was kept in the Gimp instance. Has "menu-branch-added" and "last-plug-in-changed" signals. * app/plug-in/plug-ins.[ch]: removed, all its functions are in GimpPlugInManager now. * app/core/gimpmarshal.list: new marshaller for the new object. * app/core/gimp.[ch]: removed all plug-in related stuff and keep a GimpPlugInManager around. * app/plug-in/plug-in-data.[ch] * app/plug-in/plug-in-file.[ch] * app/plug-in/plug-in-help-domain.[ch] * app/plug-in/plug-in-locale-domain.[ch] * app/plug-in/plug-in-menu-branch.[ch] * app/plug-in/plug-ins-query.[ch]: removed... * app/plug-in/gimppluginmanager-data.[ch] * app/plug-in/gimppluginmanager-file.[ch] * app/plug-in/gimppluginmanager-help-domain.[ch] * app/plug-in/gimppluginmanager-locale-domain.[ch] * app/plug-in/gimppluginmanager-menu-branch.[ch] * app/plug-in/gimppluginmanager-query.[ch]: ...and added as methods of GimpPlugInManager. * app/plug-in/plug-in-debug.[ch] * app/plug-in/plug-in-shm.[ch]: removed... * app/plug-in/gimpplugindebug.[ch] * app/plug-in/gimppluginshm.[ch]: ...and added as properly namespeced structs with constructors and destructors. * app/core/Makefile.am * app/core/gimpenvirontable.[ch] * app/core/gimpinterpreterdb.[ch]: removed... * app/plug-in/gimpenvirontable.[ch] * app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all related stuff. * app/actions/plug-in-actions.[ch]: connect to the plug-in-manager's "menu-path-added" signal and create menu branch actions accordingly. * app/plug-in/plug-in-context.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/plug-in/plug-in.[ch] * app/app_procs.c * app/actions/file-commands.c * app/actions/plug-in-commands.c * app/core/gimpimage.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/gui/gui.c * app/menus/plug-in-menus.c * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c * app/xcf/xcf.c * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: follow above refactoring. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-04-29 06:26:51 +08:00
gimp_plug_in_manager_add_menu_branch (gimp->plug_in_manager,
plug_in->file, menu_path, menu_name);
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
}
else
success = FALSE;
Added API to explicitly register dynamic menu items hierarchies. Fixes bug 2005-03-24 Michael Natterer <mitch@gimp.org> Added API to explicitly register dynamic menu items hierarchies. Fixes bug #170623. * app/core/gimp.h: added "GSList *plug_in_menu_branches". * app/plug-in/plug-in-types.h * app/plug-in/plug-ins.[ch]: added API to register plug-in menu branches, just as for locale and help domans. Cleaned up handling of locale and help domains. (plug_ins_exit): free the registered menu branches. * app/actions/plug-in-actions.[ch] (plug_in_actions_add_branch): new function to explicitly add a menu branch action. (plug_in_actions_setup): add the registered menu branches to each new action group. (plug_in_actions_build_path): always strip the untranslated menu path from underlines before using it as hash table key or action name. * app/menus/plug-in-menus.c (plug_in_menus_add_proc): changed accordingly: strip underlines from untranslated menu paths before passing them to plug_in_menus_build_path(). * app/core/gimp-gui.[ch]: added gimp_menus_create_branch() plus vtable entry to access the new stuff from the core. Renamed the functions desling with items from gimp_foo_entry() to gimp_foo_item(). * app/gui/gui-vtable.c: implement create_branch() and add the branch action to all existing "plug-in" action groups. Note that we don't need to create any menus because that happens implicitly when adding menu items. * tools/pdbgen/pdb/plug_in.pdb (plugin_menu_branch_register): new PDB wrapper to access branch registering from plug-ins. * app/pdb/internal_procs.c * app/pdb/plug_in_cmds.c * libgimp/gimpplugin_pdb.[ch]: regenerated. * libgimp/gimp.def: changed accordingly. * plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts): register the menu branches for all included scripts.
2005-03-25 00:08:04 +08:00
}
CODE
);
}
sub plug_in_set_pdb_error_handler {
$blurb = "Sets an error handler for procedure calls.";
$help = <<HELP;
This procedure changes the way that errors in procedure calls are
handled. By default GIMP will raise an error dialog if a procedure
call made by a plug-in fails. Using this procedure the plug-in can
change this behavior. If the error handler is set to
%GIMP_PDB_ERROR_HANDLER_PLUGIN, then the plug-in is responsible for
calling gimp_get_pdb_error() and handling the error whenever one if
its procedure calls fails. It can do this by displaying the error
message or by forwarding it in its own return values.
HELP
&neo_pdb_misc('2008', '2.6');
$lib_private = 1;
@inargs = (
{ name => 'handler', type => 'enum GimpPDBErrorHandler',
desc => "Who is responsible for handling procedure call errors" }
);
%invoke = (
code => <<'CODE'
{
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in)
{
gimp_plug_in_set_error_handler (plug_in, handler);
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_get_pdb_error_handler {
$blurb = "Retrieves the active error handler for procedure calls.";
$help = <<HELP;
This procedure retrieves the currently active error handler for
procedure calls made by the calling plug-in. See
gimp_plugin_set_pdb_error_handler() for details.
HELP
&neo_pdb_misc('2008', '2.6');
$lib_private = 1;
@outargs = (
{ name => 'handler', type => 'enum GimpPDBErrorHandler',
desc => "Who is responsible for handling procedure call errors" }
);
%invoke = (
code => <<'CODE'
{
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in)
{
handler = gimp_plug_in_get_error_handler (plug_in);
}
else
success = FALSE;
}
CODE
);
}
@headers = qw(<string.h>
<stdlib.h>
"libgimpbase/gimpbase.h"
"core/gimp.h"
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
"plug-in/gimpplugin.h"
"plug-in/gimpplugindef.h"
app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps 2006-04-29 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager.[ch]: new object which keeps all plug-in related stuff that was kept in the Gimp instance. Has "menu-branch-added" and "last-plug-in-changed" signals. * app/plug-in/plug-ins.[ch]: removed, all its functions are in GimpPlugInManager now. * app/core/gimpmarshal.list: new marshaller for the new object. * app/core/gimp.[ch]: removed all plug-in related stuff and keep a GimpPlugInManager around. * app/plug-in/plug-in-data.[ch] * app/plug-in/plug-in-file.[ch] * app/plug-in/plug-in-help-domain.[ch] * app/plug-in/plug-in-locale-domain.[ch] * app/plug-in/plug-in-menu-branch.[ch] * app/plug-in/plug-ins-query.[ch]: removed... * app/plug-in/gimppluginmanager-data.[ch] * app/plug-in/gimppluginmanager-file.[ch] * app/plug-in/gimppluginmanager-help-domain.[ch] * app/plug-in/gimppluginmanager-locale-domain.[ch] * app/plug-in/gimppluginmanager-menu-branch.[ch] * app/plug-in/gimppluginmanager-query.[ch]: ...and added as methods of GimpPlugInManager. * app/plug-in/plug-in-debug.[ch] * app/plug-in/plug-in-shm.[ch]: removed... * app/plug-in/gimpplugindebug.[ch] * app/plug-in/gimppluginshm.[ch]: ...and added as properly namespeced structs with constructors and destructors. * app/core/Makefile.am * app/core/gimpenvirontable.[ch] * app/core/gimpinterpreterdb.[ch]: removed... * app/plug-in/gimpenvirontable.[ch] * app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all related stuff. * app/actions/plug-in-actions.[ch]: connect to the plug-in-manager's "menu-path-added" signal and create menu branch actions accordingly. * app/plug-in/plug-in-context.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/plug-in/plug-in.[ch] * app/app_procs.c * app/actions/file-commands.c * app/actions/plug-in-commands.c * app/core/gimpimage.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/gui/gui.c * app/menus/plug-in-menus.c * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c * app/xcf/xcf.c * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: follow above refactoring. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-04-29 06:26:51 +08:00
"plug-in/gimppluginmanager.h"
"plug-in/gimppluginmanager-menu-branch.h"
"plug-in/gimppluginmanager-query.h"
"plug-in/gimppluginprocedure.h"
"gimppdb-utils.h");
app/Makefile.am removed... 2001-11-30 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/plug_in.[ch]: removed... * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in.[ch]: ...and added here. * app/appenv.h: removed StackTraceMode and MessageHandlerType... * libgimpbase/gimpbasetypes.h: ...and added them here. * tools/pdbgen/Makefile.am: don't scan "app/apptypes.h" for enums. * tools/pdbgen/enumcode.pl: added a general check to prevent enums which are defined in libgimp* from being written to "libgimp/gimpenums.c". * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/core/core-types.h: include "pdb/pdb-types.h" so including "core/core-types.h" gets the whole core type space. * app/core/gimp.[ch]: added a "stack_trace_mode" parameter to the constructor and store it in the Gimp struct because the value is also passed to plug-ins and nobody should include "appenv.h". * app/gimprc.[ch]: pass the alternate_system_gimprc and alternate_gimprc filenames from the command line to gimprc_prase() so we don't need to include "appenv.h". * app/batch.[ch]: pass the "batch_cmds" as parameter, don't include "append.h". * app/app_procs.c: pass more parameters around. * app/devices.c * app/errors.c * app/gimphelp.c * app/main.c * app/core/gimpgradient.c * app/display/gimpdisplay.c * app/display/gimpdisplayshell.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/commands.c * app/gui/error-console-dialog.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/paths-dialog.c * app/gui/user-install-dialog.c * app/tools/gimpbezierselecttool.c * app/tools/xinput_airbrush.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly: - changed "plug-in.h" include where needed. - don't call gimp_fatal_error() directly, it's called via the log handler when calling g_error(). - don't incude "errors.h" except from main.c. - changed stack_trace and message_handler enum names. - get "stack_trace_mode" from Gimp. - removed many inclusions of "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db.c: regenerated.
2001-12-01 08:14:14 +08:00
@procs = qw(plug_ins_query
plug_in_domain_register
plug_in_help_register
plug_in_menu_branch_register
plug_in_set_pdb_error_handler
plug_in_get_pdb_error_handler);
%exports = (app => [@procs], lib => [@procs[1,2,3,4,5]]);
$desc = 'Plug-in';
$lib_private = 1;
1;