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
*
* 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 .
*/
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"
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-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
2006-11-01 03:02:56 +08:00
# include "internal_procs.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. " ,
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
}