1999-05-04 03:22:58 +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
1999-05-04 03:22:58 +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"
1999-05-04 03:22:58 +08:00
# include <stdlib.h>
# include <string.h>
2001-08-17 22:27:31 +08:00
# include <glib-object.h>
2000-12-29 23:22:01 +08:00
2004-05-07 07:26:45 +08:00
# include "libgimpbase/gimpbase.h"
2004-05-07 08:30:24 +08:00
# include "libgimpbase/gimpprotocol.h"
2004-05-07 07:26:45 +08:00
2001-08-17 22:27:31 +08:00
# include "pdb-types.h"
2000-12-29 23:22:01 +08:00
# include "procedural_db.h"
2001-10-29 19:47:11 +08:00
# include "core/gimp.h"
2002-03-21 01:46:13 +08:00
# include "plug-in/plug-in-def.h"
2004-05-07 08:30:24 +08:00
# include "plug-in/plug-in-params.h"
2004-09-22 23:12:24 +08:00
# include "plug-in/plug-in-proc-def.h"
2001-12-01 08:14:14 +08:00
# include "plug-in/plug-in.h"
2005-04-06 05:10:55 +08:00
# include "plug-in/plug-ins-query.h"
2002-03-21 01:46:13 +08:00
# include "plug-in/plug-ins.h"
2001-01-03 08:42:57 +08:00
1999-05-04 03:22:58 +08:00
static ProcRecord plugins_query_proc ;
2000-05-31 21:24:14 +08:00
static ProcRecord plugin_domain_register_proc ;
static ProcRecord plugin_help_register_proc ;
2004-05-06 22:23:21 +08:00
static ProcRecord plugin_menu_register_proc ;
2005-03-25 00:08:04 +08:00
static ProcRecord plugin_menu_branch_register_proc ;
2004-05-19 05:19:43 +08:00
static ProcRecord plugin_icon_register_proc ;
1999-05-04 03:22:58 +08:00
void
2001-07-05 03:31:35 +08:00
register_plug_in_procs ( Gimp * gimp )
1999-05-04 03:22:58 +08:00
{
2001-07-05 03:31:35 +08:00
procedural_db_register ( gimp , & plugins_query_proc ) ;
procedural_db_register ( gimp , & plugin_domain_register_proc ) ;
procedural_db_register ( gimp , & plugin_help_register_proc ) ;
2004-05-06 22:23:21 +08:00
procedural_db_register ( gimp , & plugin_menu_register_proc ) ;
2005-03-25 00:08:04 +08:00
procedural_db_register ( gimp , & plugin_menu_branch_register_proc ) ;
2004-05-19 05:19:43 +08:00
procedural_db_register ( gimp , & plugin_icon_register_proc ) ;
1999-05-04 03:22:58 +08:00
}
static Argument *
2004-08-11 02:47:21 +08:00
plugins_query_invoker ( Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
1999-05-04 03:22:58 +08:00
{
Argument * return_args ;
gchar * search_str ;
gint32 num_plugins = 0 ;
gchar * * menu_strs ;
gchar * * accel_strs ;
gchar * * prog_strs ;
gchar * * types_strs ;
gint32 * time_ints ;
gchar * * realname_strs ;
search_str = ( gchar * ) args [ 0 ] . value . pdb_pointer ;
2005-04-06 05:10:55 +08:00
num_plugins = plug_ins_query ( gimp , search_str ,
& menu_strs ,
& accel_strs ,
& prog_strs ,
& types_strs ,
& realname_strs ,
& time_ints ) ;
1999-05-04 03:22:58 +08:00
return_args = procedural_db_return_args ( & plugins_query_proc , TRUE ) ;
return_args [ 1 ] . value . pdb_int = num_plugins ;
return_args [ 2 ] . value . pdb_pointer = menu_strs ;
return_args [ 3 ] . value . pdb_int = num_plugins ;
return_args [ 4 ] . value . pdb_pointer = accel_strs ;
return_args [ 5 ] . value . pdb_int = num_plugins ;
return_args [ 6 ] . value . pdb_pointer = prog_strs ;
return_args [ 7 ] . value . pdb_int = num_plugins ;
return_args [ 8 ] . value . pdb_pointer = types_strs ;
return_args [ 9 ] . value . pdb_int = num_plugins ;
return_args [ 10 ] . value . pdb_pointer = time_ints ;
return_args [ 11 ] . value . pdb_int = num_plugins ;
return_args [ 12 ] . value . pdb_pointer = realname_strs ;
return return_args ;
}
static ProcArg plugins_query_inargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
1999-05-04 03:22:58 +08:00
" search_string " ,
" If not an empty string then use this as a search pattern "
}
} ;
static ProcArg plugins_query_outargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-05-04 03:22:58 +08:00
" num_plugins " ,
" The number of plugins "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRINGARRAY ,
1999-05-04 03:22:58 +08:00
" menu_path " ,
" The menu path of the plugin "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-05-04 03:22:58 +08:00
" num_plugins " ,
" The number of plugins "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRINGARRAY ,
1999-05-04 03:22:58 +08:00
" plugin_accelerator " ,
" String representing keyboard accelerator (could be empty string) "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-05-04 03:22:58 +08:00
" num_plugins " ,
" The number of plugins "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRINGARRAY ,
1999-05-04 03:22:58 +08:00
" plugin_location " ,
" Location of the plugin program "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-05-04 03:22:58 +08:00
" num_plugins " ,
" The number of plugins "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRINGARRAY ,
1999-05-04 03:22:58 +08:00
" plugin_image_type " ,
" Type of image that this plugin will work on "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-05-04 03:22:58 +08:00
" num_plugins " ,
" The number of plugins "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32ARRAY ,
1999-05-04 03:22:58 +08:00
" plugin_install_time " ,
" Time that the plugin was installed "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_INT32 ,
1999-05-04 03:22:58 +08:00
" num_plugins " ,
" The number of plugins "
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRINGARRAY ,
1999-05-04 03:22:58 +08:00
" plugin_real_name " ,
" The internal name of the plugin "
}
} ;
static ProcRecord plugins_query_proc =
{
" gimp_plugins_query " ,
" Queries the plugin database for its contents. " ,
" This procedure queries the contents of the plugin database. " ,
" Andy Thomas " ,
" Andy Thomas " ,
" 1998 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
1999-05-04 03:22:58 +08:00
1 ,
plugins_query_inargs ,
12 ,
plugins_query_outargs ,
{ { plugins_query_invoker } }
} ;
2000-02-24 02:07:53 +08:00
static Argument *
2004-08-11 02:47:21 +08:00
plugin_domain_register_invoker ( Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2000-02-24 02:07:53 +08:00
{
gboolean success = TRUE ;
gchar * domain_name ;
gchar * domain_path ;
domain_name = ( gchar * ) args [ 0 ] . value . pdb_pointer ;
2003-08-19 02:09:26 +08:00
if ( domain_name = = NULL | | ! g_utf8_validate ( domain_name , - 1 , NULL ) )
2000-02-24 02:07:53 +08:00
success = FALSE ;
domain_path = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
if ( success )
{
2003-02-11 20:07:31 +08:00
if ( gimp - > current_plug_in & & gimp - > current_plug_in - > query )
2004-03-27 00:49:18 +08:00
{
plug_in_def_set_locale_domain_name ( gimp - > current_plug_in - > plug_in_def ,
domain_name ) ;
plug_in_def_set_locale_domain_path ( gimp - > current_plug_in - > plug_in_def ,
domain_path ) ;
}
2004-07-16 22:43:56 +08:00
else
success = FALSE ;
2000-02-24 02:07:53 +08:00
}
2000-05-31 21:24:14 +08:00
return procedural_db_return_args ( & plugin_domain_register_proc , success ) ;
2000-02-24 02:07:53 +08:00
}
2000-05-31 21:24:14 +08:00
static ProcArg plugin_domain_register_inargs [ ] =
2000-02-24 02:07:53 +08:00
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2000-02-24 02:07:53 +08:00
" domain_name " ,
2003-08-20 03:08:11 +08:00
" The name of the textdomain (must be unique) "
2000-02-24 02:07:53 +08:00
} ,
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2000-02-24 02:07:53 +08:00
" domain_path " ,
2003-08-20 03:08:11 +08:00
" The absolute path to the compiled message catalog (may be NULL) "
2000-02-24 02:07:53 +08:00
}
} ;
2000-05-31 21:24:14 +08:00
static ProcRecord plugin_domain_register_proc =
2000-02-24 02:07:53 +08:00
{
2000-05-31 21:24:14 +08:00
" gimp_plugin_domain_register " ,
" Registers a textdomain for localisation. " ,
2000-05-31 14:15:06 +08:00
" This procedure adds a textdomain to the list of domains Gimp searches for strings when translating its menu entries. There is no need to call this function for plug-ins that have their strings included in the gimp-std-plugins domain as that is used by default. If the compiled message catalog is not in the standard location, you may specify an absolute path to another location. This procedure can only be called in the query function of a plug-in and it has to be called before any procedure is installed. " ,
2000-02-24 02:07:53 +08:00
" Sven Neumann " ,
" Sven Neumann " ,
" 2000 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2000-02-24 02:07:53 +08:00
2 ,
2000-05-31 21:24:14 +08:00
plugin_domain_register_inargs ,
2000-02-24 02:07:53 +08:00
0 ,
NULL ,
2000-05-31 21:24:14 +08:00
{ { plugin_domain_register_invoker } }
} ;
static Argument *
2004-08-11 02:47:21 +08:00
plugin_help_register_invoker ( Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2000-05-31 21:24:14 +08:00
{
gboolean success = TRUE ;
2003-08-29 02:49:11 +08:00
gchar * domain_name ;
gchar * domain_uri ;
domain_name = ( gchar * ) args [ 0 ] . value . pdb_pointer ;
if ( domain_name = = NULL | | ! g_utf8_validate ( domain_name , - 1 , NULL ) )
success = FALSE ;
2000-05-31 21:24:14 +08:00
2003-08-29 02:49:11 +08:00
domain_uri = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
if ( domain_uri = = NULL | | ! g_utf8_validate ( domain_uri , - 1 , NULL ) )
2000-05-31 21:24:14 +08:00
success = FALSE ;
if ( success )
{
2003-02-11 20:07:31 +08:00
if ( gimp - > current_plug_in & & gimp - > current_plug_in - > query )
2004-03-27 00:49:18 +08:00
{
plug_in_def_set_help_domain_name ( gimp - > current_plug_in - > plug_in_def ,
domain_name ) ;
plug_in_def_set_help_domain_uri ( gimp - > current_plug_in - > plug_in_def ,
domain_uri ) ;
}
2004-07-16 22:43:56 +08:00
else
success = FALSE ;
2000-05-31 21:24:14 +08:00
}
return procedural_db_return_args ( & plugin_help_register_proc , success ) ;
}
static ProcArg plugin_help_register_inargs [ ] =
{
{
2001-05-21 21:58:46 +08:00
GIMP_PDB_STRING ,
2003-08-29 02:49:11 +08:00
" domain_name " ,
" The XML namespace of the plug-in's help pages "
} ,
{
GIMP_PDB_STRING ,
" domain_uri " ,
" The root URI of the plug-in's help pages "
2000-05-31 21:24:14 +08:00
}
} ;
static ProcRecord plugin_help_register_proc =
{
" gimp_plugin_help_register " ,
" Register a help path for a plug-in. " ,
2003-08-29 02:49:11 +08:00
" This procedure changes the help rootdir for the plug-in which calls it. All subsequent calls of gimp_help from this plug-in will be interpreted relative to this rootdir. " ,
2000-05-31 21:24:14 +08:00
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer <mitch@gimp.org> " ,
" 2000 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2001-05-21 21:58:46 +08:00
GIMP_INTERNAL ,
2003-08-29 02:49:11 +08:00
2 ,
2000-05-31 21:24:14 +08:00
plugin_help_register_inargs ,
0 ,
NULL ,
{ { plugin_help_register_invoker } }
2000-02-24 02:07:53 +08:00
} ;
2004-05-06 21:51:56 +08:00
static Argument *
2004-08-11 02:47:21 +08:00
plugin_menu_register_invoker ( Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2004-05-06 21:51:56 +08:00
{
gboolean success = TRUE ;
gchar * procedure_name ;
gchar * menu_path ;
procedure_name = ( gchar * ) args [ 0 ] . value . pdb_pointer ;
if ( procedure_name = = NULL | | ! g_utf8_validate ( procedure_name , - 1 , NULL ) )
success = FALSE ;
menu_path = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
if ( menu_path = = NULL | | ! g_utf8_validate ( menu_path , - 1 , NULL ) )
success = FALSE ;
if ( success )
{
2004-11-17 22:51:50 +08:00
if ( gimp - > current_plug_in )
2004-05-06 21:51:56 +08:00
{
2004-11-17 22:51:50 +08:00
PlugInProcDef * proc_def = NULL ;
2004-05-06 21:51:56 +08:00
2004-11-17 22:51:50 +08:00
if ( gimp - > current_plug_in - > plug_in_def )
2005-05-05 02:53:58 +08:00
proc_def = plug_in_proc_def_find ( gimp - > current_plug_in - > plug_in_def - > proc_defs ,
procedure_name ) ;
2004-05-06 21:51:56 +08:00
2004-11-17 22:51:50 +08:00
if ( ! proc_def )
2005-05-05 02:53:58 +08:00
proc_def = plug_in_proc_def_find ( gimp - > current_plug_in - > temp_proc_defs ,
procedure_name ) ;
2004-05-07 08:30:24 +08:00
2004-11-17 22:51:50 +08:00
if ( proc_def )
{
if ( proc_def - > menu_label )
{
GError * error = NULL ;
if ( ! plug_in_proc_args_check ( gimp - > current_plug_in - > name ,
gimp - > current_plug_in - > prog ,
procedure_name ,
menu_path ,
proc_def - > db_info . args ,
proc_def - > db_info . num_args ,
proc_def - > db_info . values ,
proc_def - > db_info . num_values ,
& error ) )
{
g_message ( error - > message ) ;
g_clear_error ( & error ) ;
success = FALSE ;
}
else
{
switch ( proc_def - > db_info . proc_type )
{
case GIMP_INTERNAL :
2004-05-07 08:30:24 +08:00
success = FALSE ;
2004-11-17 22:51:50 +08:00
break ;
case GIMP_PLUGIN :
case GIMP_EXTENSION :
if ( ! gimp - > current_plug_in - > query & &
! gimp - > current_plug_in - > init )
success = FALSE ;
break ;
case GIMP_TEMPORARY :
break ;
2004-05-07 08:30:24 +08:00
}
2004-11-17 22:51:50 +08:00
if ( success )
2004-05-07 08:30:24 +08:00
{
proc_def - > menu_paths = g_list_append ( proc_def - > menu_paths ,
g_strdup ( menu_path ) ) ;
2004-11-18 09:57:13 +08:00
if ( ! gimp - > no_interface & &
proc_def - > db_info . proc_type = = GIMP_TEMPORARY )
{
2005-03-25 00:08:04 +08:00
gimp_menus_create_item ( gimp , proc_def , menu_path ) ;
2004-11-18 09:57:13 +08:00
}
2004-11-17 22:51:50 +08:00
}
2004-05-07 08:30:24 +08:00
}
2004-11-17 22:51:50 +08:00
}
else
{
g_message ( " Plug-In \" %s \" \n (%s) \n \n "
" attempted to install additional menu_path \" %s \" \n "
" for procedure \" %s \" . \n "
" However the menu_path given in "
" gimp_install_procedure() already contained "
" a path. To make this work, pass just the menu's "
" label to gimp_install_procedure(). " ,
gimp_filename_to_utf8 ( gimp - > current_plug_in - > name ) ,
gimp_filename_to_utf8 ( gimp - > current_plug_in - > prog ) ,
menu_path , procedure_name ) ;
success = FALSE ;
2004-05-06 21:51:56 +08:00
}
}
2004-11-17 22:51:50 +08:00
else
2004-05-06 21:51:56 +08:00
success = FALSE ;
}
2004-07-16 22:43:56 +08:00
else
success = FALSE ;
2004-05-06 21:51:56 +08:00
}
2004-05-06 22:23:21 +08:00
return procedural_db_return_args ( & plugin_menu_register_proc , success ) ;
2004-05-06 21:51:56 +08:00
}
2004-05-06 22:23:21 +08:00
static ProcArg plugin_menu_register_inargs [ ] =
2004-05-06 21:51:56 +08:00
{
{
GIMP_PDB_STRING ,
" procedure_name " ,
" The procedure for which to install the menu path "
} ,
{
GIMP_PDB_STRING ,
" menu_path " ,
" The procedure's additional menu path "
}
} ;
2004-05-06 22:23:21 +08:00
static ProcRecord plugin_menu_register_proc =
2004-05-06 21:51:56 +08:00
{
2004-05-06 22:23:21 +08:00
" gimp_plugin_menu_register " ,
2004-05-06 21:51:56 +08:00
" Register an additional menu path for a plug-in procedure. " ,
" This procedure installs an additional menu entry for the given procedure. " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer <mitch@gimp.org> " ,
" 2004 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2004-05-06 21:51:56 +08:00
GIMP_INTERNAL ,
2 ,
2004-05-06 22:23:21 +08:00
plugin_menu_register_inargs ,
2004-05-06 21:51:56 +08:00
0 ,
NULL ,
2004-05-06 22:23:21 +08:00
{ { plugin_menu_register_invoker } }
2004-05-06 21:51:56 +08:00
} ;
2004-05-19 05:19:43 +08:00
2005-03-25 00:08:04 +08:00
static Argument *
plugin_menu_branch_register_invoker ( Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
{
gboolean success = TRUE ;
gchar * menu_path ;
gchar * menu_name ;
menu_path = ( gchar * ) args [ 0 ] . value . pdb_pointer ;
if ( menu_path = = NULL | | ! g_utf8_validate ( menu_path , - 1 , NULL ) )
success = FALSE ;
menu_name = ( gchar * ) args [ 1 ] . value . pdb_pointer ;
if ( menu_name = = NULL | | ! g_utf8_validate ( menu_name , - 1 , NULL ) )
success = FALSE ;
if ( success )
{
if ( gimp - > current_plug_in )
{
plug_ins_menu_branch_add ( gimp , gimp - > current_plug_in - > prog ,
menu_path , menu_name ) ;
if ( ! gimp - > no_interface )
{
gimp_menus_create_branch ( gimp , gimp - > current_plug_in - > prog ,
menu_path , menu_name ) ;
}
else
success = FALSE ;
}
else
success = FALSE ;
}
return procedural_db_return_args ( & plugin_menu_branch_register_proc , success ) ;
}
static ProcArg plugin_menu_branch_register_inargs [ ] =
{
{
GIMP_PDB_STRING ,
" menu_path " ,
" The sub-menu's menu path "
} ,
{
GIMP_PDB_STRING ,
" menu_name " ,
" The name of the sub-menu "
}
} ;
static ProcRecord plugin_menu_branch_register_proc =
{
" gimp_plugin_menu_branch_register " ,
" Register a sub-menu. " ,
" This procedure installs an sub-menu which does not belong to any procedure. " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer <mitch@gimp.org> " ,
" 2005 " ,
NULL ,
GIMP_INTERNAL ,
2 ,
plugin_menu_branch_register_inargs ,
0 ,
NULL ,
{ { plugin_menu_branch_register_invoker } }
} ;
2004-05-19 05:19:43 +08:00
static Argument *
2004-08-11 02:47:21 +08:00
plugin_icon_register_invoker ( Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
Argument * args )
2004-05-19 05:19:43 +08:00
{
gboolean success = TRUE ;
gchar * procedure_name ;
gint32 icon_type ;
gint32 icon_data_length ;
guint8 * icon_data ;
procedure_name = ( gchar * ) args [ 0 ] . value . pdb_pointer ;
if ( procedure_name = = NULL | | ! g_utf8_validate ( procedure_name , - 1 , NULL ) )
success = FALSE ;
icon_type = args [ 1 ] . value . pdb_int ;
if ( icon_type < GIMP_ICON_TYPE_STOCK_ID | | icon_type > GIMP_ICON_TYPE_IMAGE_FILE )
success = FALSE ;
icon_data_length = args [ 2 ] . value . pdb_int ;
2004-05-20 09:13:14 +08:00
if ( icon_data_length < = 0 )
success = FALSE ;
2004-05-19 05:19:43 +08:00
icon_data = ( guint8 * ) args [ 3 ] . value . pdb_pointer ;
if ( success )
{
if ( gimp - > current_plug_in & & gimp - > current_plug_in - > query )
{
2005-05-05 02:53:58 +08:00
PlugInProcDef * proc_def ;
2004-05-19 05:19:43 +08:00
2005-05-05 02:53:58 +08:00
proc_def = plug_in_proc_def_find ( gimp - > current_plug_in - > plug_in_def - > proc_defs ,
procedure_name ) ;
2004-05-19 05:19:43 +08:00
2005-05-05 02:53:58 +08:00
if ( proc_def )
plug_in_proc_def_set_icon ( proc_def , icon_type ,
icon_data , icon_data_length ) ;
else
2004-05-19 05:19:43 +08:00
success = FALSE ;
}
2004-07-16 22:43:56 +08:00
else
success = FALSE ;
2004-05-19 05:19:43 +08:00
}
return procedural_db_return_args ( & plugin_icon_register_proc , success ) ;
}
static ProcArg plugin_icon_register_inargs [ ] =
{
{
GIMP_PDB_STRING ,
" procedure_name " ,
" The procedure for which to install the icon "
} ,
{
GIMP_PDB_INT32 ,
" icon_type " ,
" The type of the icon "
} ,
{
GIMP_PDB_INT32 ,
" icon_data_length " ,
2004-05-20 09:13:14 +08:00
" The length of 'icon_data': 0 < icon_data_length "
2004-05-19 05:19:43 +08:00
} ,
{
GIMP_PDB_INT8ARRAY ,
" icon_data " ,
" The procedure's icon. The format depends on the 'icon_type' parameter "
}
} ;
static ProcRecord plugin_icon_register_proc =
{
" gimp_plugin_icon_register " ,
" Register an icon for a plug-in procedure. " ,
" This procedure installs an icon for the given procedure. " ,
" Michael Natterer <mitch@gimp.org> " ,
" Michael Natterer <mitch@gimp.org> " ,
" 2004 " ,
2004-10-06 21:13:08 +08:00
NULL ,
2004-05-19 05:19:43 +08:00
GIMP_INTERNAL ,
4 ,
plugin_icon_register_inargs ,
0 ,
NULL ,
{ { plugin_icon_register_invoker } }
} ;