app, libgimp: pdbgen for previous commit.

This commit is contained in:
Niels De Graef 2021-12-01 22:35:25 +01:00 committed by Jehan
parent 8eb7f6df9e
commit 1e34a95db7
37 changed files with 167 additions and 408 deletions

View file

@ -67,7 +67,6 @@ brushes_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_brushes = 0;
gchar **brush_list = NULL; gchar **brush_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -75,17 +74,14 @@ brushes_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
brush_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->brush_factory), brush_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->brush_factory),
filter, &num_brushes); filter);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), brush_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_brushes);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), brush_list, num_brushes);
}
return return_vals; return return_vals;
} }
@ -134,16 +130,11 @@ register_brushes_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-brushes", g_param_spec_boxed ("brush-list",
"num brushes", "brush list",
"The number of brushes in the brush list", "The list of brush names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("brush-list",
"brush list",
"The list of brush names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -53,7 +53,6 @@ buffers_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_buffers = 0;
gchar **buffer_list = NULL; gchar **buffer_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -61,17 +60,14 @@ buffers_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
buffer_list = gimp_container_get_filtered_name_array (gimp->named_buffers, buffer_list = gimp_container_get_filtered_name_array (gimp->named_buffers,
filter, &num_buffers); filter);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), buffer_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_buffers);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), buffer_list, num_buffers);
}
return return_vals; return return_vals;
} }
@ -309,16 +305,11 @@ register_buffer_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-buffers", g_param_spec_boxed ("buffer-list",
"num buffers", "buffer list",
"The number of buffers", "The list of buffer names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("buffer-list",
"buffer list",
"The list of buffer names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View file

@ -114,16 +114,12 @@ context_list_paint_methods_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
GimpValueArray *return_vals; GimpValueArray *return_vals;
gint num_paint_methods = 0;
gchar **paint_methods = NULL; gchar **paint_methods = NULL;
paint_methods = gimp_container_get_name_array (gimp->paint_info_list, paint_methods = gimp_container_get_name_array (gimp->paint_info_list);
&num_paint_methods);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL); return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_take_boxed (gimp_value_array_index (return_vals, 1), paint_methods);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_paint_methods);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), paint_methods, num_paint_methods);
return return_vals; return return_vals;
} }
@ -3151,16 +3147,11 @@ register_context_procs (GimpPDB *pdb)
"Simon Budig", "Simon Budig",
"2007"); "2007");
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-paint-methods", g_param_spec_boxed ("paint-methods",
"num paint methods", "paint methods",
"The number of the available paint methods", "The names of the available paint methods",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); 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); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View file

@ -62,7 +62,6 @@ dynamics_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_dynamics = 0;
gchar **dynamics_list = NULL; gchar **dynamics_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -70,17 +69,14 @@ dynamics_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
dynamics_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->dynamics_factory), dynamics_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->dynamics_factory),
filter, &num_dynamics); filter);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), dynamics_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_dynamics);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), dynamics_list, num_dynamics);
}
return return_vals; return return_vals;
} }
@ -129,16 +125,11 @@ register_dynamics_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-dynamics", g_param_spec_boxed ("dynamics-list",
"num dynamics", "dynamics list",
"The number of available paint dynamics", "The list of paint dynamics names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("dynamics-list",
"dynamics list",
"The list of paint dynamics names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -63,7 +63,6 @@ fonts_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_fonts = 0;
gchar **font_list = NULL; gchar **font_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -76,7 +75,7 @@ fonts_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
font_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->font_factory), font_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->font_factory),
filter, &num_fonts); filter);
} }
} }
@ -84,10 +83,7 @@ fonts_get_list_invoker (GimpProcedure *procedure,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), font_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_fonts);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), font_list, num_fonts);
}
return return_vals; return return_vals;
} }
@ -136,16 +132,11 @@ register_fonts_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-fonts", g_param_spec_boxed ("font-list",
"num fonts", "font list",
"The number of available fonts", "The list of font names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("font-list",
"font list",
"The list of font names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -187,15 +187,12 @@ get_parasite_list_invoker (GimpProcedure *procedure,
GError **error) GError **error)
{ {
GimpValueArray *return_vals; GimpValueArray *return_vals;
gint num_parasites = 0;
gchar **parasites = NULL; gchar **parasites = NULL;
parasites = gimp_parasite_list (gimp, &num_parasites); parasites = gimp_parasite_list (gimp);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL); return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasites);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
return return_vals; return return_vals;
} }
@ -394,16 +391,11 @@ register_gimp_procs (GimpPDB *pdb)
"Marc Lehmann", "Marc Lehmann",
"1999"); "1999");
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-parasites", g_param_spec_boxed ("parasites",
"num parasites", "parasites",
"The number of attached parasites", "The names of currently attached parasites",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("parasites",
"parasites",
"The names of currently attached parasites",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View file

@ -66,7 +66,6 @@ gradients_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_gradients = 0;
gchar **gradient_list = NULL; gchar **gradient_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -74,17 +73,14 @@ gradients_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
gradient_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->gradient_factory), gradient_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->gradient_factory),
filter, &num_gradients); filter);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), gradient_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_gradients);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), gradient_list, num_gradients);
}
return return_vals; return return_vals;
} }
@ -133,16 +129,11 @@ register_gradients_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-gradients", g_param_spec_boxed ("gradient-list",
"num gradients", "gradient list",
"The number of loaded gradients", "The list of gradient names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("gradient-list",
"gradient list",
"The list of gradient names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -2833,24 +2833,20 @@ image_get_parasite_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
gint num_parasites = 0;
gchar **parasites = NULL; gchar **parasites = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
if (success) if (success)
{ {
parasites = gimp_image_parasite_list (image, &num_parasites); parasites = gimp_image_parasite_list (image);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasites);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
}
return return_vals; return return_vals;
} }
@ -5641,16 +5637,11 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-parasites", g_param_spec_boxed ("parasites",
"num parasites", "parasites",
"The number of attached parasites", "The names of currently attached parasites",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("parasites",
"parasites",
"The names of currently attached parasites",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View file

@ -1004,24 +1004,20 @@ item_get_parasite_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpItem *item; GimpItem *item;
gint num_parasites = 0;
gchar **parasites = NULL; gchar **parasites = NULL;
item = g_value_get_object (gimp_value_array_index (args, 0)); item = g_value_get_object (gimp_value_array_index (args, 0));
if (success) if (success)
{ {
parasites = gimp_item_parasite_list (item, &num_parasites); parasites = gimp_item_parasite_list (item);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasites);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
}
return return_vals; return return_vals;
} }
@ -1990,16 +1986,11 @@ register_item_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-parasites", g_param_spec_boxed ("parasites",
"num parasites", "parasites",
"The number of attached parasites", "The names of currently attached parasites",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("parasites",
"parasites",
"The names of currently attached parasites",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -66,7 +66,6 @@ palettes_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_palettes = 0;
gchar **palette_list = NULL; gchar **palette_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -74,17 +73,14 @@ palettes_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
palette_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->palette_factory), palette_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->palette_factory),
filter, &num_palettes); filter);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), palette_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_palettes);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), palette_list, num_palettes);
}
return return_vals; return return_vals;
} }
@ -133,16 +129,11 @@ register_palettes_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-palettes", g_param_spec_boxed ("palette-list",
"num palettes", "palette list",
"The number of palettes in the list", "The list of palette names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("palette-list",
"palette list",
"The list of palette names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -67,7 +67,6 @@ patterns_get_list_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *filter; const gchar *filter;
gint num_patterns = 0;
gchar **pattern_list = NULL; gchar **pattern_list = NULL;
filter = g_value_get_string (gimp_value_array_index (args, 0)); filter = g_value_get_string (gimp_value_array_index (args, 0));
@ -75,17 +74,14 @@ patterns_get_list_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
pattern_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->pattern_factory), pattern_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->pattern_factory),
filter, &num_patterns); filter);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), pattern_list);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_patterns);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), pattern_list, num_patterns);
}
return return_vals; return return_vals;
} }
@ -134,16 +130,11 @@ register_patterns_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-patterns", g_param_spec_boxed ("pattern-list",
"num patterns", "pattern list",
"The number of patterns in the pattern list", "The list of pattern names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("pattern-list",
"pattern list",
"The list of pattern names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
} }

View file

@ -134,7 +134,6 @@ pdb_query_invoker (GimpProcedure *procedure,
const gchar *copyright; const gchar *copyright;
const gchar *date; const gchar *date;
const gchar *proc_type; const gchar *proc_type;
gint num_matches = 0;
gchar **procedure_names = NULL; gchar **procedure_names = NULL;
name = g_value_get_string (gimp_value_array_index (args, 0)); name = g_value_get_string (gimp_value_array_index (args, 0));
@ -150,7 +149,7 @@ pdb_query_invoker (GimpProcedure *procedure,
success = gimp_pdb_query (gimp->pdb, success = gimp_pdb_query (gimp->pdb,
name, blurb, help, authors, name, blurb, help, authors,
copyright, date, proc_type, copyright, date, proc_type,
&num_matches, &procedure_names, &procedure_names,
error); error);
} }
@ -158,10 +157,7 @@ pdb_query_invoker (GimpProcedure *procedure,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), procedure_names);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_matches);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), procedure_names, num_matches);
}
return return_vals; return return_vals;
} }
@ -577,7 +573,6 @@ pdb_get_proc_menu_paths_invoker (GimpProcedure *procedure,
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *procedure_name; const gchar *procedure_name;
gint num_menu_paths = 0;
gchar **menu_paths = NULL; gchar **menu_paths = NULL;
procedure_name = g_value_get_string (gimp_value_array_index (args, 0)); procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
@ -592,6 +587,7 @@ pdb_get_proc_menu_paths_invoker (GimpProcedure *procedure,
if (GIMP_IS_PLUG_IN_PROCEDURE (proc)) if (GIMP_IS_PLUG_IN_PROCEDURE (proc))
{ {
GimpPlugInProcedure *plug_in_proc = GIMP_PLUG_IN_PROCEDURE (proc); GimpPlugInProcedure *plug_in_proc = GIMP_PLUG_IN_PROCEDURE (proc);
guint num_menu_paths;
num_menu_paths = g_list_length (plug_in_proc->menu_paths); num_menu_paths = g_list_length (plug_in_proc->menu_paths);
@ -621,10 +617,7 @@ pdb_get_proc_menu_paths_invoker (GimpProcedure *procedure,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
{ g_value_take_boxed (gimp_value_array_index (return_vals, 1), menu_paths);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_menu_paths);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), menu_paths, num_menu_paths);
}
return return_vals; return return_vals;
} }
@ -1331,16 +1324,11 @@ register_pdb_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-matches", g_param_spec_boxed ("procedure-names",
"num matches", "procedure names",
"The number of matching procedures", "The list of procedure names",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("procedure-names",
"procedure names",
"The list of procedure names",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
@ -1696,16 +1684,11 @@ register_pdb_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-menu-paths", g_param_spec_boxed ("menu-paths",
"num menu paths", "menu paths",
"The number of menu paths", "The menu paths of the plug-in",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("menu-paths",
"menu paths",
"The menu paths of the plug-in",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View file

@ -57,37 +57,28 @@ plug_ins_query_invoker (GimpProcedure *procedure,
{ {
GimpValueArray *return_vals; GimpValueArray *return_vals;
const gchar *search_string; const gchar *search_string;
gint num_procedures = 0;
gchar **procedures = NULL; gchar **procedures = NULL;
gint num_accelerators = 0;
gchar **accelerators = NULL; gchar **accelerators = NULL;
gint num_locations = 0;
gchar **locations = NULL; gchar **locations = NULL;
gint num_install_times = 0; gint num_install_times = 0;
gint32 *install_times = NULL; gint32 *install_times = NULL;
search_string = g_value_get_string (gimp_value_array_index (args, 0)); search_string = g_value_get_string (gimp_value_array_index (args, 0));
num_procedures = gimp_plug_in_manager_query (gimp->plug_in_manager, num_install_times = gimp_plug_in_manager_query (gimp->plug_in_manager,
search_string, search_string,
&procedures, &procedures,
&accelerators, &accelerators,
&locations, &locations,
&install_times); &install_times);
num_accelerators = num_procedures;
num_locations = num_procedures;
num_install_times = num_procedures;
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL); return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_procedures); g_value_take_boxed (gimp_value_array_index (return_vals, 1), procedures);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 2), procedures, num_procedures); g_value_take_boxed (gimp_value_array_index (return_vals, 2), accelerators);
g_value_set_int (gimp_value_array_index (return_vals, 3), num_accelerators); g_value_take_boxed (gimp_value_array_index (return_vals, 3), locations);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 4), accelerators, num_accelerators); g_value_set_int (gimp_value_array_index (return_vals, 4), num_install_times);
g_value_set_int (gimp_value_array_index (return_vals, 5), num_locations); gimp_value_take_int32_array (gimp_value_array_index (return_vals, 5), install_times, num_install_times);
gimp_value_take_string_array (gimp_value_array_index (return_vals, 6), locations, num_locations);
g_value_set_int (gimp_value_array_index (return_vals, 7), num_install_times);
gimp_value_take_int32_array (gimp_value_array_index (return_vals, 8), install_times, num_install_times);
return return_vals; return return_vals;
} }
@ -282,38 +273,23 @@ register_plug_in_procs (GimpPDB *pdb)
NULL, NULL,
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE)); GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-procedures", g_param_spec_boxed ("procedures",
"num procedures", "procedures",
"The number of matching procedures", "The plug-in procedure name",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("procedures", g_param_spec_boxed ("accelerators",
"procedures", "accelerators",
"The plug-in procedure name", "String representing keyboard accelerator (could be empty string)",
GIMP_PARAM_READWRITE)); G_TYPE_STRV,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-accelerators", g_param_spec_boxed ("locations",
"num accelerators", "locations",
"The number of matching procedures", "Location of the plug-in program",
0, G_MAXINT32, 0, G_TYPE_STRV,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("accelerators",
"accelerators",
"String representing keyboard accelerator (could be empty string)",
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-locations",
"num locations",
"The number of matching procedures",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string_array ("locations",
"locations",
"Location of the plug-in program",
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-install-times", g_param_spec_int ("num-install-times",
"num install times", "num install times",

View file

@ -215,20 +215,19 @@ gimp_get_parasite (const gchar *name)
/** /**
* gimp_get_parasite_list: * gimp_get_parasite_list:
* @num_parasites: (out): The number of attached parasites.
* *
* List all parasites. * List all parasites.
* *
* Returns a list of all currently attached global parasites. * Returns a list of all currently attached global parasites.
* *
* Returns: (array length=num_parasites) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The names of currently attached parasites. * The names of currently attached parasites.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
* *
* Since: 2.8 * Since: 2.8
**/ **/
gchar ** gchar **
gimp_get_parasite_list (gint *num_parasites) gimp_get_parasite_list (void)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -242,13 +241,8 @@ gimp_get_parasite_list (gint *num_parasites)
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_parasites = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ parasites = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -37,7 +37,7 @@ gint gimp_getpid (void);
gboolean gimp_attach_parasite (const GimpParasite *parasite); gboolean gimp_attach_parasite (const GimpParasite *parasite);
gboolean gimp_detach_parasite (const gchar *name); gboolean gimp_detach_parasite (const gchar *name);
GimpParasite* gimp_get_parasite (const gchar *name); GimpParasite* gimp_get_parasite (const gchar *name);
gchar** gimp_get_parasite_list (gint *num_parasites); gchar** gimp_get_parasite_list (void);
GFile* gimp_temp_file (const gchar *extension); GFile* gimp_temp_file (const gchar *extension);

View file

@ -69,7 +69,6 @@ gimp_brushes_refresh (void)
/** /**
* gimp_brushes_get_list: * gimp_brushes_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_brushes: (out): The number of brushes in the brush list.
* *
* Retrieve a complete listing of the available brushes. * Retrieve a complete listing of the available brushes.
* *
@ -77,13 +76,11 @@ gimp_brushes_refresh (void)
* Each name returned can be used as input to the * Each name returned can be used as input to the
* gimp_context_set_brush() procedure. * gimp_context_set_brush() procedure.
* *
* Returns: (array length=num_brushes) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full): The list of brush names.
* The list of brush names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
**/ **/
gchar ** gchar **
gimp_brushes_get_list (const gchar *filter, gimp_brushes_get_list (const gchar *filter)
gint *num_brushes)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -98,13 +95,8 @@ gimp_brushes_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_brushes = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ brush_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*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); gimp_value_array_unref (return_vals);

View file

@ -33,8 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_brushes_refresh (void); gboolean gimp_brushes_refresh (void);
gchar** gimp_brushes_get_list (const gchar *filter, gchar** gimp_brushes_get_list (const gchar *filter);
gint *num_brushes);
G_END_DECLS G_END_DECLS

View file

@ -37,22 +37,20 @@
/** /**
* gimp_buffers_get_list: * gimp_buffers_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_buffers: (out): The number of buffers.
* *
* Retrieve a complete listing of the available buffers. * Retrieve a complete listing of the available buffers.
* *
* This procedure returns a complete listing of available named * This procedure returns a complete listing of available named
* buffers. * buffers.
* *
* Returns: (array length=num_buffers) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The list of buffer names. * The list of buffer names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
* *
* Since: 2.4 * Since: 2.4
**/ **/
gchar ** gchar **
gimp_buffers_get_list (const gchar *filter, gimp_buffers_get_list (const gchar *filter)
gint *num_buffers)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -67,13 +65,8 @@ gimp_buffers_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_buffers = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ buffer_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*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); gimp_value_array_unref (return_vals);

View file

@ -32,8 +32,7 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */ /* For information look into the C source or the html documentation */
gchar** gimp_buffers_get_list (const gchar *filter, gchar** gimp_buffers_get_list (const gchar *filter);
gint *num_buffers);
gchar* gimp_buffer_rename (const gchar *buffer_name, gchar* gimp_buffer_rename (const gchar *buffer_name,
const gchar *new_name); const gchar *new_name);
gboolean gimp_buffer_delete (const gchar *buffer_name); gboolean gimp_buffer_delete (const gchar *buffer_name);

View file

@ -144,8 +144,7 @@ gimp_context_set_defaults (void)
/** /**
* gimp_context_list_paint_methods: * gimp_context_list_paint_methods:
* @num_paint_methods: (out): The number of the available paint methods. * @paint_methods: (out) (array zero-terminated=1) (transfer full): The names of the available paint methods.
* @paint_methods: (out) (array length=num_paint_methods) (element-type gchar*) (transfer full): The names of the available paint methods.
* *
* Lists the available paint methods. * Lists the available paint methods.
* *
@ -157,8 +156,7 @@ gimp_context_set_defaults (void)
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_context_list_paint_methods (gint *num_paint_methods, gimp_context_list_paint_methods (gchar ***paint_methods)
gchar ***paint_methods)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -172,16 +170,12 @@ gimp_context_list_paint_methods (gint *num_paint_methods,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_paint_methods = 0;
*paint_methods = NULL; *paint_methods = NULL;
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS; success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success) if (success)
{ *paint_methods = GIMP_VALUES_DUP_STRV (return_vals, 1);
*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); gimp_value_array_unref (return_vals);

View file

@ -35,8 +35,7 @@ G_BEGIN_DECLS
gboolean gimp_context_push (void); gboolean gimp_context_push (void);
gboolean gimp_context_pop (void); gboolean gimp_context_pop (void);
gboolean gimp_context_set_defaults (void); gboolean gimp_context_set_defaults (void);
gboolean gimp_context_list_paint_methods (gint *num_paint_methods, gboolean gimp_context_list_paint_methods (gchar ***paint_methods);
gchar ***paint_methods);
gchar* gimp_context_get_paint_method (void); gchar* gimp_context_get_paint_method (void);
gboolean gimp_context_set_paint_method (const gchar *name); gboolean gimp_context_set_paint_method (const gchar *name);
GimpStrokeMethod gimp_context_get_stroke_method (void); GimpStrokeMethod gimp_context_get_stroke_method (void);

View file

@ -72,22 +72,20 @@ gimp_dynamics_refresh (void)
/** /**
* gimp_dynamics_get_list: * gimp_dynamics_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_dynamics: (out): The number of available paint dynamics.
* *
* Retrieve the list of loaded paint dynamics. * Retrieve the list of loaded paint dynamics.
* *
* This procedure returns a list of the paint dynamics that are * This procedure returns a list of the paint dynamics that are
* currently available. * currently available.
* *
* Returns: (array length=num_dynamics) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The list of paint dynamics names. * The list of paint dynamics names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
* *
* Since: 2.8 * Since: 2.8
**/ **/
gchar ** gchar **
gimp_dynamics_get_list (const gchar *filter, gimp_dynamics_get_list (const gchar *filter)
gint *num_dynamics)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -102,13 +100,8 @@ gimp_dynamics_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_dynamics = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ dynamics_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_dynamics = GIMP_VALUES_GET_INT (return_vals, 1);
dynamics_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -33,8 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_dynamics_refresh (void); gboolean gimp_dynamics_refresh (void);
gchar** gimp_dynamics_get_list (const gchar *filter, gchar** gimp_dynamics_get_list (const gchar *filter);
gint *num_dynamics);
G_END_DECLS G_END_DECLS

View file

@ -70,20 +70,17 @@ gimp_fonts_refresh (void)
/** /**
* gimp_fonts_get_list: * gimp_fonts_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_fonts: (out): The number of available fonts.
* *
* Retrieve the list of loaded fonts. * Retrieve the list of loaded fonts.
* *
* This procedure returns a list of the fonts that are currently * This procedure returns a list of the fonts that are currently
* available. * available.
* *
* Returns: (array length=num_fonts) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full): The list of font names.
* The list of font names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
**/ **/
gchar ** gchar **
gimp_fonts_get_list (const gchar *filter, gimp_fonts_get_list (const gchar *filter)
gint *num_fonts)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -98,13 +95,8 @@ gimp_fonts_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_fonts = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ font_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_fonts = GIMP_VALUES_GET_INT (return_vals, 1);
font_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -33,8 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_fonts_refresh (void); gboolean gimp_fonts_refresh (void);
gchar** gimp_fonts_get_list (const gchar *filter, gchar** gimp_fonts_get_list (const gchar *filter);
gint *num_fonts);
G_END_DECLS G_END_DECLS

View file

@ -69,7 +69,6 @@ gimp_gradients_refresh (void)
/** /**
* gimp_gradients_get_list: * gimp_gradients_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_gradients: (out): The number of loaded gradients.
* *
* Retrieve the list of loaded gradients. * Retrieve the list of loaded gradients.
* *
@ -77,13 +76,12 @@ gimp_gradients_refresh (void)
* loaded. You can later use the gimp_context_set_gradient() function * loaded. You can later use the gimp_context_set_gradient() function
* to set the active gradient. * to set the active gradient.
* *
* Returns: (array length=num_gradients) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The list of gradient names. * The list of gradient names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
**/ **/
gchar ** gchar **
gimp_gradients_get_list (const gchar *filter, gimp_gradients_get_list (const gchar *filter)
gint *num_gradients)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -98,13 +96,8 @@ gimp_gradients_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_gradients = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ gradient_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_gradients = GIMP_VALUES_GET_INT (return_vals, 1);
gradient_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -33,8 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_gradients_refresh (void); gboolean gimp_gradients_refresh (void);
gchar** gimp_gradients_get_list (const gchar *filter, gchar** gimp_gradients_get_list (const gchar *filter);
gint *num_gradients);
G_END_DECLS G_END_DECLS

View file

@ -3432,7 +3432,6 @@ gimp_image_get_parasite (GimpImage *image,
/** /**
* gimp_image_get_parasite_list: * gimp_image_get_parasite_list:
* @image: The image. * @image: The image.
* @num_parasites: (out): The number of attached parasites.
* *
* List all parasites. * List all parasites.
* *
@ -3440,15 +3439,14 @@ gimp_image_get_parasite (GimpImage *image,
* These names can later be used to get the actual #GimpParasite with * These names can later be used to get the actual #GimpParasite with
* gimp_image_get_parasite() when needed. * gimp_image_get_parasite() when needed.
* *
* Returns: (array length=num_parasites) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The names of currently attached parasites. * The names of currently attached parasites.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
* *
* Since: 2.8 * Since: 2.8
**/ **/
gchar ** gchar **
gimp_image_get_parasite_list (GimpImage *image, gimp_image_get_parasite_list (GimpImage *image)
gint *num_parasites)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -3463,13 +3461,8 @@ gimp_image_get_parasite_list (GimpImage *image,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_parasites = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ parasites = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -196,8 +196,7 @@ gboolean gimp_image_detach_parasite (GimpImage
const gchar *name); const gchar *name);
GimpParasite* gimp_image_get_parasite (GimpImage *image, GimpParasite* gimp_image_get_parasite (GimpImage *image,
const gchar *name); const gchar *name);
gchar** gimp_image_get_parasite_list (GimpImage *image, gchar** gimp_image_get_parasite_list (GimpImage *image);
gint *num_parasites);
gboolean gimp_image_policy_rotate (GimpImage *image, gboolean gimp_image_policy_rotate (GimpImage *image,
gboolean interactive); gboolean interactive);
gboolean gimp_image_policy_color_profile (GimpImage *image, gboolean gimp_image_policy_color_profile (GimpImage *image,

View file

@ -1236,21 +1236,19 @@ gimp_item_get_parasite (GimpItem *item,
/** /**
* gimp_item_get_parasite_list: * gimp_item_get_parasite_list:
* @item: The item. * @item: The item.
* @num_parasites: (out): The number of attached parasites.
* *
* List all parasites. * List all parasites.
* *
* Returns a list of all parasites currently attached the an item. * Returns a list of all parasites currently attached the an item.
* *
* Returns: (array length=num_parasites) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The names of currently attached parasites. * The names of currently attached parasites.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
* *
* Since: 2.8 * Since: 2.8
**/ **/
gchar ** gchar **
gimp_item_get_parasite_list (GimpItem *item, gimp_item_get_parasite_list (GimpItem *item)
gint *num_parasites)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1265,13 +1263,8 @@ gimp_item_get_parasite_list (GimpItem *item,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_parasites = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ parasites = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_parasites = GIMP_VALUES_GET_INT (return_vals, 1);
parasites = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -76,8 +76,7 @@ gboolean gimp_item_detach_parasite (GimpItem *item,
const gchar *name); const gchar *name);
GimpParasite* gimp_item_get_parasite (GimpItem *item, GimpParasite* gimp_item_get_parasite (GimpItem *item,
const gchar *name); const gchar *name);
gchar** gimp_item_get_parasite_list (GimpItem *item, gchar** gimp_item_get_parasite_list (GimpItem *item);
gint *num_parasites);
G_END_DECLS G_END_DECLS

View file

@ -69,7 +69,6 @@ gimp_palettes_refresh (void)
/** /**
* gimp_palettes_get_list: * gimp_palettes_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_palettes: (out): The number of palettes in the list.
* *
* Retrieves a list of all of the available palettes * Retrieves a list of all of the available palettes
* *
@ -77,13 +76,12 @@ gimp_palettes_refresh (void)
* Each name returned can be used as input to the command * Each name returned can be used as input to the command
* gimp_context_set_palette(). * gimp_context_set_palette().
* *
* Returns: (array length=num_palettes) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The list of palette names. * The list of palette names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
**/ **/
gchar ** gchar **
gimp_palettes_get_list (const gchar *filter, gimp_palettes_get_list (const gchar *filter)
gint *num_palettes)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -98,13 +96,8 @@ gimp_palettes_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_palettes = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ palette_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_palettes = GIMP_VALUES_GET_INT (return_vals, 1);
palette_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -33,8 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_palettes_refresh (void); gboolean gimp_palettes_refresh (void);
gchar** gimp_palettes_get_list (const gchar *filter, gchar** gimp_palettes_get_list (const gchar *filter);
gint *num_palettes);
G_END_DECLS G_END_DECLS

View file

@ -69,7 +69,6 @@ gimp_patterns_refresh (void)
/** /**
* gimp_patterns_get_list: * gimp_patterns_get_list:
* @filter: An optional regular expression used to filter the list. * @filter: An optional regular expression used to filter the list.
* @num_patterns: (out): The number of patterns in the pattern list.
* *
* Retrieve a complete listing of the available patterns. * Retrieve a complete listing of the available patterns.
* *
@ -77,13 +76,12 @@ gimp_patterns_refresh (void)
* patterns. Each name returned can be used as input to the * patterns. Each name returned can be used as input to the
* gimp_context_set_pattern(). * gimp_context_set_pattern().
* *
* Returns: (array length=num_patterns) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The list of pattern names. * The list of pattern names.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
**/ **/
gchar ** gchar **
gimp_patterns_get_list (const gchar *filter, gimp_patterns_get_list (const gchar *filter)
gint *num_patterns)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -98,13 +96,8 @@ gimp_patterns_get_list (const gchar *filter,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_patterns = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ pattern_list = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_patterns = GIMP_VALUES_GET_INT (return_vals, 1);
pattern_list = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -33,8 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_patterns_refresh (void); gboolean gimp_patterns_refresh (void);
gchar** gimp_patterns_get_list (const gchar *filter, gchar** gimp_patterns_get_list (const gchar *filter);
gint *num_patterns);
G_END_DECLS G_END_DECLS

View file

@ -103,8 +103,7 @@ _gimp_pdb_dump (GFile *file)
* @copyright: The regex for procedure copyright. * @copyright: The regex for procedure copyright.
* @date: The regex for procedure date. * @date: The regex for procedure date.
* @proc_type: The regex for procedure type: { 'Internal GIMP procedure', 'GIMP Plug-in', 'GIMP Extension', 'Temporary Procedure' }. * @proc_type: The regex for procedure type: { 'Internal GIMP procedure', 'GIMP Plug-in', 'GIMP Extension', 'Temporary Procedure' }.
* @num_matches: (out): The number of matching procedures. * @procedure_names: (out) (array zero-terminated=1) (transfer full): The list of procedure names.
* @procedure_names: (out) (array length=num_matches) (element-type gchar*) (transfer full): The list of procedure names.
* *
* Queries the procedural database for its contents using regular * Queries the procedural database for its contents using regular
* expression matching. * expression matching.
@ -132,7 +131,6 @@ _gimp_pdb_query (const gchar *name,
const gchar *copyright, const gchar *copyright,
const gchar *date, const gchar *date,
const gchar *proc_type, const gchar *proc_type,
gint *num_matches,
gchar ***procedure_names) gchar ***procedure_names)
{ {
GimpValueArray *args; GimpValueArray *args;
@ -154,16 +152,12 @@ _gimp_pdb_query (const gchar *name,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_matches = 0;
*procedure_names = NULL; *procedure_names = NULL;
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS; success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success) if (success)
{ *procedure_names = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_matches = GIMP_VALUES_GET_INT (return_vals, 1);
*procedure_names = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
@ -578,21 +572,19 @@ _gimp_pdb_add_proc_menu_path (const gchar *procedure_name,
/** /**
* _gimp_pdb_get_proc_menu_paths: * _gimp_pdb_get_proc_menu_paths:
* @procedure_name: The procedure name. * @procedure_name: The procedure name.
* @num_menu_paths: (out): The number of menu paths.
* *
* Queries the procedural database for the procedure's menu paths. * Queries the procedural database for the procedure's menu paths.
* *
* This procedure returns the menu paths of the specified procedure. * This procedure returns the menu paths of the specified procedure.
* *
* Returns: (array length=num_menu_paths) (element-type gchar*) (transfer full): * Returns: (array zero-terminated=1) (transfer full):
* The menu paths of the plug-in. * The menu paths of the plug-in.
* The returned value must be freed with g_strfreev(). * The returned value must be freed with g_strfreev().
* *
* Since: 3.0 * Since: 3.0
**/ **/
gchar ** gchar **
_gimp_pdb_get_proc_menu_paths (const gchar *procedure_name, _gimp_pdb_get_proc_menu_paths (const gchar *procedure_name)
gint *num_menu_paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -607,13 +599,8 @@ _gimp_pdb_get_proc_menu_paths (const gchar *procedure_name,
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_menu_paths = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ menu_paths = GIMP_VALUES_DUP_STRV (return_vals, 1);
*num_menu_paths = GIMP_VALUES_GET_INT (return_vals, 1);
menu_paths = GIMP_VALUES_DUP_STRING_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);

View file

@ -41,7 +41,6 @@ G_GNUC_INTERNAL gboolean _gimp_pdb_query (const gcha
const gchar *copyright, const gchar *copyright,
const gchar *date, const gchar *date,
const gchar *proc_type, const gchar *proc_type,
gint *num_matches,
gchar ***procedure_names); gchar ***procedure_names);
G_GNUC_INTERNAL gboolean _gimp_pdb_proc_exists (const gchar *procedure_name); G_GNUC_INTERNAL gboolean _gimp_pdb_proc_exists (const gchar *procedure_name);
G_GNUC_INTERNAL gboolean _gimp_pdb_get_proc_info (const gchar *procedure_name, G_GNUC_INTERNAL gboolean _gimp_pdb_get_proc_info (const gchar *procedure_name,
@ -62,8 +61,7 @@ G_GNUC_INTERNAL gboolean _gimp_pdb_set_proc_menu_label (const gcha
G_GNUC_INTERNAL gchar* _gimp_pdb_get_proc_menu_label (const gchar *procedure_name); G_GNUC_INTERNAL gchar* _gimp_pdb_get_proc_menu_label (const gchar *procedure_name);
G_GNUC_INTERNAL gboolean _gimp_pdb_add_proc_menu_path (const gchar *procedure_name, G_GNUC_INTERNAL gboolean _gimp_pdb_add_proc_menu_path (const gchar *procedure_name,
const gchar *menu_path); const gchar *menu_path);
G_GNUC_INTERNAL gchar** _gimp_pdb_get_proc_menu_paths (const gchar *procedure_name, G_GNUC_INTERNAL gchar** _gimp_pdb_get_proc_menu_paths (const gchar *procedure_name);
gint *num_menu_paths);
G_GNUC_INTERNAL gboolean _gimp_pdb_set_proc_icon (const gchar *procedure_name, G_GNUC_INTERNAL gboolean _gimp_pdb_set_proc_icon (const gchar *procedure_name,
GimpIconType icon_type, GimpIconType icon_type,
gint icon_data_length, gint icon_data_length,