Commit 30d63111 authored by Michael Natterer's avatar Michael Natterer 😴

libgimp*, pdb: gimp_value_array_new_from_types*() takes (type, value)

So a value array can now we created like this:

array = gimp_value_array_new_from_types (&error_msg,
                                         G_TYPE_STRING, "foo",
                                         G_TYPE_INT,    23,
                                         G_TYPE_NONE);

Change PDB generation to use this, which makes for much nicer code in
the libgimp wrappers, and only set arrays separately instead of all
values.
parent dd8bf71f
Pipeline #102898 failed with stages
in 1 minute and 29 seconds
......@@ -57,7 +57,8 @@ gimp_version (void)
GimpValueArray *return_vals;
gchar *version = NULL;
args = gimp_value_array_new_from_types (G_TYPE_NONE);
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -95,7 +96,8 @@ gimp_getpid (void)
GimpValueArray *return_vals;
gint pid = 0;
args = gimp_value_array_new_from_types (G_TYPE_NONE);
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -134,9 +136,9 @@ gimp_attach_parasite (const GimpParasite *parasite)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (GIMP_TYPE_PARASITE,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_PARASITE, parasite,
G_TYPE_NONE);
g_value_set_boxed (gimp_value_array_index (args, 0), parasite);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -175,9 +177,9 @@ gimp_detach_parasite (const gchar *name)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -215,9 +217,9 @@ gimp_get_parasite (const gchar *name)
GimpValueArray *return_vals;
GimpParasite *parasite = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -258,7 +260,8 @@ gimp_get_parasite_list (gint *num_parasites)
GimpValueArray *return_vals;
gchar **parasites = NULL;
args = gimp_value_array_new_from_types (G_TYPE_NONE);
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -302,9 +305,9 @@ gimp_temp_name (const gchar *extension)
GimpValueArray *return_vals;
gchar *name = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, extension,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), extension);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
......@@ -55,9 +55,9 @@ gimp_brush_new (const gchar *name)
GimpValueArray *return_vals;
gchar *actual_name = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -97,9 +97,9 @@ gimp_brush_duplicate (const gchar *name)
GimpValueArray *return_vals;
gchar *copy_name = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -138,9 +138,9 @@ gimp_brush_is_generated (const gchar *name)
GimpValueArray *return_vals;
gboolean generated = FALSE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -182,11 +182,10 @@ gimp_brush_rename (const gchar *name,
GimpValueArray *return_vals;
gchar *actual_name = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_STRING, new_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_string (gimp_value_array_index (args, 1), new_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -225,9 +224,9 @@ gimp_brush_delete (const gchar *name)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -265,9 +264,9 @@ gimp_brush_is_editable (const gchar *name)
GimpValueArray *return_vals;
gboolean editable = FALSE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -315,9 +314,9 @@ gimp_brush_get_info (const gchar *name,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -385,9 +384,9 @@ gimp_brush_get_pixels (const gchar *name,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -450,9 +449,9 @@ gimp_brush_get_spacing (const gchar *name,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -498,11 +497,10 @@ gimp_brush_set_spacing (const gchar *name,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
GIMP_TYPE_INT32,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
GIMP_TYPE_INT32, spacing,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_int (gimp_value_array_index (args, 1), spacing);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -545,9 +543,9 @@ gimp_brush_get_shape (const gchar *name)
GimpValueArray *return_vals;
GimpBrushGeneratedShape shape = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -593,11 +591,10 @@ gimp_brush_set_shape (const gchar *name,
GimpValueArray *return_vals;
GimpBrushGeneratedShape shape_out = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
GIMP_TYPE_BRUSH_GENERATED_SHAPE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
GIMP_TYPE_BRUSH_GENERATED_SHAPE, shape_in,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_enum (gimp_value_array_index (args, 1), shape_in);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -637,9 +634,9 @@ gimp_brush_get_radius (const gchar *name)
GimpValueArray *return_vals;
gdouble radius = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -681,11 +678,10 @@ gimp_brush_set_radius (const gchar *name,
GimpValueArray *return_vals;
gdouble radius_out = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_DOUBLE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_DOUBLE, radius_in,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_double (gimp_value_array_index (args, 1), radius_in);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -725,9 +721,9 @@ gimp_brush_get_spikes (const gchar *name)
GimpValueArray *return_vals;
gint spikes = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -769,11 +765,10 @@ gimp_brush_set_spikes (const gchar *name,
GimpValueArray *return_vals;
gint spikes_out = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
GIMP_TYPE_INT32,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
GIMP_TYPE_INT32, spikes_in,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_int (gimp_value_array_index (args, 1), spikes_in);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -815,9 +810,9 @@ gimp_brush_get_hardness (const gchar *name)
GimpValueArray *return_vals;
gdouble hardness = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -860,11 +855,10 @@ gimp_brush_set_hardness (const gchar *name,
GimpValueArray *return_vals;
gdouble hardness_out = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_DOUBLE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_DOUBLE, hardness_in,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_double (gimp_value_array_index (args, 1), hardness_in);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -905,9 +899,9 @@ gimp_brush_get_aspect_ratio (const gchar *name)
GimpValueArray *return_vals;
gdouble aspect_ratio = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -950,11 +944,10 @@ gimp_brush_set_aspect_ratio (const gchar *name,
GimpValueArray *return_vals;
gdouble aspect_ratio_out = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_DOUBLE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_DOUBLE, aspect_ratio_in,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_double (gimp_value_array_index (args, 1), aspect_ratio_in);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -994,9 +987,9 @@ gimp_brush_get_angle (const gchar *name)
GimpValueArray *return_vals;
gdouble angle = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -1038,11 +1031,10 @@ gimp_brush_set_angle (const gchar *name,
GimpValueArray *return_vals;
gdouble angle_out = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_DOUBLE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, name,
G_TYPE_DOUBLE, angle_in,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), name);
g_value_set_double (gimp_value_array_index (args, 1), angle_in);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
......@@ -52,7 +52,8 @@ gimp_brushes_refresh (void)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_NONE);
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -94,9 +95,9 @@ gimp_brushes_get_list (const gchar *filter,
GimpValueArray *return_vals;
gchar **brush_list = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, filter,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), filter);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
......@@ -62,19 +62,14 @@ gimp_brushes_popup (const gchar *brush_callback,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_DOUBLE,
GIMP_TYPE_INT32,
GIMP_TYPE_LAYER_MODE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, brush_callback,
G_TYPE_STRING, popup_title,
G_TYPE_STRING, initial_brush,
G_TYPE_DOUBLE, opacity,
GIMP_TYPE_INT32, spacing,
GIMP_TYPE_LAYER_MODE, paint_mode,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), brush_callback);
g_value_set_string (gimp_value_array_index (args, 1), popup_title);
g_value_set_string (gimp_value_array_index (args, 2), initial_brush);
g_value_set_double (gimp_value_array_index (args, 3), opacity);
g_value_set_int (gimp_value_array_index (args, 4), spacing);
g_value_set_enum (gimp_value_array_index (args, 5), paint_mode);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -110,9 +105,9 @@ gimp_brushes_close_popup (const gchar *brush_callback)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, brush_callback,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), brush_callback);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -156,17 +151,13 @@ gimp_brushes_set_popup (const gchar *brush_callback,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_DOUBLE,
GIMP_TYPE_INT32,
GIMP_TYPE_LAYER_MODE,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, brush_callback,
G_TYPE_STRING, brush_name,
G_TYPE_DOUBLE, opacity,
GIMP_TYPE_INT32, spacing,
GIMP_TYPE_LAYER_MODE, paint_mode,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), brush_callback);
g_value_set_string (gimp_value_array_index (args, 1), brush_name);
g_value_set_double (gimp_value_array_index (args, 2), opacity);
g_value_set_int (gimp_value_array_index (args, 3), spacing);
g_value_set_enum (gimp_value_array_index (args, 4), paint_mode);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
......@@ -59,9 +59,9 @@ gimp_buffers_get_list (const gchar *filter,
GimpValueArray *return_vals;
gchar **buffer_list = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, filter,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), filter);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -108,11 +108,10 @@ gimp_buffer_rename (const gchar *buffer_name,
GimpValueArray *return_vals;
gchar *real_name = NULL;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, buffer_name,
G_TYPE_STRING, new_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), buffer_name);
g_value_set_string (gimp_value_array_index (args, 1), new_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -151,9 +150,9 @@ gimp_buffer_delete (const gchar *buffer_name)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), buffer_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -191,9 +190,9 @@ gimp_buffer_get_width (const gchar *buffer_name)
GimpValueArray *return_vals;
gint width = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), buffer_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -232,9 +231,9 @@ gimp_buffer_get_height (const gchar *buffer_name)
GimpValueArray *return_vals;
gint height = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), buffer_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -273,9 +272,9 @@ gimp_buffer_get_bytes (const gchar *buffer_name)
GimpValueArray *return_vals;
gint bytes = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), buffer_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -314,9 +313,9 @@ gimp_buffer_get_image_type (const gchar *buffer_name)
GimpValueArray *return_vals;
GimpImageBaseType image_type = 0;
args = gimp_value_array_new_from_types (G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
g_value_set_string (gimp_value_array_index (args, 0), buffer_name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
......@@ -68,19 +68,14 @@ _gimp_channel_new (gint32 image_ID,
GimpValueArray *return_vals;
gint32 channel_ID = -1;
args = gimp_value_array_new_from_types (GIMP_TYPE_IMAGE_ID,
GIMP_TYPE_INT32,
GIMP_TYPE_INT32,
G_TYPE_STRING,
G_TYPE_DOUBLE,
GIMP_TYPE_RGB,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE_ID, image_ID,
GIMP_TYPE_INT32, width,
GIMP_TYPE_INT32, height,
G_TYPE_STRING, name,
G_TYPE_DOUBLE, opacity,
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
gimp_value_set_image_id (gimp_value_array_index (args, 0), image_ID);
g_value_set_int (gimp_value_array_index (args, 1), width);
g_value_set_int (gimp_value_array_index (args, 2), height);
g_value_set_string (gimp_value_array_index (args, 3), name);
g_value_set_double (gimp_value_array_index (args, 4), opacity);
gimp_value_set_rgb (gimp_value_array_index (args, 5), color);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -127,13 +122,11 @@ gimp_channel_new_from_component (gint32 image_ID,
GimpValueArray *return_vals;
gint32 channel_ID = -1;
args = gimp_value_array_new_from_types (GIMP_TYPE_IMAGE_ID,
GIMP_TYPE_CHANNEL_TYPE,
G_TYPE_STRING,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE_ID, image_ID,
GIMP_TYPE_CHANNEL_TYPE, component,
G_TYPE_STRING, name,
G_TYPE_NONE);
gimp_value_set_image_id (gimp_value_array_index (args, 0), image_ID);
g_value_set_enum (gimp_value_array_index (args, 1), component);
g_value_set_string (gimp_value_array_index (args, 2), name);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -172,9 +165,9 @@ gimp_channel_copy (gint32 channel_ID)
GimpValueArray *return_vals;
gint32 channel_copy_ID = -1;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -220,17 +213,13 @@ gimp_channel_combine_masks (gint32 channel1_ID,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
GIMP_TYPE_CHANNEL_ID,
GIMP_TYPE_CHANNEL_OPS,
GIMP_TYPE_INT32,
GIMP_TYPE_INT32,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel1_ID,
GIMP_TYPE_CHANNEL_ID, channel2_ID,
GIMP_TYPE_CHANNEL_OPS, operation,
GIMP_TYPE_INT32, offx,
GIMP_TYPE_INT32, offy,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel1_ID);
gimp_value_set_channel_id (gimp_value_array_index (args, 1), channel2_ID);
g_value_set_enum (gimp_value_array_index (args, 2), operation);
g_value_set_int (gimp_value_array_index (args, 3), offx);
g_value_set_int (gimp_value_array_index (args, 4), offy);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -268,9 +257,9 @@ gimp_channel_get_show_masked (gint32 channel_ID)
GimpValueArray *return_vals;
gboolean show_masked = FALSE;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -311,11 +300,10 @@ gimp_channel_set_show_masked (gint32 channel_ID,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
G_TYPE_BOOLEAN,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
G_TYPE_BOOLEAN, show_masked,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
g_value_set_boolean (gimp_value_array_index (args, 1), show_masked);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -351,9 +339,9 @@ gimp_channel_get_opacity (gint32 channel_ID)
GimpValueArray *return_vals;
gdouble opacity = 0.0;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -392,11 +380,10 @@ gimp_channel_set_opacity (gint32 channel_ID,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
G_TYPE_DOUBLE,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
G_TYPE_DOUBLE, opacity,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
g_value_set_double (gimp_value_array_index (args, 1), opacity);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -434,9 +421,9 @@ gimp_channel_get_color (gint32 channel_ID,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -477,11 +464,10 @@ gimp_channel_set_color (gint32 channel_ID,
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (GIMP_TYPE_CHANNEL_ID,
GIMP_TYPE_RGB,
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_CHANNEL_ID, channel_ID,
GIMP_TYPE_RGB, color,
G_TYPE_NONE);
gimp_value_set_channel_id (gimp_value_array_index (args, 0), channel_ID);
gimp_value_set_rgb (gimp_value_array_index (args, 1), color);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
This diff is collapsed.
......@@ -59,7 +59,8 @@ gimp_debug_timer_start (void)
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (G_TYPE_NONE);
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......@@ -101,7 +102,8 @@ gimp_debug_timer_end (void)
GimpValueArray *return_vals;
gdouble elapsed = 0.0;
args = gimp_value_array_new_from_types (G_TYPE_NONE);
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
......
......@@ -55,9 +55,9 @@ gimp_display_is_valid (gint32 display_ID)
GimpValueArray *return_vals;
gboolean valid = FALSE;