GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

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> 2008-02-07 Sven Neumann <sven@gimp.org>
* configure.in: added configure checks for the iso-codes package. * configure.in: added configure checks for the iso-codes package.
......
This diff is collapsed.
...@@ -20,17 +20,16 @@ ...@@ -20,17 +20,16 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpdatafactory.h" #include "core/gimpdatafactory.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/temp-buf.h" #include "base/temp-buf.h"
#include "core/gimp.h" #include "core/gimp.h"
...@@ -35,8 +32,11 @@ ...@@ -35,8 +32,11 @@
#include "core/gimpcontainer-filter.h" #include "core/gimpcontainer-filter.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdatafactory.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" #include "internal_procs.h"
......
...@@ -25,16 +25,16 @@ ...@@ -25,16 +25,16 @@
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpbuffer.h" #include "core/gimpbuffer.h"
#include "core/gimpcontainer-filter.h" #include "core/gimpcontainer-filter.h"
#include "core/gimpcontainer.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" #include "internal_procs.h"
......
...@@ -20,24 +20,24 @@ ...@@ -20,24 +20,24 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
#include "libgimpcolor/gimpcolor.h" #include "libgimpcolor/gimpcolor.h"
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimpchannel-combine.h" #include "core/gimpchannel-combine.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "gimp-intl.h" #include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray * static GValueArray *
channel_new_invoker (GimpProcedure *procedure, channel_new_invoker (GimpProcedure *procedure,
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/gimphistogram.h" #include "base/gimphistogram.h"
#include "core/gimpdrawable-brightness-contrast.h" #include "core/gimpdrawable-brightness-contrast.h"
...@@ -43,11 +40,15 @@ ...@@ -43,11 +40,15 @@
#include "core/gimpdrawable-posterize.h" #include "core/gimpdrawable-posterize.h"
#include "core/gimpdrawable-threshold.h" #include "core/gimpdrawable-threshold.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "gimp-intl.h" #include "core/gimpparamspecs.h"
#include "gimppdb-utils.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray * static GValueArray *
brightness_contrast_invoker (GimpProcedure *procedure, brightness_contrast_invoker (GimpProcedure *procedure,
......
...@@ -20,25 +20,24 @@ ...@@ -20,25 +20,24 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "libgimpcolor/gimpcolor.h" #include "libgimpcolor/gimpcolor.h"
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpdatafactory.h" #include "core/gimpdatafactory.h"
#include "gimppdb-utils.h" #include "core/gimpparamspecs.h"
#include "plug-in/gimpplugin-context.h" #include "plug-in/gimpplugin-context.h"
#include "plug-in/gimpplugin.h" #include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
...@@ -80,6 +79,29 @@ context_pop_invoker (GimpProcedure *procedure, ...@@ -80,6 +79,29 @@ context_pop_invoker (GimpProcedure *procedure,
return gimp_procedure_get_return_values (procedure, success); 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 * static GValueArray *
context_get_paint_method_invoker (GimpProcedure *procedure, context_get_paint_method_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
...@@ -133,29 +155,6 @@ context_set_paint_method_invoker (GimpProcedure *procedure, ...@@ -133,29 +155,6 @@ context_set_paint_method_invoker (GimpProcedure *procedure,
return gimp_procedure_get_return_values (procedure, success); 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 * static GValueArray *
context_get_foreground_invoker (GimpProcedure *procedure, context_get_foreground_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
...@@ -646,6 +645,33 @@ register_context_procs (GimpPDB *pdb) ...@@ -646,6 +645,33 @@ register_context_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (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 * gimp-context-get-paint-method
*/ */
...@@ -692,33 +718,6 @@ register_context_procs (GimpPDB *pdb) ...@@ -692,33 +718,6 @@ register_context_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (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 * gimp-context-get-foreground
*/ */
......
...@@ -20,19 +20,17 @@ ...@@ -20,19 +20,17 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.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-convert.h"
#include "core/gimpimage.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" #include "internal_procs.h"
......
...@@ -20,18 +20,17 @@ ...@@ -20,18 +20,17 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
......
...@@ -20,13 +20,9 @@ ...@@ -20,13 +20,9 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "base/temp-buf.h" #include "base/temp-buf.h"
#include "base/tile-manager.h" #include "base/tile-manager.h"
...@@ -40,13 +36,17 @@ ...@@ -40,13 +36,17 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
#include "gimp-intl.h" #include "core/gimpparamspecs.h"
#include "gimppdb-utils.h"
#include "plug-in/gimpplugin.h" #include "plug-in/gimpplugin.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray * static GValueArray *
drawable_is_valid_invoker (GimpProcedure *procedure, drawable_is_valid_invoker (GimpProcedure *procedure,
......
...@@ -20,15 +20,11 @@ ...@@ -20,15 +20,11 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "libgimpmath/gimpmath.h" #include "libgimpmath/gimpmath.h"
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "config/gimpcoreconfig.h" #include "config/gimpcoreconfig.h"
#include "core/gimp-transform-utils.h" #include "core/gimp-transform-utils.h"
...@@ -36,12 +32,16 @@ ...@@ -36,12 +32,16 @@
#include "core/gimpdrawable-transform.h" #include "core/gimpdrawable-transform.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.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 "internal_procs.h"
#include "gimp-intl.h"
static GValueArray * static GValueArray *
drawable_transform_flip_simple_invoker (GimpProcedure *procedure, drawable_transform_flip_simple_invoker (GimpProcedure *procedure,
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp-edit.h" #include "core/gimp-edit.h"
#include "core/gimp.h" #include "core/gimp.h"
...@@ -37,14 +34,18 @@ ...@@ -37,14 +34,18 @@
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h" #include "core/gimpprogress.h"
#include "core/gimpstrokedesc.h" #include "core/gimpstrokedesc.h"
#include "gimp-intl.h"
#include "gimppdb-utils.h"
#include "vectors/gimpvectors.h" #include "vectors/gimpvectors.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray * static GValueArray *
edit_cut_invoker (GimpProcedure *procedure, edit_cut_invoker (GimpProcedure *procedure,
......
...@@ -28,14 +28,12 @@ ...@@ -28,14 +28,12 @@
#include "libgimpconfig/gimpconfig.h" #include "libgimpconfig/gimpconfig.h"
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimp-utils.h" #include "core/gimp-utils.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimpparamspecs.h"
#include "file/file-open.h" #include "file/file-open.h"
#include "file/file-procedure.h" #include "file/file-procedure.h"
#include "file/file-save.h" #include "file/file-save.h"
...@@ -43,6 +41,8 @@ ...@@ -43,6 +41,8 @@
#include "plug-in/gimppluginmanager-file.h" #include "plug-in/gimppluginmanager-file.h"
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
......
...@@ -20,23 +20,23 @@ ...@@ -20,23 +20,23 @@
#include "config.h" #include "config.h"
#include <glib-object.h> #include <glib-object.h>
#include "pdb-types.h" #include "pdb-types.h"
#include "gimppdb.h"
#include "gimpprocedure.h"
#include "core/gimpparamspecs.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimplayer-floating-sel.h" #include "core/gimplayer-floating-sel.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "gimp-intl.h" #include "core/gimpparamspecs.h"
#include "gimppdb-utils.h"
#include "gimppdberror.h" #include "gimppdberror.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimpprocedure.h"
#include "internal_procs.h" #include "internal_procs.h"
#include "gimp-intl.h"
static GValueArray * static GValueArray *
floating_sel_remove_invoker (GimpProcedure *procedure, floating_sel_remove_invoker (GimpProcedure *procedure,
......
...@@ -20,16 +20,15 @@ ...@@ -20,16 +20,15 @@