2006-12-10 05:33:38 +08:00
|
|
|
# GIMP - The GNU Image Manipulation Program
|
1997-01-03 18:28:33 +08:00
|
|
|
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
2009-01-18 06:28:01 +08:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
1997-01-03 18:28:33 +08:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
1997-01-03 18:28:33 +08:00
|
|
|
# (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
|
2018-07-12 05:27:07 +08:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1997-01-03 18:28:33 +08:00
|
|
|
|
|
|
|
# "Perlized" from C source by Sven Neumann <sven@gimp.org>
|
|
|
|
|
|
|
|
sub help {
|
|
|
|
$blurb = "Load a help page.";
|
|
|
|
|
|
|
|
$help = <<HELP;
|
2004-01-20 20:38:31 +08:00
|
|
|
This procedure loads the specified help page into the helpbrowser or
|
|
|
|
what ever is configured as help viewer. The help page is identified by
|
|
|
|
its domain and ID: if help_domain is NULL, we use the help_domain
|
2006-06-14 16:32:08 +08:00
|
|
|
which was registered using the gimp_plugin_help_register() procedure. If
|
2004-01-20 20:38:31 +08:00
|
|
|
help_domain is NULL and no help domain was registered, the help domain
|
|
|
|
of the main GIMP installation is used.
|
1997-01-03 18:28:33 +08:00
|
|
|
HELP
|
|
|
|
|
2006-03-15 05:35:50 +08:00
|
|
|
&mitch_pdb_misc('2000');
|
1997-01-03 18:28:33 +08:00
|
|
|
|
|
|
|
@inargs = (
|
2004-01-20 20:38:31 +08:00
|
|
|
{ name => 'help_domain', type => 'string', null_ok => 1,
|
|
|
|
desc => "The help domain in which help_id is registered" },
|
2003-08-29 02:49:11 +08:00
|
|
|
{ name => 'help_id', type => 'string',
|
2004-05-20 09:13:14 +08:00
|
|
|
desc => "The help page's ID" }
|
1997-01-03 18:28:33 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
%invoke = (
|
2006-03-22 17:58:08 +08:00
|
|
|
code => <<'CODE'
|
2004-01-20 20:38:31 +08:00
|
|
|
{
|
2006-04-29 06:26:51 +08:00
|
|
|
GimpPlugInManager *manager = gimp->plug_in_manager;
|
|
|
|
|
|
|
|
if (! help_domain && manager->current_plug_in)
|
2004-01-20 20:38:31 +08:00
|
|
|
help_domain = (gchar *)
|
2006-04-29 06:26:51 +08:00
|
|
|
gimp_plug_in_manager_get_help_domain (manager,
|
2014-07-09 03:09:35 +08:00
|
|
|
manager->current_plug_in->file,
|
2006-04-29 06:26:51 +08:00
|
|
|
NULL);
|
2004-01-20 20:38:31 +08:00
|
|
|
|
2008-06-10 17:54:54 +08:00
|
|
|
gimp_help (gimp, progress, help_domain, help_id);
|
2004-01-20 20:38:31 +08:00
|
|
|
}
|
|
|
|
CODE
|
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
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2006-03-24 05:17:16 +08:00
|
|
|
|
2006-04-29 06:26:51 +08:00
|
|
|
@headers = qw("core/gimp.h"
|
2006-05-04 02:05:06 +08:00
|
|
|
"plug-in/gimpplugin.h"
|
2006-04-29 06:26:51 +08:00
|
|
|
"plug-in/gimppluginmanager.h"
|
2006-05-04 02:05:06 +08:00
|
|
|
"plug-in/gimppluginmanager-help-domain.h");
|
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
|
|
|
|
2000-05-31 21:24:14 +08:00
|
|
|
@procs = qw(help);
|
2006-03-24 05:17:16 +08:00
|
|
|
|
2000-06-01 05:16:11 +08:00
|
|
|
%exports = (app => [@procs], lib => [@procs]);
|
1997-01-03 18:28:33 +08:00
|
|
|
|
|
|
|
$desc = 'Help procedures';
|
2010-07-07 17:43:10 +08:00
|
|
|
$doc_title = 'gimphelp';
|
|
|
|
$doc_short_desc = 'Loading help pages using gimp_help.';
|
|
|
|
$doc_long_desc = 'Loading help pages using gimp_help.';
|
1997-01-03 18:28:33 +08:00
|
|
|
|
|
|
|
1;
|