Commit dc490d3b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

add some perl evilness to make the includes in the generated files look

2008-02-07  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/app.pl: add some perl evilness to make the includes
	in the generated files look almost like they should.

	* tools/pdbgen/pdb/*.pdb: remove inclusion of "core/gimp.h" where
	not needed, clean up lists of includes and functions and reorder
	some functions to make more sense. Zero logic changed.

	* app/pdb/*_cmds.c
	* libgimp/gimpcontext_pdb.[ch]
	* libgimp/gimpbrush_pdb.[ch]: regenerated.


svn path=/trunk/; revision=24829
parent 7f2a8fc3
2008-02-07 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/app.pl: add some perl evilness to make the includes
in the generated files look almost like they should.
* tools/pdbgen/pdb/*.pdb: remove inclusion of "core/gimp.h" where
not needed, clean up lists of includes and functions and reorder
some functions to make more sense. Zero logic changed.
* app/pdb/*_cmds.c
* libgimp/gimpcontext_pdb.[ch]
* libgimp/gimpbrush_pdb.[ch]: regenerated.
2008-02-07 Sven Neumann <sven@gimp.org>
* configure.in: added configure checks for the iso-codes package.
......
This diff is collapsed.
......@@ -20,17 +20,16 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpdatafactory.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -25,9 +25,6 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/temp-buf.h"
#include "core/gimp.h"
......@@ -35,8 +32,11 @@
#include "core/gimpcontainer-filter.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -25,16 +25,16 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpbuffer.h"
#include "core/gimpcontainer-filter.h"
#include "core/gimpcontainer.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,24 +20,24 @@
#include "config.h"
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpcolor/gimpcolor.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimpchannel-combine.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "gimp-intl.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray *
channel_new_invoker (GimpProcedure *procedure,
......
......@@ -25,9 +25,6 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/gimphistogram.h"
#include "core/gimpdrawable-brightness-contrast.h"
......@@ -43,11 +40,15 @@
#include "core/gimpdrawable-posterize.h"
#include "core/gimpdrawable-threshold.h"
#include "core/gimpdrawable.h"
#include "gimp-intl.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray *
brightness_contrast_invoker (GimpProcedure *procedure,
......
......@@ -20,25 +20,24 @@
#include "config.h"
#include <glib-object.h>
#include "libgimpcolor/gimpcolor.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "plug-in/gimpplugin-context.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......@@ -80,6 +79,29 @@ context_pop_invoker (GimpProcedure *procedure,
return gimp_procedure_get_return_values (procedure, success);
}
static GValueArray *
context_list_paint_methods_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args,
GError **error)
{
GValueArray *return_vals;
gint32 num_paint_methods = 0;
gchar **paint_methods = NULL;
paint_methods = gimp_container_get_name_array (gimp->paint_info_list,
&num_paint_methods);
return_vals = gimp_procedure_get_return_values (procedure, TRUE);
g_value_set_int (&return_vals->values[1], num_paint_methods);
gimp_value_take_stringarray (&return_vals->values[2], paint_methods, num_paint_methods);
return return_vals;
}
static GValueArray *
context_get_paint_method_invoker (GimpProcedure *procedure,
Gimp *gimp,
......@@ -133,29 +155,6 @@ context_set_paint_method_invoker (GimpProcedure *procedure,
return gimp_procedure_get_return_values (procedure, success);
}
static GValueArray *
context_list_paint_methods_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args,
GError **error)
{
GValueArray *return_vals;
gint32 num_paint_methods = 0;
gchar **paint_methods = NULL;
paint_methods = gimp_container_get_name_array (gimp->paint_info_list,
&num_paint_methods);
return_vals = gimp_procedure_get_return_values (procedure, TRUE);
g_value_set_int (&return_vals->values[1], num_paint_methods);
gimp_value_take_stringarray (&return_vals->values[2], paint_methods, num_paint_methods);
return return_vals;
}
static GValueArray *
context_get_foreground_invoker (GimpProcedure *procedure,
Gimp *gimp,
......@@ -646,6 +645,33 @@ register_context_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-list-paint-methods
*/
procedure = gimp_procedure_new (context_list_paint_methods_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-context-list-paint-methods");
gimp_procedure_set_static_strings (procedure,
"gimp-context-list-paint-methods",
"Lists the available paint methods.",
"This procedure lists the names of the available paint methods. Any of the results can be used for 'gimp-context-set-paint-method'.",
"Simon Budig",
"Simon Budig",
"2007",
NULL);
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("num-paint-methods",
"num paint methods",
"The number of the available paint methods",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("paint-methods",
"paint methods",
"The names of the available paint methods",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-paint-method
*/
......@@ -692,33 +718,6 @@ register_context_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-list-paint-methods
*/
procedure = gimp_procedure_new (context_list_paint_methods_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-context-list-paint-methods");
gimp_procedure_set_static_strings (procedure,
"gimp-context-list-paint-methods",
"Lists the available paint methods.",
"This procedure lists the names of the available paint methods. Any of the results can be used for 'gimp-context-set-paint-method'.",
"Simon Budig",
"Simon Budig",
"2007",
NULL);
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("num-paint-methods",
"num paint methods",
"The number of the available paint methods",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("paint-methods",
"paint methods",
"The names of the available paint methods",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-foreground
*/
......
......@@ -20,19 +20,17 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpimage-convert.h"
#include "core/gimpimage.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,18 +20,17 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,13 +20,9 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/temp-buf.h"
#include "base/tile-manager.h"
......@@ -40,13 +36,17 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "gimp-intl.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray *
drawable_is_valid_invoker (GimpProcedure *procedure,
......
......@@ -20,15 +20,11 @@
#include "config.h"
#include <glib-object.h>
#include "libgimpmath/gimpmath.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp-transform-utils.h"
......@@ -36,12 +32,16 @@
#include "core/gimpdrawable-transform.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "gimp-intl.h"
#include "gimppdb-utils.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray *
drawable_transform_flip_simple_invoker (GimpProcedure *procedure,
......
......@@ -25,9 +25,6 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp-edit.h"
#include "core/gimp.h"
......@@ -37,14 +34,18 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "core/gimpstrokedesc.h"
#include "gimp-intl.h"
#include "gimppdb-utils.h"
#include "vectors/gimpvectors.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray *
edit_cut_invoker (GimpProcedure *procedure,
......
......@@ -28,14 +28,12 @@
#include "libgimpconfig/gimpconfig.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp-utils.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimpparamspecs.h"
#include "file/file-open.h"
#include "file/file-procedure.h"
#include "file/file-save.h"
......@@ -43,6 +41,8 @@
#include "plug-in/gimppluginmanager-file.h"
#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,23 +20,23 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimpdrawable.h"
#include "core/gimplayer-floating-sel.h"
#include "core/gimplayer.h"
#include "gimp-intl.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdberror.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray *
floating_sel_remove_invoker (GimpProcedure *procedure,
......
......@@ -20,16 +20,15 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,19 +20,18 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpcontainer-filter.h"
#include "core/gimpcontainer.h"
#include "core/gimpparamspecs.h"
#include "text/gimp-fonts.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -29,15 +29,15 @@
#include "libgimpmodule/gimpmodule.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "config/gimprc.h"
#include "core/gimp-utils.h"
#include "core/gimp.h"
#include "core/gimpparamspecs.h"
#include "core/gimptemplate.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -27,16 +27,16 @@
#include "libgimpcolor/gimpcolor.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimpgradient.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,18 +20,17 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpdatafactory.h"
#include "core/gimpgradient.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -25,17 +25,17 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpcontainer-filter.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimpgradient.h"
#include "gimppdb-utils.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,21 +20,20 @@
#include "config.h"
#include <glib-object.h>
#include "libgimpbase/gimpbaseenums.h"
#include "libgimpcolor/gimpcolor.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimpgrid.h"
#include "core/gimpimage-grid.h"
#include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,19 +20,18 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimpguide.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,19 +20,18 @@
#include "config.h"
#include <glib-object.h>
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h"
#include "core/gimpparamspecs.h"
#include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager-help-domain.h"
#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
......
......@@ -20,7 +20,6 @@
#include "config.h"
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
......@@ -28,9 +27,6 @@
#include "libgimpmath/gimpmath.h"
#include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/temp-buf.h"
#include "config/gimpcoreconfig.h"
......@@ -50,15 +46,19 @@
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimplist.h"
#include "core/gimpparamspecs.h"
#include "core/gimppickable.h"
#include "core/gimpselection.h"
#include "core/gimpunit.h"
#include "gimp-intl.h"
#include "gimppdberror.h"
#include "vectors/gimpvectors.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h"
#include "gimp-intl.h"
#if defined (HAVE_FINITE)
#define FINITE(x) finite(x)
......
......@@ -20,15 +20,11 @@
#include "config.h"
#include <glib-object.h>