2006-12-09 13:33:38 -08:00
/* GIMP - The GNU Image Manipulation Program
2003-07-02 17:47:26 -07:00
* Copyright ( C ) 1995 - 2003 Spencer Kimball and Peter Mattis
1997-01-03 02:28:33 -08:00
*
2009-01-17 14:28:01 -08:00
* This program is free software : you can redistribute it and / or modify
1997-01-03 02:28:33 -08:00
* it under the terms of the GNU General Public License as published by
2009-01-17 14:28:01 -08:00
* the Free Software Foundation ; either version 3 of the License , or
1997-01-03 02: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-11 14:47:19 -07:00
* along with this program . If not , see < https : //www.gnu.org/licenses/>.
1997-01-03 02:28:33 -08:00
*/
2007-01-09 02:52:47 -08:00
/* NOTE: This file is auto-generated by pdbgen.pl. */
1997-01-03 02:28:33 -08:00
2000-12-29 07:22:01 -08:00
# include "config.h"
2008-10-09 13:24:04 -07:00
# include <gegl.h>
2000-12-29 07:22:01 -08:00
2012-05-02 18:36:22 -07:00
# include <gdk-pixbuf/gdk-pixbuf.h>
2012-05-03 15:50:23 -07:00
# include "libgimpbase/gimpbase.h"
2001-08-17 07:27:31 -07:00
# include "pdb-types.h"
1997-01-03 02:28:33 -08:00
2004-01-20 04:38:31 -08:00
# include "core/gimp.h"
2008-02-07 09:08:54 -08:00
# include "core/gimpparamspecs.h"
2006-05-03 11:05:06 -07:00
# include "plug-in/gimpplugin.h"
2006-04-28 15:26:51 -07:00
# include "plug-in/gimppluginmanager-help-domain.h"
# include "plug-in/gimppluginmanager.h"
1997-01-03 02:28:33 -08:00
2008-02-07 09:08:54 -08:00
# include "gimppdb.h"
# include "gimpprocedure.h"
2008-04-04 04:15:55 -07:00
# include "internal-procs.h"
2006-10-31 11:02:56 -08:00
1997-01-03 02:28:33 -08:00
2012-05-03 15:50:23 -07:00
static GimpValueArray *
2012-05-28 10:55:28 -07:00
help_invoker ( GimpProcedure * procedure ,
2012-05-03 15:50:23 -07:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
1997-01-03 02:28:33 -08:00
{
gboolean success = TRUE ;
2006-04-02 09:03:32 -07:00
const gchar * help_domain ;
const gchar * help_id ;
1997-01-03 02:28:33 -08:00
2012-05-03 15:50:23 -07:00
help_domain = g_value_get_string ( gimp_value_array_index ( args , 0 ) ) ;
help_id = g_value_get_string ( gimp_value_array_index ( args , 1 ) ) ;
1997-01-03 02:28:33 -08:00
if ( success )
2004-01-20 04:38:31 -08:00
{
2006-04-28 15:26:51 -07:00
GimpPlugInManager * manager = gimp - > plug_in_manager ;
if ( ! help_domain & & manager - > current_plug_in )
2004-03-26 08:49:18 -08:00
help_domain = ( gchar * )
2006-04-28 15:26:51 -07:00
gimp_plug_in_manager_get_help_domain ( manager ,
2014-07-08 12:09:35 -07:00
manager - > current_plug_in - > file ,
2006-04-28 15:26:51 -07:00
NULL ) ;
2004-03-26 08:38:44 -08:00
2008-06-10 02:54:54 -07:00
gimp_help ( gimp , progress , help_domain , help_id ) ;
2004-01-20 04:38:31 -08:00
}
1997-01-03 02:28:33 -08:00
2008-08-16 06:57:57 -07:00
return gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
1997-01-03 02:28:33 -08:00
}
2006-04-04 14:11:45 -07:00
void
2006-04-26 02:13:47 -07:00
register_help_procs ( GimpPDB * pdb )
1997-01-03 02:28:33 -08:00
{
2006-04-04 14:11:45 -07:00
GimpProcedure * procedure ;
/*
* gimp - help
*/
2006-04-06 03:01:30 -07:00
procedure = gimp_procedure_new ( help_invoker ) ;
2008-04-04 03:58:56 -07:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-help " ) ;
2006-04-04 14:11:45 -07:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-help " ,
" Load a help page. " ,
2006-06-14 01:32:08 -07: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 which was registered using the 'gimp-plugin-help-register' procedure. If help_domain is NULL and no help domain was registered, the help domain of the main GIMP installation is used. " ,
2006-04-04 14:11:45 -07:00
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer " ,
" 2000 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " help-domain " ,
" help domain " ,
" The help domain in which help_id is registered " ,
2007-04-25 07:23:05 -07:00
FALSE , TRUE , FALSE ,
2006-04-04 14:11:45 -07:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " help-id " ,
" help id " ,
" The help page's ID " ,
2007-04-25 07:23:05 -07:00
FALSE , FALSE , FALSE ,
2006-04-04 14:11:45 -07:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 02:13:47 -07:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 01:16:26 -07:00
g_object_unref ( procedure ) ;
2006-04-04 14:11:45 -07:00
}