2006-12-10 05:33:38 +08:00
/* GIMP - The GNU Image Manipulation Program
2003-07-03 08:47:26 +08:00
* Copyright ( C ) 1995 - 2003 Spencer Kimball and Peter Mattis
1997-01-03 18:28:33 +08:00
*
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
2009-01-18 06:28:01 +08:00
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
1997-01-03 18:28:33 +08:00
*/
2007-01-09 18:52:47 +08:00
/* NOTE: This file is auto-generated by pdbgen.pl. */
1997-01-03 18:28:33 +08:00
2000-12-29 23:22:01 +08:00
# include "config.h"
2008-10-10 04:24:04 +08:00
# include <gegl.h>
2000-12-29 23:22:01 +08:00
2012-05-03 09:36:22 +08:00
# include <gdk-pixbuf/gdk-pixbuf.h>
2012-05-04 06:50:23 +08:00
# include "libgimpbase/gimpbase.h"
2001-08-17 22:27:31 +08:00
# include "pdb-types.h"
1997-01-03 18:28:33 +08:00
2004-01-20 20:38:31 +08:00
# include "core/gimp.h"
2008-02-08 01:08:54 +08:00
# include "core/gimpparamspecs.h"
2006-05-04 02:05:06 +08:00
# include "plug-in/gimpplugin.h"
2006-04-29 06:26:51 +08:00
# include "plug-in/gimppluginmanager-help-domain.h"
# include "plug-in/gimppluginmanager.h"
1997-01-03 18:28:33 +08:00
2008-02-08 01:08:54 +08:00
# include "gimppdb.h"
# include "gimpprocedure.h"
2008-04-04 19:15:55 +08:00
# include "internal-procs.h"
2006-11-01 03:02:56 +08:00
1997-01-03 18:28:33 +08:00
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2012-05-29 01:55:28 +08:00
help_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
1997-01-03 18:28:33 +08:00
{
gboolean success = TRUE ;
2006-04-03 00:03:32 +08:00
const gchar * help_domain ;
const gchar * help_id ;
1997-01-03 18:28:33 +08:00
2012-05-04 06:50:23 +08: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 18:28:33 +08:00
if ( success )
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-03-27 00:49:18 +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-03-27 00:38:44 +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
}
1997-01-03 18:28:33 +08:00
2008-08-16 21:57:57 +08:00
return gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
1997-01-03 18:28:33 +08:00
}
2006-04-05 05:11:45 +08:00
void
2006-04-26 17:13:47 +08:00
register_help_procs ( GimpPDB * pdb )
1997-01-03 18:28:33 +08:00
{
2006-04-05 05:11:45 +08:00
GimpProcedure * procedure ;
/*
* gimp - help
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( help_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-help " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-help " ,
" Load a help page. " ,
2006-06-14 16:32:08 +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 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-05 05:11:45 +08: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 22:23:05 +08:00
FALSE , TRUE , FALSE ,
2006-04-05 05:11:45 +08: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 22:23:05 +08:00
FALSE , FALSE , FALSE ,
2006-04-05 05:11:45 +08:00
NULL ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
}