1997-01-03 18:28:33 +08:00
/* The GIMP -- an 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
*
* 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. */
2000-12-29 23:22:01 +08:00
# include "config.h"
2001-08-17 22:27:31 +08:00
# include <glib-object.h>
2000-12-29 23:22:01 +08:00
2001-08-17 22:27:31 +08:00
# include "pdb-types.h"
2006-04-26 17:13:47 +08:00
# include "gimppdb.h"
2006-03-31 17:15:08 +08:00
# include "gimpprocedure.h"
2006-03-29 03:58:00 +08:00
# include "core/gimpparamspecs.h"
1997-01-03 18:28:33 +08:00
2004-01-20 20:38:31 +08:00
# include "core/gimp.h"
2006-04-29 06:26:51 +08:00
# include "plug-in/gimppluginmanager-help-domain.h"
# include "plug-in/gimppluginmanager.h"
2004-01-20 20:38:31 +08:00
# include "plug-in/plug-in.h"
1997-01-03 18:28:33 +08:00
2006-04-04 18:30:58 +08:00
static GValueArray *
help_invoker ( GimpProcedure * procedure ,
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GValueArray * args )
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
2006-04-04 18:30:58 +08:00
help_domain = g_value_get_string ( & args - > values [ 0 ] ) ;
help_id = g_value_get_string ( & args - > values [ 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 ,
manager - > current_plug_in - > prog ,
NULL ) ;
2004-03-27 00:38:44 +08:00
2004-01-20 20:38:31 +08:00
gimp_help ( gimp , help_domain , help_id ) ;
}
1997-01-03 18:28:33 +08:00
2006-04-01 01:42:13 +08:00
return gimp_procedure_get_return_values ( procedure , success ) ;
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 ) ;
2006-04-07 18:04:27 +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. " ,
" 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. " ,
" 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 " ,
FALSE , TRUE ,
NULL ,
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_string ( " help-id " ,
" help id " ,
" The help page's ID " ,
FALSE , FALSE ,
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
}