made gimp_help accessible through the PDB

--Sven
This commit is contained in:
Sven Neumann 1997-01-03 10:28:33 +00:00
parent a88ba5154b
commit 67facde935
2 changed files with 127 additions and 0 deletions

72
app/gimphelp_cmds.c Normal file
View File

@ -0,0 +1,72 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995-1999 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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl. */
#include "procedural_db.h"
#include "gimphelp.h"
static ProcRecord help_proc;
void
register_gimphelp_procs (void)
{
procedural_db_register (&help_proc);
}
static Argument *
help_invoker (Argument *args)
{
gboolean success = TRUE;
gchar *path;
path = (gchar *) args[0].value.pdb_pointer;
if (path == NULL)
success = FALSE;
if (success)
gimp_help (path);
return procedural_db_return_args (&help_proc, success);
}
static ProcArg help_inargs[] =
{
{
PDB_STRING,
"path",
"The location of the help page"
}
};
static ProcRecord help_proc =
{
"gimp_help",
"Load a help page.",
"This procedure loads the specified help page into the helpbrowser or what ever is configured as help viewer. The location of the jelp page is given relative to the help rootdir.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer <mitch@gimp.org>",
"1999",
PDB_INTERNAL,
1,
help_inargs,
0,
NULL,
{ { help_invoker } }
};

View File

@ -0,0 +1,55 @@
# 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.
# "Perlized" from C source by Sven Neumann <sven@gimp.org>
sub pdb_misc {
$author = $copyright = 'Michael Natterer <mitch@gimp.org>';
$date = '1999';
}
sub help {
my $path = $_;
$blurb = "Load a help page.";
$help = <<HELP;
This procedure loads the specified help page into the helpbrowser or what ever
is configured as help viewer. The location of the jelp page is given relative
to the help rootdir.
HELP
&pdb_misc;
@inargs = (
{ name => 'path', type => 'string',
desc => 'The location of the help page' }
);
%invoke = (
code => 'gimp_help (path);'
);
}
@headers = qw("gimphelp.h");
@procs = qw(help);
%exports = (app => [@procs]);
$desc = 'Help procedures';
1;