Commit 17aada11 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/pdb/pdb-types.h removed struct GimpArgument, struct GimpArgumentSpec,

2006-04-04  Michael Natterer  <mitch@gimp.org>

	* app/pdb/pdb-types.h
	* app/pdb/gimpargument.[ch]: removed struct GimpArgument, struct
	GimpArgumentSpec, gimp_argument_init() and
	gimp_arguments_destroy().

	* app/pdb/gimpprocedure.h (struct GimpProcedure): use arrays of
	GParamSpec* for kepping proc inargs/outargs.

	* app/pdb/gimpprocedure.[ch]
	* app/pdb/procedural_db.[ch]
	* app/plug-in/plug-in-params.[ch]
	* app/plug-in/plug-in-proc-frame.[ch]
	* app/plug-in/plug-in-run.[ch]: use GValueArrays for procedure
	arguments and return values. Removed all n_args and n_return_vals
	parameters because GValueArrays know their length.

	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/dialogs/about-dialog.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/pdb/procedural-db-query.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpbrushselect.c
	* app/widgets/gimpfontselect.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppaletteselect.c
	* app/widgets/gimppatternselect.c
	* app/widgets/gimppdbdialog.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Also
	removed #include "gimpargument.h" from most files.

	* app/pdb/*_cmds.c: regenerated.
parent 645edc9c
2006-04-04 Michael Natterer <mitch@gimp.org>
* app/pdb/pdb-types.h
* app/pdb/gimpargument.[ch]: removed struct GimpArgument, struct
GimpArgumentSpec, gimp_argument_init() and
gimp_arguments_destroy().
* app/pdb/gimpprocedure.h (struct GimpProcedure): use arrays of
GParamSpec* for kepping proc inargs/outargs.
* app/pdb/gimpprocedure.[ch]
* app/pdb/procedural_db.[ch]
* app/plug-in/plug-in-params.[ch]
* app/plug-in/plug-in-proc-frame.[ch]
* app/plug-in/plug-in-run.[ch]: use GValueArrays for procedure
arguments and return values. Removed all n_args and n_return_vals
parameters because GValueArrays know their length.
* app/batch.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/core/gimppdbprogress.c
* app/dialogs/about-dialog.c
* app/file/file-open.c
* app/file/file-save.c
* app/pdb/procedural-db-query.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-ins.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimphelp.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c
* app/widgets/gimppdbdialog.[ch]
* app/xcf/xcf.c
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Also
removed #include "gimpargument.h" from most files.
* app/pdb/*_cmds.c: regenerated.
2006-04-04 Sven Neumann <sven@gimp.org>
* app/text/gimpfont.c: moved new code to a utility function. Avoid
......@@ -26,7 +71,7 @@
core now.
* app/pdb/gimpargument.[ch] (struct GimpArgument)
(struct GimpArgumentSpec): removed "value" member because the
(struct GimpArgumentSpec): removed "type" member because the
GValue's/GParamSpec's GType carries just as much information now.
(gimp_argument_type_to_pdb_arg_type): new function which maps
......
......@@ -37,7 +37,6 @@
#include "plug-in/plug-in-run.h"
#include "plug-in/plug-in-proc-def.h"
#include "pdb/gimpargument.h"
#include "pdb/gimpprocedure.h"
#include "widgets/gimphelp-ids.h"
......@@ -68,7 +67,7 @@ plug_in_run_cmd_callback (GtkAction *action,
{
Gimp *gimp;
GimpProcedure *procedure;
GimpArgument *args;
GValueArray *args;
gint n_args = 0;
GimpDisplay *display = NULL;
return_if_no_gimp (gimp, data);
......@@ -78,7 +77,7 @@ plug_in_run_cmd_callback (GtkAction *action,
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (&args[n_args].value, GIMP_RUN_INTERACTIVE);
g_value_set_int (&args->values[n_args], GIMP_RUN_INTERACTIVE);
n_args++;
switch (procedure->proc_type)
......@@ -88,18 +87,18 @@ plug_in_run_cmd_callback (GtkAction *action,
case GIMP_PLUGIN:
case GIMP_TEMPORARY:
if (procedure->num_args > n_args &&
GIMP_VALUE_HOLDS_IMAGE_ID (&args[n_args].value))
if (args->n_values > n_args &&
GIMP_VALUE_HOLDS_IMAGE_ID (&args->values[n_args]))
{
display = action_data_get_display (data);
if (display)
{
gimp_value_set_image (&args[n_args].value, display->image);
gimp_value_set_image (&args->values[n_args], display->image);
n_args++;
if (procedure->num_args > n_args &&
GIMP_VALUE_HOLDS_DRAWABLE_ID (&args[n_args].value));
if (args->n_values > n_args &&
GIMP_VALUE_HOLDS_DRAWABLE_ID (&args->values[n_args]));
{
GimpDrawable *drawable;
......@@ -107,7 +106,7 @@ plug_in_run_cmd_callback (GtkAction *action,
if (drawable)
{
gimp_value_set_drawable (&args[n_args].value, drawable);
gimp_value_set_drawable (&args->values[n_args], drawable);
n_args++;
}
else
......@@ -128,20 +127,20 @@ plug_in_run_cmd_callback (GtkAction *action,
/* run the plug-in procedure */
plug_in_run (gimp, gimp_get_user_context (gimp),
GIMP_PROGRESS (display),
procedure, args, n_args, FALSE, TRUE,
procedure, args, FALSE, TRUE,
display ? gimp_display_get_ID (display) : -1);
/* remember only "standard" plug-ins */
if (procedure->proc_type == GIMP_PLUGIN &&
procedure->num_args >= 3 &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1].pspec) &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2].pspec))
if (procedure->proc_type == GIMP_PLUGIN &&
procedure->num_args >= 3 &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2]))
{
gimp_set_last_plug_in (gimp, proc_def);
}
error:
gimp_arguments_destroy (args, procedure->num_args);
g_value_array_free (args);
}
void
......
......@@ -40,7 +40,6 @@
#include "core/gimpstrokedesc.h"
#include "core/gimptoolinfo.h"
#include "pdb/gimpargument.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
......@@ -313,7 +312,7 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
{
GimpImage *image;
GimpProcedure *procedure;
GimpArgument *args;
GValueArray *args;
GimpDisplay *display;
return_if_no_image (image, data);
......@@ -335,16 +334,16 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
/* plug-in arguments as if called by <Image>/Filters/... */
args = gimp_procedure_get_arguments (procedure);
g_value_set_int (&args[0].value, GIMP_RUN_INTERACTIVE);
gimp_value_set_image (&args[1].value, image);
gimp_value_set_drawable (&args[2].value, NULL /* unused */);
g_value_set_int (&args->values[0], GIMP_RUN_INTERACTIVE);
gimp_value_set_image (&args->values[1], image);
gimp_value_set_drawable (&args->values[2], NULL /* unused */);
plug_in_run (image->gimp, action_data_get_context (data),
GIMP_PROGRESS (display),
procedure, args, 3 /* not procedure->num_args */,
procedure, args,
FALSE, TRUE, display ? gimp_display_get_ID (display) : 0);
gimp_arguments_destroy (args, procedure->num_args);
g_value_array_free (args);
}
void
......
......@@ -31,7 +31,6 @@
#include "batch.h"
#include "pdb/gimpargument.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
......@@ -131,24 +130,22 @@ batch_run_cmd (Gimp *gimp,
GimpRunMode run_mode,
const gchar *cmd)
{
GimpArgument *args;
GimpArgument *return_vals;
gint n_return_vals;
GValueArray *args;
GValueArray *return_vals;
args = gimp_procedure_get_arguments (procedure);
g_value_set_int (&args[0].value, run_mode);
g_value_set_int (&args->values[0], run_mode);
if (procedure->num_args > 1)
g_value_set_static_string (&args[1].value, cmd);
g_value_set_static_string (&args->values[1], cmd);
return_vals = procedural_db_execute (gimp,
gimp_get_user_context (gimp), NULL,
proc_name,
args, procedure->num_args,
&n_return_vals);
args);
switch (g_value_get_enum (&return_vals[0].value))
switch (g_value_get_enum (&return_vals->values[0]))
{
case GIMP_PDB_EXECUTION_ERROR:
g_printerr ("batch command: experienced an execution error.\n");
......@@ -163,8 +160,8 @@ batch_run_cmd (Gimp *gimp,
break;
}
gimp_arguments_destroy (return_vals, n_return_vals);
gimp_arguments_destroy (args, procedure->num_args);
g_value_array_free (return_vals);
g_value_array_free (args);
return;
}
......@@ -29,7 +29,6 @@
#include "core/gimpcontext.h"
#include "pdb/gimpargument.h"
#include "pdb/procedural_db.h"
#include "gimpparamspecs.h"
......@@ -246,8 +245,7 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
if (progress->callback_name && ! progress->callback_busy)
{
GimpArgument *return_vals;
gint n_return_vals;
GValueArray *return_vals;
progress->callback_busy = TRUE;
......@@ -255,25 +253,24 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
progress->context,
NULL,
progress->callback_name,
&n_return_vals,
GIMP_TYPE_INT32, command,
G_TYPE_STRING, text,
G_TYPE_DOUBLE, value,
G_TYPE_NONE);
if (g_value_get_enum (&return_vals[0].value) != GIMP_PDB_SUCCESS)
if (g_value_get_enum (&return_vals->values[0]) != GIMP_PDB_SUCCESS)
{
g_message (_("Unable to run %s callback. "
"The corresponding plug-in may have crashed."),
g_type_name (G_TYPE_FROM_INSTANCE (progress)));
}
else if (n_return_vals >= 2 &&
G_VALUE_HOLDS_DOUBLE (&return_vals[1].value))
else if (return_vals->n_values >= 2 &&
G_VALUE_HOLDS_DOUBLE (&return_vals->values[1]))
{
retval = g_value_get_double (&return_vals[1].value);
retval = g_value_get_double (&return_vals->values[1]);
}
gimp_arguments_destroy (return_vals, n_return_vals);
g_value_array_free (return_vals);
progress->callback_busy = FALSE;
}
......
......@@ -29,7 +29,6 @@
#include "core/gimpcontext.h"
#include "pdb/gimpargument.h"
#include "pdb/procedural_db.h"
#include "about.h"
......@@ -215,16 +214,14 @@ about_dialog_load_url (GtkAboutDialog *dialog,
const gchar *url,
gpointer data)
{
GimpContext *context = GIMP_CONTEXT (data);
GimpArgument *return_vals;
gint n_return_vals;
GimpContext *context = GIMP_CONTEXT (data);
GValueArray *return_vals;
return_vals = procedural_db_run_proc (context->gimp, context, NULL,
PDB_URL_LOAD,
&n_return_vals,
G_TYPE_STRING, url,
G_TYPE_NONE);
gimp_arguments_destroy (return_vals, n_return_vals);
g_value_array_free (return_vals);
}
......
......@@ -56,7 +56,6 @@
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "pdb/gimpargument.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
......@@ -87,10 +86,9 @@ file_open_image (Gimp *gimp,
const gchar **mime_type,
GError **error)
{
GimpArgument *return_vals;
gint n_return_vals;
gchar *filename;
GimpImage *image = NULL;
GValueArray *return_vals;
gchar *filename;
GimpImage *image = NULL;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
......@@ -141,7 +139,6 @@ file_open_image (Gimp *gimp,
return_vals = procedural_db_run_proc (gimp, context, progress,
file_proc->procedure->name,
&n_return_vals,
GIMP_TYPE_INT32, run_mode,
G_TYPE_STRING, filename,
G_TYPE_STRING, entered_filename,
......@@ -149,11 +146,11 @@ file_open_image (Gimp *gimp,
g_free (filename);
*status = g_value_get_enum (&return_vals[0].value);
*status = g_value_get_enum (&return_vals->values[0]);
if (*status == GIMP_PDB_SUCCESS)
{
image = gimp_value_get_image (&return_vals[1].value, gimp);
image = gimp_value_get_image (&return_vals->values[1], gimp);
if (image)
{
......@@ -176,7 +173,7 @@ file_open_image (Gimp *gimp,
_("Plug-In could not open image"));
}
gimp_arguments_destroy (return_vals, n_return_vals);
g_value_array_free (return_vals);
return image;
}
......@@ -215,8 +212,7 @@ file_open_thumbnail (Gimp *gimp,
if (procedure && procedure->num_args >= 2 && procedure->num_values >= 1)
{
GimpPDBStatusType status;
GimpArgument *return_vals;
gint n_return_vals;
GValueArray *return_vals;
gchar *filename;
GimpImage *image = NULL;
......@@ -227,23 +223,22 @@ file_open_thumbnail (Gimp *gimp,
return_vals = procedural_db_run_proc (gimp, context, progress,
procedure->name,
&n_return_vals,
G_TYPE_STRING, filename,
GIMP_TYPE_INT32, size,
G_TYPE_NONE);
g_free (filename);
status = g_value_get_enum (&return_vals[0].value);
status = g_value_get_enum (&return_vals->values[0]);
if (status == GIMP_PDB_SUCCESS)
{
image = gimp_value_get_image (&return_vals[1].value, gimp);
image = gimp_value_get_image (&return_vals->values[1], gimp);
if (n_return_vals >= 3)
if (return_vals->n_values >= 3)
{
*image_width = MAX (0, g_value_get_int (&return_vals[2].value));
*image_height = MAX (0, g_value_get_int (&return_vals[3].value));
*image_width = MAX (0, g_value_get_int (&return_vals->values[2]));
*image_height = MAX (0, g_value_get_int (&return_vals->values[3]));
}
if (image)
......@@ -257,7 +252,7 @@ file_open_thumbnail (Gimp *gimp,
}
}
gimp_arguments_destroy (return_vals, n_return_vals);
g_value_array_free (return_vals);
return image;
}
......
......@@ -54,7 +54,6 @@
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "pdb/gimpargument.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
......@@ -80,8 +79,7 @@ file_save (GimpImage *image,
gboolean save_a_copy,
GError **error)
{
GimpArgument *return_vals;
gint n_return_vals;
GValueArray *return_vals;
GimpPDBStatusType status;
gchar *filename;
......@@ -132,7 +130,6 @@ file_save (GimpImage *image,
return_vals =
procedural_db_run_proc (image->gimp, context, progress,
file_proc->procedure->name,
&n_return_vals,
GIMP_TYPE_INT32, run_mode,
GIMP_TYPE_IMAGE_ID, gimp_image_get_ID (image),
GIMP_TYPE_DRAWABLE_ID, gimp_item_get_ID (GIMP_ITEM (gimp_image_active_drawable (image))),
......@@ -140,9 +137,9 @@ file_save (GimpImage *image,
G_TYPE_STRING, uri,
G_TYPE_NONE);
status = g_value_get_enum (&return_vals[0].value);
status = g_value_get_enum (&return_vals->values[0]);
gimp_arguments_destroy (return_vals, n_return_vals);
g_value_array_free (return_vals);
if (status == GIMP_PDB_SUCCESS)
{
......
This diff is collapsed.
......@@ -24,7 +24,6 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimpargument.h"
#include "gimpprocedure.h"
#include "procedural_db.h"
#include "core/gimpparamspecs.h"
......@@ -141,12 +140,12 @@ register_brush_select_procs (Gimp *gimp)
}
static GimpArgument *
brushes_popup_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_popup_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gboolean success = TRUE;
const gchar *brush_callback;
......@@ -156,12 +155,12 @@ brushes_popup_invoker (GimpProcedure *procedure,
gint32 spacing;
gint32 paint_mode;
brush_callback = g_value_get_string (&args[0].value);
popup_title = g_value_get_string (&args[1].value);
initial_brush = g_value_get_string (&args[2].value);
opacity = g_value_get_double (&args[3].value);
spacing = g_value_get_int (&args[4].value);
paint_mode = g_value_get_enum (&args[5].value);
brush_callback = g_value_get_string (&args->values[0]);
popup_title = g_value_get_string (&args->values[1]);
initial_brush = g_value_get_string (&args->values[2]);
opacity = g_value_get_double (&args->values[3]);
spacing = g_value_get_int (&args->values[4]);
paint_mode = g_value_get_enum (&args->values[5]);
if (success)
{
......@@ -195,17 +194,17 @@ static GimpProcedure brushes_popup_proc =
{ { brushes_popup_invoker } }
};
static GimpArgument *
brushes_close_popup_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_close_popup_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gboolean success = TRUE;
const gchar *brush_callback;
brush_callback = g_value_get_string (&args[0].value);
brush_callback = g_value_get_string (&args->values[0]);
if (success)
{
......@@ -235,12 +234,12 @@ static GimpProcedure brushes_close_popup_proc =
{ { brushes_close_popup_invoker } }
};
static GimpArgument *
brushes_set_popup_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_set_popup_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gboolean success = TRUE;
const gchar *brush_callback;
......@@ -249,11 +248,11 @@ brushes_set_popup_invoker (GimpProcedure *procedure,
gint32 spacing;
gint32 paint_mode;
brush_callback = g_value_get_string (&args[0].value);
brush_name = g_value_get_string (&args[1].value);
opacity = g_value_get_double (&args[2].value);
spacing = g_value_get_int (&args[3].value);
paint_mode = g_value_get_enum (&args[4].value);
brush_callback = g_value_get_string (&args->values[0]);
brush_name = g_value_get_string (&args->values[1]);
opacity = g_value_get_double (&args->values[2]);
spacing = g_value_get_int (&args->values[3]);
paint_mode = g_value_get_enum (&args->values[4]);
if (success)
{
......
......@@ -25,7 +25,6 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimpargument.h"
#include "gimpprocedure.h"
#include "procedural_db.h"
#include "core/gimpparamspecs.h"
......@@ -199,12 +198,12 @@ register_brushes_procs (Gimp *gimp)
}
static GimpArgument *
brushes_refresh_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_refresh_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gimp_data_factory_data_refresh (gimp->brush_factory);
return gimp_procedure_get_return_values (procedure, TRUE);
......@@ -226,20 +225,20 @@ static GimpProcedure brushes_refresh_proc =
{ { brushes_refresh_invoker } }
};
static GimpArgument *
brushes_get_list_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_get_list_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gboolean success = TRUE;
GimpArgument *return_vals;
GValueArray *return_vals;
const gchar *filter;
gint32 num_brushes = 0;
gchar **brush_list = NULL;
filter = g_value_get_string (&args[0].value);
filter = g_value_get_string (&args->values[0]);
if (success)
{
......@@ -251,8 +250,8 @@ brushes_get_list_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (&return_vals[1].value, num_brushes);
gimp_value_take_stringarray (&return_vals[2].value, brush_list, num_brushes);
g_value_set_int (&return_vals->values[1], num_brushes);
gimp_value_take_stringarray (&return_vals->values[2], brush_list, num_brushes);
}
return return_vals;
......@@ -274,15 +273,15 @@ static GimpProcedure brushes_get_list_proc =
{ { brushes_get_list_invoker } }
};
static GimpArgument *
brushes_get_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_get_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gboolean success = TRUE;
GimpArgument *return_vals;
GValueArray *return_vals;
gchar *name = NULL;
gint32 width = 0;
gint32 height = 0;
......@@ -304,10 +303,10 @@ brushes_get_brush_invoker (GimpProcedure *procedure,
if (success)
{
g_value_take_string (&return_vals[1].value, name);
g_value_set_int (&return_vals[2].value, width);
g_value_set_int (&return_vals[3].value, height);
g_value_set_int (&return_vals[4].value, spacing);
g_value_take_string (&return_vals->values[1], name);
g_value_set_int (&return_vals->values[2], width);
g_value_set_int (&return_vals->values[3], height);
g_value_set_int (&return_vals->values[4], spacing);
}
return return_vals;
......@@ -329,15 +328,15 @@ static GimpProcedure brushes_get_brush_proc =
{ { brushes_get_brush_invoker } }
};
static GimpArgument *
brushes_get_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_get_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args)
{
gboolean success = TRUE;
GimpArgument *return_vals;
GValueArray *return_vals;
gint32 spacing = 0;
GimpBrush *brush = gimp_context_get_brush (context);
......@@ -350,7 +349,7 @@ brushes_get_spacing_invoker (GimpProcedure *procedure,
return_vals = gimp_procedure_get_return_values (procedure, success);
if (success)
g_value_set_int (&return_vals[1].value, spacing);
g_value_set_int (&return_vals->values[1], spacing);
return return_vals;
}
......@@ -371,17 +370,17 @@ static GimpProcedure brushes_get_spacing_proc =
{ { brushes_get_spacing_invoker } }
};
static GimpArgument *
brushes_set_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpArgument *args)
static GValueArray *
brushes_set_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,