Commit 5e00decc authored by Michael Natterer's avatar Michael Natterer 😴

pdb, libgimp: use GIMP_VALUES_GET,DUP_FOO() in the libgimp PDB wrappers

parent c6082b37
Pipeline #111354 passed with stages
in 14 minutes and 59 seconds
......@@ -65,7 +65,7 @@ gimp_version (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
version = g_value_dup_string (gimp_value_array_index (return_vals, 1));
version = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -99,7 +99,7 @@ gimp_getpid (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
pid = g_value_get_int (gimp_value_array_index (return_vals, 1));
pid = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -206,7 +206,7 @@ gimp_get_parasite (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
parasite = g_value_dup_boxed (gimp_value_array_index (return_vals, 1));
parasite = GIMP_VALUES_DUP_PARASITE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -246,8 +246,8 @@ gimp_get_parasite_list (gint *num_parasites)
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_parasites = g_value_get_int (gimp_value_array_index (return_vals, 1));
parasites = gimp_value_dup_string_array (gimp_value_array_index (return_vals, 2));
*num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
......@@ -284,7 +284,7 @@ gimp_temp_name (const gchar *extension)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......
......@@ -64,7 +64,7 @@ gimp_brush_new (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
actual_name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
actual_name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -101,7 +101,7 @@ gimp_brush_duplicate (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
copy_name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
copy_name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -137,7 +137,7 @@ gimp_brush_is_generated (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
generated = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
generated = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -177,7 +177,7 @@ gimp_brush_rename (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
actual_name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
actual_name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -248,7 +248,7 @@ gimp_brush_is_editable (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
editable = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
editable = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -301,10 +301,10 @@ gimp_brush_get_info (const gchar *name,
if (success)
{
*width = g_value_get_int (gimp_value_array_index (return_vals, 1));
*height = g_value_get_int (gimp_value_array_index (return_vals, 2));
*mask_bpp = g_value_get_int (gimp_value_array_index (return_vals, 3));
*color_bpp = g_value_get_int (gimp_value_array_index (return_vals, 4));
*width = GIMP_VALUES_GET_INT (return_vals, 1);
*height = GIMP_VALUES_GET_INT (return_vals, 2);
*mask_bpp = GIMP_VALUES_GET_INT (return_vals, 3);
*color_bpp = GIMP_VALUES_GET_INT (return_vals, 4);
}
gimp_value_array_unref (return_vals);
......@@ -370,14 +370,14 @@ gimp_brush_get_pixels (const gchar *name,
if (success)
{
*width = g_value_get_int (gimp_value_array_index (return_vals, 1));
*height = g_value_get_int (gimp_value_array_index (return_vals, 2));
*mask_bpp = g_value_get_int (gimp_value_array_index (return_vals, 3));
*num_mask_bytes = g_value_get_int (gimp_value_array_index (return_vals, 4));
*mask_bytes = gimp_value_dup_uint8_array (gimp_value_array_index (return_vals, 5));
*color_bpp = g_value_get_int (gimp_value_array_index (return_vals, 6));
*num_color_bytes = g_value_get_int (gimp_value_array_index (return_vals, 7));
*color_bytes = gimp_value_dup_uint8_array (gimp_value_array_index (return_vals, 8));
*width = GIMP_VALUES_GET_INT (return_vals, 1);
*height = GIMP_VALUES_GET_INT (return_vals, 2);
*mask_bpp = GIMP_VALUES_GET_INT (return_vals, 3);
*num_mask_bytes = GIMP_VALUES_GET_INT (return_vals, 4);
*mask_bytes = GIMP_VALUES_DUP_UINT8_ARRAY (return_vals, 5);
*color_bpp = GIMP_VALUES_GET_INT (return_vals, 6);
*num_color_bytes = GIMP_VALUES_GET_INT (return_vals, 7);
*color_bytes = GIMP_VALUES_DUP_UINT8_ARRAY (return_vals, 8);
}
gimp_value_array_unref (return_vals);
......@@ -422,7 +422,7 @@ gimp_brush_get_spacing (const gchar *name,
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success)
*spacing = g_value_get_int (gimp_value_array_index (return_vals, 1));
*spacing = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -502,7 +502,7 @@ gimp_brush_get_shape (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
shape = g_value_get_enum (gimp_value_array_index (return_vals, 1));
shape = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -546,7 +546,7 @@ gimp_brush_set_shape (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
shape_out = g_value_get_enum (gimp_value_array_index (return_vals, 1));
shape_out = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -583,7 +583,7 @@ gimp_brush_get_radius (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
radius = g_value_get_double (gimp_value_array_index (return_vals, 1));
radius = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -623,7 +623,7 @@ gimp_brush_set_radius (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
radius_out = g_value_get_double (gimp_value_array_index (return_vals, 1));
radius_out = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -660,7 +660,7 @@ gimp_brush_get_spikes (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
spikes = g_value_get_int (gimp_value_array_index (return_vals, 1));
spikes = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -700,7 +700,7 @@ gimp_brush_set_spikes (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
spikes_out = g_value_get_int (gimp_value_array_index (return_vals, 1));
spikes_out = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -739,7 +739,7 @@ gimp_brush_get_hardness (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
hardness = g_value_get_double (gimp_value_array_index (return_vals, 1));
hardness = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -780,7 +780,7 @@ gimp_brush_set_hardness (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
hardness_out = g_value_get_double (gimp_value_array_index (return_vals, 1));
hardness_out = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -818,7 +818,7 @@ gimp_brush_get_aspect_ratio (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
aspect_ratio = g_value_get_double (gimp_value_array_index (return_vals, 1));
aspect_ratio = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -859,7 +859,7 @@ gimp_brush_set_aspect_ratio (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
aspect_ratio_out = g_value_get_double (gimp_value_array_index (return_vals, 1));
aspect_ratio_out = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -896,7 +896,7 @@ gimp_brush_get_angle (const gchar *name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
angle = g_value_get_double (gimp_value_array_index (return_vals, 1));
angle = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -936,7 +936,7 @@ gimp_brush_set_angle (const gchar *name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
angle_out = g_value_get_double (gimp_value_array_index (return_vals, 1));
angle_out = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......
......@@ -102,8 +102,8 @@ gimp_brushes_get_list (const gchar *filter,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_brushes = g_value_get_int (gimp_value_array_index (return_vals, 1));
brush_list = gimp_value_dup_string_array (gimp_value_array_index (return_vals, 2));
*num_brushes = GIMP_VALUES_GET_INT (return_vals, 1);
brush_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
......
......@@ -71,8 +71,8 @@ gimp_buffers_get_list (const gchar *filter,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_buffers = g_value_get_int (gimp_value_array_index (return_vals, 1));
buffer_list = gimp_value_dup_string_array (gimp_value_array_index (return_vals, 2));
*num_buffers = GIMP_VALUES_GET_INT (return_vals, 1);
buffer_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
......@@ -113,7 +113,7 @@ gimp_buffer_rename (const gchar *buffer_name,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
real_name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
real_name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -184,7 +184,7 @@ gimp_buffer_get_width (const gchar *buffer_name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
width = g_value_get_int (gimp_value_array_index (return_vals, 1));
width = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -220,7 +220,7 @@ gimp_buffer_get_height (const gchar *buffer_name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
height = g_value_get_int (gimp_value_array_index (return_vals, 1));
height = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -256,7 +256,7 @@ gimp_buffer_get_bytes (const gchar *buffer_name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
bytes = g_value_get_int (gimp_value_array_index (return_vals, 1));
bytes = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -292,7 +292,7 @@ gimp_buffer_get_image_type (const gchar *buffer_name)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
image_type = g_value_get_enum (gimp_value_array_index (return_vals, 1));
image_type = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......
......@@ -82,7 +82,7 @@ _gimp_channel_new (GimpImage *image,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
channel = GIMP_VALUES_GET_CHANNEL (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -128,7 +128,7 @@ gimp_channel_new_from_component (GimpImage *image,
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
channel = g_value_get_object (gimp_value_array_index (return_vals, 1));
channel = GIMP_VALUES_GET_CHANNEL (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -164,7 +164,7 @@ gimp_channel_copy (GimpChannel *channel)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
channel_copy = g_value_get_object (gimp_value_array_index (return_vals, 1));
channel_copy = GIMP_VALUES_GET_CHANNEL (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -246,7 +246,7 @@ gimp_channel_get_show_masked (GimpChannel *channel)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
show_masked = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
show_masked = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -318,7 +318,7 @@ gimp_channel_get_opacity (GimpChannel *channel)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
opacity = g_value_get_double (gimp_value_array_index (return_vals, 1));
opacity = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -392,7 +392,7 @@ gimp_channel_get_color (GimpChannel *channel,
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success)
gimp_value_get_rgb (gimp_value_array_index (return_vals, 1), &*color);
GIMP_VALUES_GET_RGB (return_vals, 1, &*color);
gimp_value_array_unref (return_vals);
......
......@@ -179,8 +179,8 @@ gimp_context_list_paint_methods (gint *num_paint_methods,
if (success)
{
*num_paint_methods = g_value_get_int (gimp_value_array_index (return_vals, 1));
*paint_methods = gimp_value_dup_string_array (gimp_value_array_index (return_vals, 2));
*num_paint_methods = GIMP_VALUES_GET_INT (return_vals, 1);
*paint_methods = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
......@@ -217,7 +217,7 @@ gimp_context_get_paint_method (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -291,7 +291,7 @@ gimp_context_get_stroke_method (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
stroke_method = g_value_get_enum (gimp_value_array_index (return_vals, 1));
stroke_method = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -367,7 +367,7 @@ gimp_context_get_foreground (GimpRGB *foreground)
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success)
gimp_value_get_rgb (gimp_value_array_index (return_vals, 1), &*foreground);
GIMP_VALUES_GET_RGB (return_vals, 1, &*foreground);
gimp_value_array_unref (return_vals);
......@@ -443,7 +443,7 @@ gimp_context_get_background (GimpRGB *background)
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success)
gimp_value_get_rgb (gimp_value_array_index (return_vals, 1), &*background);
GIMP_VALUES_GET_RGB (return_vals, 1, &*background);
gimp_value_array_unref (return_vals);
......@@ -586,7 +586,7 @@ gimp_context_get_opacity (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
opacity = g_value_get_double (gimp_value_array_index (return_vals, 1));
opacity = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -658,7 +658,7 @@ gimp_context_get_paint_mode (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
paint_mode = g_value_get_enum (gimp_value_array_index (return_vals, 1));
paint_mode = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -727,7 +727,7 @@ gimp_context_get_line_width (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
line_width = g_value_get_double (gimp_value_array_index (return_vals, 1));
line_width = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -800,7 +800,7 @@ gimp_context_get_line_width_unit (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
line_width_unit = g_value_get_int (gimp_value_array_index (return_vals, 1));
line_width_unit = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -874,7 +874,7 @@ gimp_context_get_line_cap_style (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
cap_style = g_value_get_enum (gimp_value_array_index (return_vals, 1));
cap_style = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -948,7 +948,7 @@ gimp_context_get_line_join_style (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
join_style = g_value_get_enum (gimp_value_array_index (return_vals, 1));
join_style = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1022,7 +1022,7 @@ gimp_context_get_line_miter_limit (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
miter_limit = g_value_get_double (gimp_value_array_index (return_vals, 1));
miter_limit = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1099,7 +1099,7 @@ gimp_context_get_line_dash_offset (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
dash_offset = g_value_get_double (gimp_value_array_index (return_vals, 1));
dash_offset = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1182,8 +1182,8 @@ gimp_context_get_line_dash_pattern (gint *num_dashes,
if (success)
{
*num_dashes = g_value_get_int (gimp_value_array_index (return_vals, 1));
*dashes = gimp_value_dup_float_array (gimp_value_array_index (return_vals, 2));
*num_dashes = GIMP_VALUES_GET_INT (return_vals, 1);
*dashes = GIMP_VALUES_DUP_FLOAT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
......@@ -1269,7 +1269,7 @@ gimp_context_get_brush (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1342,7 +1342,7 @@ gimp_context_get_brush_size (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
size = g_value_get_double (gimp_value_array_index (return_vals, 1));
size = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1445,7 +1445,7 @@ gimp_context_get_brush_aspect_ratio (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
aspect = g_value_get_double (gimp_value_array_index (return_vals, 1));
aspect = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1514,7 +1514,7 @@ gimp_context_get_brush_angle (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
angle = g_value_get_double (gimp_value_array_index (return_vals, 1));
angle = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1584,7 +1584,7 @@ gimp_context_get_brush_spacing (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
spacing = g_value_get_double (gimp_value_array_index (return_vals, 1));
spacing = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1688,7 +1688,7 @@ gimp_context_get_brush_hardness (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
hardness = g_value_get_double (gimp_value_array_index (return_vals, 1));
hardness = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1791,7 +1791,7 @@ gimp_context_get_brush_force (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
force = g_value_get_double (gimp_value_array_index (return_vals, 1));
force = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1863,7 +1863,7 @@ gimp_context_get_dynamics (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -1939,7 +1939,7 @@ gimp_context_get_mypaint_brush (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2016,7 +2016,7 @@ gimp_context_get_pattern (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2091,7 +2091,7 @@ gimp_context_get_gradient (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2306,7 +2306,7 @@ gimp_context_get_gradient_blend_color_space (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
blend_color_space = g_value_get_enum (gimp_value_array_index (return_vals, 1));
blend_color_space = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2376,7 +2376,7 @@ gimp_context_get_gradient_repeat_mode (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
repeat_mode = g_value_get_enum (gimp_value_array_index (return_vals, 1));
repeat_mode = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2446,7 +2446,7 @@ gimp_context_get_gradient_reverse (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
reverse = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
reverse = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2517,7 +2517,7 @@ gimp_context_get_palette (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2592,7 +2592,7 @@ gimp_context_get_font (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
name = g_value_dup_string (gimp_value_array_index (return_vals, 1));
name = GIMP_VALUES_DUP_STRING (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2665,7 +2665,7 @@ gimp_context_get_antialias (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
antialias = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
antialias = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2745,7 +2745,7 @@ gimp_context_get_feather (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
feather = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
feather = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2832,8 +2832,8 @@ gimp_context_get_feather_radius (gdouble *feather_radius_x,
if (success)
{
*feather_radius_x = g_value_get_double (gimp_value_array_index (return_vals, 1));
*feather_radius_y = g_value_get_double (gimp_value_array_index (return_vals, 2));
*feather_radius_x = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
*feather_radius_y = GIMP_VALUES_GET_DOUBLE (return_vals, 2);
}
gimp_value_array_unref (return_vals);
......@@ -2909,7 +2909,7 @@ gimp_context_get_sample_merged (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
sample_merged = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
sample_merged = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -2988,7 +2988,7 @@ gimp_context_get_sample_criterion (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
sample_criterion = g_value_get_enum (gimp_value_array_index (return_vals, 1));
sample_criterion = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -3065,7 +3065,7 @@ gimp_context_get_sample_threshold (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
sample_threshold = g_value_get_double (gimp_value_array_index (return_vals, 1));
sample_threshold = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -3144,7 +3144,7 @@ gimp_context_get_sample_threshold_int (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
sample_threshold = g_value_get_int (gimp_value_array_index (return_vals, 1));
sample_threshold = GIMP_VALUES_GET_INT (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -3214,7 +3214,7 @@ gimp_context_get_sample_transparent (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
sample_transparent = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
sample_transparent = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -3291,7 +3291,7 @@ gimp_context_get_diagonal_neighbors (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
diagonal_neighbors = g_value_get_boolean (gimp_value_array_index (return_vals, 1));
diagonal_neighbors = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
......@@ -3370,7 +3370,7 @@ gimp_context_get_distance_metric (void)
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
metric = g_value_get_enum (gimp_value_array_index (return_vals, 1));
metric = GIMP_VALUES_GET_ENUM (return_vals, 1);