[gimp] pdb, libgimp: change all generated ID array return values to object arrays
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb, libgimp: change all generated ID array return values to object arrays
- Date: Thu, 5 Sep 2019 11:02:13 +0000 (UTC)
commit f764fd0f82a6eab248c72a3f57639281456588b1
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 5 12:57:43 2019 +0200
pdb, libgimp: change all generated ID array return values to object arrays
and remove the manual libgimp wrappers which now have the same
signature as the generated functions.
app/pdb/fileops-cmds.c | 33 ++++----
app/pdb/image-cmds.c | 76 +++++++++--------
app/pdb/item-cmds.c | 25 +++---
app/pdb/vectors-cmds.c | 53 +++++++-----
libgimp/gimpfileops_pdb.c | 10 +--
libgimp/gimpfileops_pdb.h | 2 +-
libgimp/gimpimage.c | 206 +++++++--------------------------------------
libgimp/gimpimage.h | 8 --
libgimp/gimpimage_pdb.c | 64 +++++++-------
libgimp/gimpimage_pdb.h | 8 +-
libgimp/gimpitem.c | 53 ++----------
libgimp/gimpitem.h | 2 -
libgimp/gimpitem_pdb.c | 16 ++--
libgimp/gimpitem_pdb.h | 92 ++++++++++----------
libgimp/gimpvectors_pdb.c | 38 ++++-----
libgimp/gimpvectors_pdb.h | 210 +++++++++++++++++++++++-----------------------
pdb/app.pl | 45 ++++++++++
pdb/groups/fileops.pdb | 22 ++---
pdb/groups/image.pdb | 32 ++++---
pdb/groups/item.pdb | 15 ++--
pdb/groups/vectors.pdb | 33 +++++---
pdb/pdb.pl | 65 ++++++++++++++
22 files changed, 526 insertions(+), 582 deletions(-)
---
diff --git a/app/pdb/fileops-cmds.c b/app/pdb/fileops-cmds.c
index 10f3775562..a9cb1757bd 100644
--- a/app/pdb/fileops-cmds.c
+++ b/app/pdb/fileops-cmds.c
@@ -195,7 +195,7 @@ file_load_layers_invoker (GimpProcedure *procedure,
GimpImage *image;
const gchar *filename;
gint num_layers = 0;
- gint32 *layer_ids = NULL;
+ GimpLayer **layers = NULL;
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
image = g_value_get_object (gimp_value_array_index (args, 1));
@@ -207,12 +207,12 @@ file_load_layers_invoker (GimpProcedure *procedure,
if (file)
{
- GList *layers;
+ GList *layer_list;
GimpPDBStatusType status;
- layers = file_open_layers (gimp, context, progress,
- image, FALSE,
- file, run_mode, NULL, &status, error);
+ layer_list = file_open_layers (gimp, context, progress,
+ image, FALSE,
+ file, run_mode, NULL, &status, error);
g_object_unref (file);
@@ -221,16 +221,18 @@ file_load_layers_invoker (GimpProcedure *procedure,
GList *list;
gint i;
- num_layers = g_list_length (layers);
+ num_layers = g_list_length (layer_list);
- layer_ids = g_new (gint32, num_layers);
+ layers = g_new (GimpLayer *, num_layers);
- for (i = 0, list = layers;
+ for (i = 0, list = layer_list;
i < num_layers;
i++, list = g_list_next (list))
- layer_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ {
+ layers[i] = g_object_ref (list->data);
+ }
- g_list_free (layers);
+ g_list_free (layer_list);
}
else
success = FALSE;
@@ -245,7 +247,7 @@ file_load_layers_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_layers);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), layer_ids, num_layers);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_LAYER, (GObject **)
layers, num_layers);
}
return return_vals;
@@ -754,10 +756,11 @@ register_fileops_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("layer-ids",
- "layer ids",
- "The list of loaded layers",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("layers",
+ "layers",
+ "The list of loaded layers",
+ GIMP_TYPE_LAYER,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index 838cf26e99..c7ed26fda6 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -108,7 +108,7 @@ image_id_is_valid_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
-image_list_invoker (GimpProcedure *procedure,
+get_images_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
@@ -117,7 +117,7 @@ image_list_invoker (GimpProcedure *procedure,
{
GimpValueArray *return_vals;
gint num_images = 0;
- gint32 *image_ids = NULL;
+ GimpImage **images = NULL;
GList *list = gimp_get_image_iter (gimp);
@@ -127,16 +127,16 @@ image_list_invoker (GimpProcedure *procedure,
{
gint i;
- image_ids = g_new (gint32, num_images);
+ images = g_new (GimpImage *, num_images);
for (i = 0; i < num_images; i++, list = g_list_next (list))
- image_ids[i] = gimp_image_get_id (GIMP_IMAGE (list->data));
+ images[i] = g_object_ref (list->data);
}
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_images);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), image_ids, num_images);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_IMAGE, (GObject **)
images, num_images);
return return_vals;
}
@@ -435,7 +435,7 @@ image_get_layers_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals;
GimpImage *image;
gint num_layers = 0;
- gint32 *layer_ids = NULL;
+ GimpLayer **layers = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0));
@@ -449,10 +449,10 @@ image_get_layers_invoker (GimpProcedure *procedure,
{
gint i;
- layer_ids = g_new (gint32, num_layers);
+ layers = g_new (GimpLayer *, num_layers);
for (i = 0; i < num_layers; i++, list = g_list_next (list))
- layer_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ layers[i] = g_object_ref (list->data);
}
}
@@ -462,7 +462,7 @@ image_get_layers_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_layers);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), layer_ids, num_layers);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_LAYER, (GObject **)
layers, num_layers);
}
return return_vals;
@@ -480,7 +480,7 @@ image_get_channels_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals;
GimpImage *image;
gint num_channels = 0;
- gint32 *channel_ids = NULL;
+ GimpChannel **channels = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0));
@@ -494,10 +494,10 @@ image_get_channels_invoker (GimpProcedure *procedure,
{
gint i;
- channel_ids = g_new (gint32, num_channels);
+ channels = g_new (GimpChannel *, num_channels);
for (i = 0; i < num_channels; i++, list = g_list_next (list))
- channel_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ channels[i] = g_object_ref (list->data);
}
}
@@ -507,7 +507,7 @@ image_get_channels_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_channels);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), channel_ids, num_channels);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_CHANNEL, (GObject **)
channels, num_channels);
}
return return_vals;
@@ -525,7 +525,7 @@ image_get_vectors_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals;
GimpImage *image;
gint num_vectors = 0;
- gint32 *vector_ids = NULL;
+ GimpVectors **vectors = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0));
@@ -539,10 +539,10 @@ image_get_vectors_invoker (GimpProcedure *procedure,
{
gint i;
- vector_ids = g_new (gint32, num_vectors);
+ vectors = g_new (GimpVectors *, num_vectors);
for (i = 0; i < num_vectors; i++, list = g_list_next (list))
- vector_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ vectors[i] = g_object_ref (list->data);
}
}
@@ -552,7 +552,7 @@ image_get_vectors_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), vector_ids, num_vectors);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **)
vectors, num_vectors);
}
return return_vals;
@@ -2800,11 +2800,11 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-image-list
+ * gimp-get-images
*/
- procedure = gimp_procedure_new (image_list_invoker);
+ procedure = gimp_procedure_new (get_images_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "gimp-image-list");
+ "gimp-get-images");
gimp_procedure_set_static_strings (procedure,
"Returns the list of images currently open.",
"This procedure returns the list of images currently open in GIMP.",
@@ -2819,10 +2819,11 @@ register_image_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("image-ids",
- "image ids",
- "The list of images currently open.",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("images",
+ "images",
+ "The list of images currently open.",
+ GIMP_TYPE_IMAGE,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3136,10 +3137,11 @@ register_image_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("layer-ids",
- "layer ids",
- "The list of layers contained in the image.",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("layers",
+ "layers",
+ "The list of layers contained in the
image.",
+ GIMP_TYPE_LAYER,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3169,10 +3171,11 @@ register_image_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("channel-ids",
- "channel ids",
- "The list of channels contained in the
image.",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("channels",
+ "channels",
+ "The list of channels contained in the
image.",
+ GIMP_TYPE_CHANNEL,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -3202,10 +3205,11 @@ register_image_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("vector-ids",
- "vector ids",
- "The list of vectors contained in the
image.",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("vectors",
+ "vectors",
+ "The list of vectors contained in the
image.",
+ GIMP_TYPE_VECTORS,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/item-cmds.c b/app/pdb/item-cmds.c
index 1557c53e3b..dbf557a9a7 100644
--- a/app/pdb/item-cmds.c
+++ b/app/pdb/item-cmds.c
@@ -431,30 +431,30 @@ item_get_children_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals;
GimpItem *item;
gint num_children = 0;
- gint32 *child_ids = NULL;
+ GimpItem **children = NULL;
item = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
- GimpContainer *children = gimp_viewable_get_children (GIMP_VIEWABLE (item));
+ GimpContainer *container = gimp_viewable_get_children (GIMP_VIEWABLE (item));
- if (children)
+ if (container)
{
- num_children = gimp_container_get_n_children (children);
+ num_children = gimp_container_get_n_children (container);
if (num_children)
{
GList *list;
gint i;
- child_ids = g_new (gint32, num_children);
+ children = g_new (GimpItem *, num_children);
- for (list = GIMP_LIST (children)->queue->head, i = 0;
+ for (list = GIMP_LIST (container)->queue->head, i = 0;
list;
list = g_list_next (list), i++)
{
- child_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ children[i] = g_object_ref (list->data);
}
}
}
@@ -469,7 +469,7 @@ item_get_children_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_children);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), child_ids, num_children);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_ITEM, (GObject **)
children, num_children);
}
return return_vals;
@@ -1384,10 +1384,11 @@ register_item_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("child-ids",
- "child ids",
- "The item's list of children",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("children",
+ "children",
+ "The item's list of children",
+ GIMP_TYPE_ITEM,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index ad6c6de774..6f92841849 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -1114,7 +1114,7 @@ vectors_import_from_file_invoker (GimpProcedure *procedure,
gboolean merge;
gboolean scale;
gint num_vectors = 0;
- gint32 *vectors_ids = NULL;
+ GimpVectors **vectors = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0));
filename = g_value_get_string (gimp_value_array_index (args, 1));
@@ -1142,11 +1142,14 @@ vectors_import_from_file_invoker (GimpProcedure *procedure,
GList *list;
gint i;
- vectors_ids = g_new (gint32, num_vectors);
+ vectors = g_new (GimpVectors *, num_vectors);
- list = vectors_list;
- for (i = 0; i < num_vectors; i++, list = g_list_next (list))
- vectors_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ for (i = 0, list = vectors_list;
+ i < num_vectors;
+ i++, list = g_list_next (list))
+ {
+ vectors[i] = g_object_ref (list->data);
+ }
g_list_free (vectors_list);
}
@@ -1159,7 +1162,7 @@ vectors_import_from_file_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), vectors_ids, num_vectors);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **)
vectors, num_vectors);
}
return return_vals;
@@ -1181,7 +1184,7 @@ vectors_import_from_string_invoker (GimpProcedure *procedure,
gboolean merge;
gboolean scale;
gint num_vectors = 0;
- gint32 *vectors_ids = NULL;
+ GimpVectors **vectors = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0));
string = g_value_get_string (gimp_value_array_index (args, 1));
@@ -1191,7 +1194,7 @@ vectors_import_from_string_invoker (GimpProcedure *procedure,
if (success)
{
- GList *list, *vectors_list = NULL;
+ GList *vectors_list = NULL;
/* FIXME tree */
success = gimp_vectors_import_buffer (image, string, length,
@@ -1204,13 +1207,17 @@ vectors_import_from_string_invoker (GimpProcedure *procedure,
if (num_vectors)
{
- gint i;
+ GList *list;
+ gint i;
- vectors_ids = g_new (gint32, num_vectors);
+ vectors = g_new (GimpVectors *, num_vectors);
- list = vectors_list;
- for (i = 0; i < num_vectors; i++, list = g_list_next (list))
- vectors_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ for (i = 0, list = vectors_list;
+ i < num_vectors;
+ i++, list = g_list_next (list))
+ {
+ vectors[i] = g_object_ref (list->data);
+ }
g_list_free (vectors_list);
}
@@ -1223,7 +1230,7 @@ vectors_import_from_string_invoker (GimpProcedure *procedure,
if (success)
{
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
- gimp_value_take_int32_array (gimp_value_array_index (return_vals, 2), vectors_ids, num_vectors);
+ gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **)
vectors, num_vectors);
}
return return_vals;
@@ -2262,10 +2269,11 @@ register_vectors_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("vectors-ids",
- "vectors ids",
- "The list of newly created vectors",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("vectors",
+ "vectors",
+ "The list of newly created vectors",
+ GIMP_TYPE_VECTORS,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2320,10 +2328,11 @@ register_vectors_procs (GimpPDB *pdb)
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
- gimp_param_spec_int32_array ("vectors-ids",
- "vectors ids",
- "The list of newly created vectors",
- GIMP_PARAM_READWRITE));
+ gimp_param_spec_object_array ("vectors",
+ "vectors",
+ "The list of newly created vectors",
+ GIMP_TYPE_VECTORS,
+ GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
diff --git a/libgimp/gimpfileops_pdb.c b/libgimp/gimpfileops_pdb.c
index fe5501a748..aed8abf9c1 100644
--- a/libgimp/gimpfileops_pdb.c
+++ b/libgimp/gimpfileops_pdb.c
@@ -139,13 +139,13 @@ gimp_file_load_layer (GimpRunMode run_mode,
* needs to be added to the existing image with
* gimp_image_insert_layer().
*
- * Returns: (array length=num_layers) (element-type gint32) (transfer full):
+ * Returns: (array length=num_layers) (element-type GimpLayer) (transfer container):
* The list of loaded layers.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
-gint *
+GimpLayer **
gimp_file_load_layers (GimpRunMode run_mode,
GimpImage *image,
const gchar *filename,
@@ -153,7 +153,7 @@ gimp_file_load_layers (GimpRunMode run_mode,
{
GimpValueArray *args;
GimpValueArray *return_vals;
- gint *layer_ids = NULL;
+ GimpLayer **layers = NULL;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_RUN_MODE, run_mode,
@@ -171,12 +171,12 @@ gimp_file_load_layers (GimpRunMode run_mode,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_layers = GIMP_VALUES_GET_INT (return_vals, 1);
- layer_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ layers = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
- return layer_ids;
+ return layers;
}
/**
diff --git a/libgimp/gimpfileops_pdb.h b/libgimp/gimpfileops_pdb.h
index b5d32531ce..d9d180f719 100644
--- a/libgimp/gimpfileops_pdb.h
+++ b/libgimp/gimpfileops_pdb.h
@@ -38,7 +38,7 @@ GimpImage* gimp_file_load (GimpRunMode run
GimpLayer* gimp_file_load_layer (GimpRunMode run_mode,
GimpImage *image,
const gchar *filename);
-gint* gimp_file_load_layers (GimpRunMode run_mode,
+GimpLayer** gimp_file_load_layers (GimpRunMode run_mode,
GimpImage *image,
const gchar *filename,
gint *num_layers);
diff --git a/libgimp/gimpimage.c b/libgimp/gimpimage.c
index afe67ee1d2..0152f10783 100644
--- a/libgimp/gimpimage.c
+++ b/libgimp/gimpimage.c
@@ -186,40 +186,6 @@ gimp_image_is_valid (GimpImage *image)
return gimp_image_id_is_valid (gimp_image_get_id (image));
}
-/**
- * gimp_get_images:
- * @num_images: (out): The number of images in the returned array.
- *
- * Returns the list of images currently open.
- *
- * This procedure returns the list of images currently open in GIMP.
- *
- * Returns: (array length=num_images) (transfer container):
- * The list of images currently open.
- * The returned array must be freed with g_free(). Image
- * elements belong to libgimp and must not be freed.
- *
- * Since: 3.0
- **/
-GimpImage **
-gimp_get_images (gint *num_images)
-{
- GimpImage **images;
- gint *ids;
- gint i;
-
- ids = _gimp_image_list (num_images);
-
- images = g_new (GimpImage *, *num_images);
-
- for (i = 0; i < *num_images; i++)
- images[i] = gimp_image_get_by_id (ids[i]);
-
- g_free (ids);
-
- return images;
-}
-
/**
* gimp_list_images:
*
@@ -237,127 +203,19 @@ gimp_get_images (gint *num_images)
GList *
gimp_list_images (void)
{
- GList *images = NULL;
- gint *ids;
- gint num_images;
- gint i;
-
- ids = _gimp_image_list (&num_images);
-
- for (i = 0; i < num_images; i++)
- images = g_list_prepend (images, gimp_image_get_by_id (ids[i]));
-
- g_free (ids);
-
- return g_list_reverse (images);
-}
-
-/**
- * gimp_image_get_layers:
- * @image: The image.
- * @num_layers: (out): The number of layers in the returned array.
- *
- * Returns the list of layers contained in the specified image.
- *
- * This procedure returns the list of layers contained in the specified
- * image. The order of layers is from topmost to bottommost.
- *
- * Returns: (array length=num_layers) (transfer container):
- * The list of layers contained in the image.
- * The returned array must be freed with g_free(). Layer
- * elements belong to libgimp and must not be freed.
- **/
-GimpLayer **
-gimp_image_get_layers (GimpImage *image,
- gint *num_layers)
-{
- GimpLayer **layers;
- gint *ids;
+ GimpImage **images;
+ gint num_images;
+ GList *list = NULL;
gint i;
- ids = _gimp_image_get_layers (image, num_layers);
-
- layers = g_new (GimpLayer *, *num_layers);
-
- for (i = 0; i < *num_layers; i++)
- layers[i] = gimp_layer_get_by_id (ids[i]);
+ images = gimp_get_images (&num_images);
- g_free (ids);
-
- return layers;
-}
-
-/**
- * gimp_image_get_channels:
- * @image: The image.
- * @num_channels: (out): The number of channels in the returned array.
- *
- * Returns the list of channels contained in the specified image.
- *
- * This procedure returns the list of channels contained in the
- * specified image. This does not include the selection mask, or layer
- * masks. The order is from topmost to bottommost. Note that
- * "channels" are custom channels and do not include the image's color
- * components.
- *
- * Returns: (array length=num_channels) (transfer container):
- * The list of channels contained in the image.
- * The returned array must be freed with g_free(). Channel
- * elements belong to libgimp and must not be freed.
- **/
-GimpChannel **
-gimp_image_get_channels (GimpImage *image,
- gint *num_channels)
-{
- GimpChannel **channels;
- gint *ids;
- gint i;
-
- ids = _gimp_image_get_channels (image, num_channels);
-
- channels = g_new (GimpChannel *, *num_channels);
-
- for (i = 0; i < *num_channels; i++)
- channels[i] = gimp_channel_get_by_id (ids[i]);
-
- g_free (ids);
-
- return channels;
-}
-
-/**
- * gimp_image_get_vectors:
- * @image: The image.
- * @num_vectors: (out): The number of vectors in the returned array.
- *
- * Returns the list of vectors contained in the specified image.
- *
- * This procedure returns the list of vectors contained in the
- * specified image.
- *
- * Returns: (array length=num_vectors) (transfer container):
- * The list of vectors contained in the image.
- * The returned array must be freed with g_free(). Vectors
- * elements belong to libgimp and must not be freed.
- **/
-GimpVectors **
-gimp_image_get_vectors (GimpImage *image,
- gint *num_vectors)
-{
- GimpVectors **vectors;
- gint *ids;
- gint i;
-
- ids = _gimp_image_get_vectors (image, num_vectors);
-
- vectors = g_new (GimpVectors *, *num_vectors);
-
- for (i = 0; i < *num_vectors; i++)
- vectors[i] = gimp_vectors_get_by_id (ids[i]);
+ for (i = 0; i < num_images; i++)
+ list = g_list_prepend (list, images[i]);
- g_free (ids);
+ g_free (images);
- return vectors;
+ return g_list_reverse (list);
}
/**
@@ -379,19 +237,19 @@ gimp_image_get_vectors (GimpImage *image,
GList *
gimp_image_list_layers (GimpImage *image)
{
- GList *layers = NULL;
- gint *ids;
- gint num_layers;
- gint i;
+ GimpLayer **layers;
+ gint num_layers;
+ GList *list = NULL;
+ gint i;
- ids = _gimp_image_get_layers (image, &num_layers);
+ layers = gimp_image_get_layers (image, &num_layers);
for (i = 0; i < num_layers; i++)
- layers = g_list_prepend (layers, gimp_layer_get_by_id (ids[i]));
+ list = g_list_prepend (list, layers[i]);
- g_free (ids);
+ g_free (layers);
- return g_list_reverse (layers);
+ return g_list_reverse (list);
}
/**
@@ -416,19 +274,19 @@ gimp_image_list_layers (GimpImage *image)
GList *
gimp_image_list_channels (GimpImage *image)
{
- GList *channels = NULL;
- gint *ids;
- gint num_channels;
- gint i;
+ GimpChannel **channels;
+ gint num_channels;
+ GList *list = NULL;
+ gint i;
- ids = _gimp_image_get_channels (image, &num_channels);
+ channels = gimp_image_get_channels (image, &num_channels);
for (i = 0; i < num_channels; i++)
- channels = g_list_prepend (channels, gimp_channel_get_by_id (ids[i]));
+ list = g_list_prepend (list, channels[i]);
- g_free (ids);
+ g_free (channels);
- return g_list_reverse (channels);
+ return g_list_reverse (list);
}
/**
@@ -450,19 +308,19 @@ gimp_image_list_channels (GimpImage *image)
GList *
gimp_image_list_vectors (GimpImage *image)
{
- GList *vectors = NULL;
- gint *ids;
- gint num_vectors;
- gint i;
+ GimpVectors **vectors;
+ gint num_vectors;
+ GList *list = NULL;
+ gint i;
- ids = _gimp_image_get_vectors (image, &num_vectors);
+ vectors = gimp_image_get_vectors (image, &num_vectors);
for (i = 0; i < num_vectors; i++)
- vectors = g_list_prepend (vectors, gimp_vectors_get_by_id (ids[i]));
+ list = g_list_prepend (list, vectors[i]);
- g_free (ids);
+ g_free (vectors);
- return g_list_reverse (vectors);
+ return g_list_reverse (list);
}
/**
diff --git a/libgimp/gimpimage.h b/libgimp/gimpimage.h
index 91167e6d63..e2ece45a80 100644
--- a/libgimp/gimpimage.h
+++ b/libgimp/gimpimage.h
@@ -71,16 +71,8 @@ GimpImage * gimp_image_get_by_id (gint32 image_id);
gboolean gimp_image_is_valid (GimpImage *image);
-GimpImage ** gimp_get_images (gint *num_images);
GList * gimp_list_images (void);
-GimpLayer ** gimp_image_get_layers (GimpImage *image,
- gint *num_layers);
-GimpChannel ** gimp_image_get_channels (GimpImage *image,
- gint *num_channels);
-GimpVectors ** gimp_image_get_vectors (GimpImage *image,
- gint *num_vectors);
-
GList * gimp_image_list_layers (GimpImage *image);
GList * gimp_image_list_channels (GimpImage *image);
GList * gimp_image_list_vectors (GimpImage *image);
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index 478d723dc3..8eea9989fb 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -73,29 +73,29 @@ gimp_image_id_is_valid (gint image_id)
}
/**
- * _gimp_image_list:
+ * gimp_get_images:
* @num_images: (out): The number of images currently open.
*
* Returns the list of images currently open.
*
* This procedure returns the list of images currently open in GIMP.
*
- * Returns: (array length=num_images) (element-type gint32) (transfer full):
+ * Returns: (array length=num_images) (element-type GimpImage) (transfer container):
* The list of images currently open.
* The returned value must be freed with g_free().
**/
-gint *
-_gimp_image_list (gint *num_images)
+GimpImage **
+gimp_get_images (gint *num_images)
{
GimpValueArray *args;
GimpValueArray *return_vals;
- gint *image_ids = NULL;
+ GimpImage **images = NULL;
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
- "gimp-image-list",
+ "gimp-get-images",
args);
gimp_value_array_unref (args);
@@ -104,12 +104,12 @@ _gimp_image_list (gint *num_images)
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_images = GIMP_VALUES_GET_INT (return_vals, 1);
- image_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ images = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
- return image_ids;
+ return images;
}
/**
@@ -461,7 +461,7 @@ gimp_image_height (GimpImage *image)
}
/**
- * _gimp_image_get_layers:
+ * gimp_image_get_layers:
* @image: The image.
* @num_layers: (out): The number of layers contained in the image.
*
@@ -470,17 +470,17 @@ gimp_image_height (GimpImage *image)
* This procedure returns the list of layers contained in the specified
* image. The order of layers is from topmost to bottommost.
*
- * Returns: (array length=num_layers) (element-type gint32) (transfer full):
+ * Returns: (array length=num_layers) (element-type GimpLayer) (transfer container):
* The list of layers contained in the image.
* The returned value must be freed with g_free().
**/
-gint *
-_gimp_image_get_layers (GimpImage *image,
- gint *num_layers)
+GimpLayer **
+gimp_image_get_layers (GimpImage *image,
+ gint *num_layers)
{
GimpValueArray *args;
GimpValueArray *return_vals;
- gint *layer_ids = NULL;
+ GimpLayer **layers = NULL;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image,
@@ -496,16 +496,16 @@ _gimp_image_get_layers (GimpImage *image,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_layers = GIMP_VALUES_GET_INT (return_vals, 1);
- layer_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ layers = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
- return layer_ids;
+ return layers;
}
/**
- * _gimp_image_get_channels:
+ * gimp_image_get_channels:
* @image: The image.
* @num_channels: (out): The number of channels contained in the image.
*
@@ -517,17 +517,17 @@ _gimp_image_get_layers (GimpImage *image,
* \"channels\" are custom channels and do not include the image's
* color components.
*
- * Returns: (array length=num_channels) (element-type gint32) (transfer full):
+ * Returns: (array length=num_channels) (element-type GimpChannel) (transfer container):
* The list of channels contained in the image.
* The returned value must be freed with g_free().
**/
-gint *
-_gimp_image_get_channels (GimpImage *image,
- gint *num_channels)
+GimpChannel **
+gimp_image_get_channels (GimpImage *image,
+ gint *num_channels)
{
GimpValueArray *args;
GimpValueArray *return_vals;
- gint *channel_ids = NULL;
+ GimpChannel **channels = NULL;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image,
@@ -543,16 +543,16 @@ _gimp_image_get_channels (GimpImage *image,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_channels = GIMP_VALUES_GET_INT (return_vals, 1);
- channel_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ channels = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
- return channel_ids;
+ return channels;
}
/**
- * _gimp_image_get_vectors:
+ * gimp_image_get_vectors:
* @image: The image.
* @num_vectors: (out): The number of vectors contained in the image.
*
@@ -561,19 +561,19 @@ _gimp_image_get_channels (GimpImage *image,
* This procedure returns the list of vectors contained in the
* specified image.
*
- * Returns: (array length=num_vectors) (element-type gint32) (transfer full):
+ * Returns: (array length=num_vectors) (element-type GimpVectors) (transfer container):
* The list of vectors contained in the image.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
-gint *
-_gimp_image_get_vectors (GimpImage *image,
- gint *num_vectors)
+GimpVectors **
+gimp_image_get_vectors (GimpImage *image,
+ gint *num_vectors)
{
GimpValueArray *args;
GimpValueArray *return_vals;
- gint *vector_ids = NULL;
+ GimpVectors **vectors = NULL;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image,
@@ -589,12 +589,12 @@ _gimp_image_get_vectors (GimpImage *image,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_vectors = GIMP_VALUES_GET_INT (return_vals, 1);
- vector_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ vectors = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
- return vector_ids;
+ return vectors;
}
/**
diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h
index 13c09d0fc6..4f3a128ff2 100644
--- a/libgimp/gimpimage_pdb.h
+++ b/libgimp/gimpimage_pdb.h
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
gboolean gimp_image_id_is_valid (gint image_id);
-G_GNUC_INTERNAL gint* _gimp_image_list (gint *num_images);
+GimpImage** gimp_get_images (gint *num_images);
GimpImage* gimp_image_new (gint width,
gint height,
GimpImageBaseType type);
@@ -48,11 +48,11 @@ GimpPrecision gimp_image_get_precision (GimpImage
GimpLayerMode gimp_image_get_default_new_layer_mode (GimpImage *image);
gint gimp_image_width (GimpImage *image);
gint gimp_image_height (GimpImage *image);
-G_GNUC_INTERNAL gint* _gimp_image_get_layers (GimpImage *image,
+GimpLayer** gimp_image_get_layers (GimpImage *image,
gint *num_layers);
-G_GNUC_INTERNAL gint* _gimp_image_get_channels (GimpImage *image,
+GimpChannel** gimp_image_get_channels (GimpImage *image,
gint *num_channels);
-G_GNUC_INTERNAL gint* _gimp_image_get_vectors (GimpImage *image,
+GimpVectors** gimp_image_get_vectors (GimpImage *image,
gint *num_vectors);
GimpDrawable* gimp_image_get_active_drawable (GimpImage *image);
gboolean gimp_image_unset_active_channel (GimpImage *image);
diff --git a/libgimp/gimpitem.c b/libgimp/gimpitem.c
index 8224a707dd..45b89adcc4 100644
--- a/libgimp/gimpitem.c
+++ b/libgimp/gimpitem.c
@@ -319,41 +319,6 @@ gimp_item_is_vectors (GimpItem *item)
return gimp_item_id_is_vectors (gimp_item_get_id (item));
}
-/**
- * gimp_item_get_children:
- * @item: The item.
- * @num_children: (out): The number of items in the returned array.
- *
- * Returns the item's list of children.
- *
- * This procedure returns the list of items which are children of the
- * specified item. The order is topmost to bottommost.
- *
- * Returns: (array length=num_children) (transfer container):
- * The item's list of children.
- * The returned array must be freed with g_free(). Item
- * elements belong to libgimp and must not be unrefed.
- **/
-GimpItem **
-gimp_item_get_children (GimpItem *item,
- gint *num_children)
-{
- GimpItem **children;
- gint *ids;
- gint i;
-
- ids = _gimp_item_get_children (item, num_children);
-
- children = g_new (GimpItem *, *num_children);
-
- for (i = 0; i < *num_children; i++)
- children[i] = gimp_item_get_by_id (ids[i]);
-
- g_free (ids);
-
- return children;
-}
-
/**
* gimp_item_list_children:
* @item: The item.
@@ -373,17 +338,17 @@ gimp_item_get_children (GimpItem *item,
GList *
gimp_item_list_children (GimpItem *item)
{
- GList *children = NULL;
- gint *ids;
- gint num_items;
- gint i;
+ GimpItem **children;
+ gint num_children;
+ GList *list = NULL;
+ gint i;
- ids = _gimp_item_get_children (item, &num_items);
+ children = gimp_item_get_children (item, &num_children);
- for (i = 0; i < num_items; i++)
- children = g_list_prepend (children, gimp_item_get_by_id (ids[i]));
+ for (i = 0; i < num_children; i++)
+ list = g_list_prepend (list, children[i]);
- g_free (ids);
+ g_free (children);
- return g_list_reverse (children);
+ return g_list_reverse (list);
}
diff --git a/libgimp/gimpitem.h b/libgimp/gimpitem.h
index 8aa76586ba..ae484ed491 100644
--- a/libgimp/gimpitem.h
+++ b/libgimp/gimpitem.h
@@ -79,8 +79,6 @@ gboolean gimp_item_is_layer_mask (GimpItem *item);
gboolean gimp_item_is_selection (GimpItem *item);
gboolean gimp_item_is_vectors (GimpItem *item);
-GimpItem ** gimp_item_get_children (GimpItem *item,
- gint *num_children);
GList * gimp_item_list_children (GimpItem *item);
diff --git a/libgimp/gimpitem_pdb.c b/libgimp/gimpitem_pdb.c
index 6ed12d6ed1..7d74e274e0 100644
--- a/libgimp/gimpitem_pdb.c
+++ b/libgimp/gimpitem_pdb.c
@@ -474,7 +474,7 @@ gimp_item_get_parent (GimpItem *item)
}
/**
- * _gimp_item_get_children:
+ * gimp_item_get_children:
* @item: The item.
* @num_children: (out): The item's number of children.
*
@@ -483,19 +483,19 @@ gimp_item_get_parent (GimpItem *item)
* This procedure returns the list of items which are children of the
* specified item. The order is topmost to bottommost.
*
- * Returns: (array length=num_children) (element-type gint32) (transfer full):
+ * Returns: (array length=num_children) (element-type GimpItem) (transfer container):
* The item's list of children.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
-gint *
-_gimp_item_get_children (GimpItem *item,
- gint *num_children)
+GimpItem **
+gimp_item_get_children (GimpItem *item,
+ gint *num_children)
{
GimpValueArray *args;
GimpValueArray *return_vals;
- gint *child_ids = NULL;
+ GimpItem **children = NULL;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_ITEM, item,
@@ -511,12 +511,12 @@ _gimp_item_get_children (GimpItem *item,
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{
*num_children = GIMP_VALUES_GET_INT (return_vals, 1);
- child_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ children = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
- return child_ids;
+ return children;
}
/**
diff --git a/libgimp/gimpitem_pdb.h b/libgimp/gimpitem_pdb.h
index 9d24bb36bb..9bce970d62 100644
--- a/libgimp/gimpitem_pdb.h
+++ b/libgimp/gimpitem_pdb.h
@@ -32,52 +32,52 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-gboolean gimp_item_id_is_valid (gint item_id);
-gboolean gimp_item_id_is_drawable (gint item_id);
-gboolean gimp_item_id_is_layer (gint item_id);
-gboolean gimp_item_id_is_text_layer (gint item_id);
-gboolean gimp_item_id_is_channel (gint item_id);
-gboolean gimp_item_id_is_layer_mask (gint item_id);
-gboolean gimp_item_id_is_selection (gint item_id);
-gboolean gimp_item_id_is_vectors (gint item_id);
-GimpImage* gimp_item_get_image (GimpItem *item);
-gboolean gimp_item_delete (GimpItem *item);
-gboolean gimp_item_is_group (GimpItem *item);
-GimpItem* gimp_item_get_parent (GimpItem *item);
-G_GNUC_INTERNAL gint* _gimp_item_get_children (GimpItem *item,
- gint *num_children);
-gboolean gimp_item_get_expanded (GimpItem *item);
-gboolean gimp_item_set_expanded (GimpItem *item,
- gboolean expanded);
-gchar* gimp_item_get_name (GimpItem *item);
-gboolean gimp_item_set_name (GimpItem *item,
- const gchar *name);
-gboolean gimp_item_get_visible (GimpItem *item);
-gboolean gimp_item_set_visible (GimpItem *item,
- gboolean visible);
-gboolean gimp_item_get_linked (GimpItem *item);
-gboolean gimp_item_set_linked (GimpItem *item,
- gboolean linked);
-gboolean gimp_item_get_lock_content (GimpItem *item);
-gboolean gimp_item_set_lock_content (GimpItem *item,
- gboolean lock_content);
-gboolean gimp_item_get_lock_position (GimpItem *item);
-gboolean gimp_item_set_lock_position (GimpItem *item,
- gboolean lock_position);
-GimpColorTag gimp_item_get_color_tag (GimpItem *item);
-gboolean gimp_item_set_color_tag (GimpItem *item,
- GimpColorTag color_tag);
-guint gimp_item_get_tattoo (GimpItem *item);
-gboolean gimp_item_set_tattoo (GimpItem *item,
- guint tattoo);
-gboolean gimp_item_attach_parasite (GimpItem *item,
- const GimpParasite *parasite);
-gboolean gimp_item_detach_parasite (GimpItem *item,
- const gchar *name);
-GimpParasite* gimp_item_get_parasite (GimpItem *item,
- const gchar *name);
-gchar** gimp_item_get_parasite_list (GimpItem *item,
- gint *num_parasites);
+gboolean gimp_item_id_is_valid (gint item_id);
+gboolean gimp_item_id_is_drawable (gint item_id);
+gboolean gimp_item_id_is_layer (gint item_id);
+gboolean gimp_item_id_is_text_layer (gint item_id);
+gboolean gimp_item_id_is_channel (gint item_id);
+gboolean gimp_item_id_is_layer_mask (gint item_id);
+gboolean gimp_item_id_is_selection (gint item_id);
+gboolean gimp_item_id_is_vectors (gint item_id);
+GimpImage* gimp_item_get_image (GimpItem *item);
+gboolean gimp_item_delete (GimpItem *item);
+gboolean gimp_item_is_group (GimpItem *item);
+GimpItem* gimp_item_get_parent (GimpItem *item);
+GimpItem** gimp_item_get_children (GimpItem *item,
+ gint *num_children);
+gboolean gimp_item_get_expanded (GimpItem *item);
+gboolean gimp_item_set_expanded (GimpItem *item,
+ gboolean expanded);
+gchar* gimp_item_get_name (GimpItem *item);
+gboolean gimp_item_set_name (GimpItem *item,
+ const gchar *name);
+gboolean gimp_item_get_visible (GimpItem *item);
+gboolean gimp_item_set_visible (GimpItem *item,
+ gboolean visible);
+gboolean gimp_item_get_linked (GimpItem *item);
+gboolean gimp_item_set_linked (GimpItem *item,
+ gboolean linked);
+gboolean gimp_item_get_lock_content (GimpItem *item);
+gboolean gimp_item_set_lock_content (GimpItem *item,
+ gboolean lock_content);
+gboolean gimp_item_get_lock_position (GimpItem *item);
+gboolean gimp_item_set_lock_position (GimpItem *item,
+ gboolean lock_position);
+GimpColorTag gimp_item_get_color_tag (GimpItem *item);
+gboolean gimp_item_set_color_tag (GimpItem *item,
+ GimpColorTag color_tag);
+guint gimp_item_get_tattoo (GimpItem *item);
+gboolean gimp_item_set_tattoo (GimpItem *item,
+ guint tattoo);
+gboolean gimp_item_attach_parasite (GimpItem *item,
+ const GimpParasite *parasite);
+gboolean gimp_item_detach_parasite (GimpItem *item,
+ const gchar *name);
+GimpParasite* gimp_item_get_parasite (GimpItem *item,
+ const gchar *name);
+gchar** gimp_item_get_parasite_list (GimpItem *item,
+ gint *num_parasites);
G_END_DECLS
diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c
index 9d1c341ed0..6e6d82cca9 100644
--- a/libgimp/gimpvectors_pdb.c
+++ b/libgimp/gimpvectors_pdb.c
@@ -1034,7 +1034,7 @@ gimp_vectors_bezier_stroke_new_ellipse (GimpVectors *vectors,
* @merge: Merge paths into a single vectors object.
* @scale: Scale the SVG to image dimensions.
* @num_vectors: (out): The number of newly created vectors.
- * @vectors_ids: (out) (array length=num_vectors) (element-type gint32) (transfer full): The list of newly
created vectors.
+ * @vectors: (out) (array length=num_vectors) (element-type GimpVectors) (transfer container): The list of
newly created vectors.
*
* Import paths from an SVG file.
*
@@ -1046,12 +1046,12 @@ gimp_vectors_bezier_stroke_new_ellipse (GimpVectors *vectors,
* Since: 2.4
**/
gboolean
-gimp_vectors_import_from_file (GimpImage *image,
- const gchar *filename,
- gboolean merge,
- gboolean scale,
- gint *num_vectors,
- gint **vectors_ids)
+gimp_vectors_import_from_file (GimpImage *image,
+ const gchar *filename,
+ gboolean merge,
+ gboolean scale,
+ gint *num_vectors,
+ GimpVectors ***vectors)
{
GimpValueArray *args;
GimpValueArray *return_vals;
@@ -1070,14 +1070,14 @@ gimp_vectors_import_from_file (GimpImage *image,
gimp_value_array_unref (args);
*num_vectors = 0;
- *vectors_ids = NULL;
+ *vectors = NULL;
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success)
{
*num_vectors = GIMP_VALUES_GET_INT (return_vals, 1);
- *vectors_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ *vectors = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
@@ -1093,7 +1093,7 @@ gimp_vectors_import_from_file (GimpImage *image,
* @merge: Merge paths into a single vectors object.
* @scale: Scale the SVG to image dimensions.
* @num_vectors: (out): The number of newly created vectors.
- * @vectors_ids: (out) (array length=num_vectors) (element-type gint32) (transfer full): The list of newly
created vectors.
+ * @vectors: (out) (array length=num_vectors) (element-type GimpVectors) (transfer container): The list of
newly created vectors.
*
* Import paths from an SVG string.
*
@@ -1106,13 +1106,13 @@ gimp_vectors_import_from_file (GimpImage *image,
* Since: 2.4
**/
gboolean
-gimp_vectors_import_from_string (GimpImage *image,
- const gchar *string,
- gint length,
- gboolean merge,
- gboolean scale,
- gint *num_vectors,
- gint **vectors_ids)
+gimp_vectors_import_from_string (GimpImage *image,
+ const gchar *string,
+ gint length,
+ gboolean merge,
+ gboolean scale,
+ gint *num_vectors,
+ GimpVectors ***vectors)
{
GimpValueArray *args;
GimpValueArray *return_vals;
@@ -1132,14 +1132,14 @@ gimp_vectors_import_from_string (GimpImage *image,
gimp_value_array_unref (args);
*num_vectors = 0;
- *vectors_ids = NULL;
+ *vectors = NULL;
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
if (success)
{
*num_vectors = GIMP_VALUES_GET_INT (return_vals, 1);
- *vectors_ids = GIMP_VALUES_DUP_INT32_ARRAY (return_vals, 2);
+ *vectors = GIMP_VALUES_DUP_OBJECT_ARRAY (return_vals, 2);
}
gimp_value_array_unref (return_vals);
diff --git a/libgimp/gimpvectors_pdb.h b/libgimp/gimpvectors_pdb.h
index 168d823bef..f4a4639f5f 100644
--- a/libgimp/gimpvectors_pdb.h
+++ b/libgimp/gimpvectors_pdb.h
@@ -32,111 +32,111 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
-GimpVectors* gimp_vectors_new (GimpImage *image,
- const gchar *name);
-GimpVectors* gimp_vectors_new_from_text_layer (GimpImage *image,
- GimpLayer *layer);
-GimpVectors* gimp_vectors_copy (GimpVectors *vectors);
-gint* gimp_vectors_get_strokes (GimpVectors *vectors,
- gint *num_strokes);
-gdouble gimp_vectors_stroke_get_length (GimpVectors *vectors,
- gint stroke_id,
- gdouble precision);
-gboolean gimp_vectors_stroke_get_point_at_dist (GimpVectors *vectors,
- gint stroke_id,
- gdouble dist,
- gdouble precision,
- gdouble *x_point,
- gdouble *y_point,
- gdouble *slope,
- gboolean *valid);
-gboolean gimp_vectors_remove_stroke (GimpVectors *vectors,
- gint stroke_id);
-gboolean gimp_vectors_stroke_close (GimpVectors *vectors,
- gint stroke_id);
-gboolean gimp_vectors_stroke_translate (GimpVectors *vectors,
- gint stroke_id,
- gint off_x,
- gint off_y);
-gboolean gimp_vectors_stroke_scale (GimpVectors *vectors,
- gint stroke_id,
- gdouble scale_x,
- gdouble scale_y);
-gboolean gimp_vectors_stroke_rotate (GimpVectors *vectors,
- gint stroke_id,
- gdouble center_x,
- gdouble center_y,
- gdouble angle);
-gboolean gimp_vectors_stroke_flip (GimpVectors *vectors,
- gint stroke_id,
- GimpOrientationType flip_type,
- gdouble axis);
-gboolean gimp_vectors_stroke_flip_free (GimpVectors *vectors,
- gint stroke_id,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2);
-GimpVectorsStrokeType gimp_vectors_stroke_get_points (GimpVectors *vectors,
- gint stroke_id,
- gint *num_points,
- gdouble **controlpoints,
- gboolean *closed);
-gint gimp_vectors_stroke_new_from_points (GimpVectors *vectors,
- GimpVectorsStrokeType type,
- gint num_points,
- const gdouble *controlpoints,
- gboolean closed);
-gdouble* gimp_vectors_stroke_interpolate (GimpVectors *vectors,
- gint stroke_id,
- gdouble precision,
- gint *num_coords,
- gboolean *closed);
-gint gimp_vectors_bezier_stroke_new_moveto (GimpVectors *vectors,
- gdouble x0,
- gdouble y0);
-gboolean gimp_vectors_bezier_stroke_lineto (GimpVectors *vectors,
- gint stroke_id,
- gdouble x0,
- gdouble y0);
-gboolean gimp_vectors_bezier_stroke_conicto (GimpVectors *vectors,
- gint stroke_id,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1);
-gboolean gimp_vectors_bezier_stroke_cubicto (GimpVectors *vectors,
- gint stroke_id,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2);
-gint gimp_vectors_bezier_stroke_new_ellipse (GimpVectors *vectors,
- gdouble x0,
- gdouble y0,
- gdouble radius_x,
- gdouble radius_y,
- gdouble angle);
-gboolean gimp_vectors_import_from_file (GimpImage *image,
- const gchar *filename,
- gboolean merge,
- gboolean scale,
- gint *num_vectors,
- gint **vectors_ids);
-gboolean gimp_vectors_import_from_string (GimpImage *image,
- const gchar *string,
- gint length,
- gboolean merge,
- gboolean scale,
- gint *num_vectors,
- gint **vectors_ids);
-gboolean gimp_vectors_export_to_file (GimpImage *image,
- const gchar *filename,
- GimpVectors *vectors);
-gchar* gimp_vectors_export_to_string (GimpImage *image,
- GimpVectors *vectors);
+GimpVectors* gimp_vectors_new (GimpImage *image,
+ const gchar *name);
+GimpVectors* gimp_vectors_new_from_text_layer (GimpImage *image,
+ GimpLayer *layer);
+GimpVectors* gimp_vectors_copy (GimpVectors *vectors);
+gint* gimp_vectors_get_strokes (GimpVectors *vectors,
+ gint *num_strokes);
+gdouble gimp_vectors_stroke_get_length (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble precision);
+gboolean gimp_vectors_stroke_get_point_at_dist (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble dist,
+ gdouble precision,
+ gdouble *x_point,
+ gdouble *y_point,
+ gdouble *slope,
+ gboolean *valid);
+gboolean gimp_vectors_remove_stroke (GimpVectors *vectors,
+ gint stroke_id);
+gboolean gimp_vectors_stroke_close (GimpVectors *vectors,
+ gint stroke_id);
+gboolean gimp_vectors_stroke_translate (GimpVectors *vectors,
+ gint stroke_id,
+ gint off_x,
+ gint off_y);
+gboolean gimp_vectors_stroke_scale (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble scale_x,
+ gdouble scale_y);
+gboolean gimp_vectors_stroke_rotate (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble center_x,
+ gdouble center_y,
+ gdouble angle);
+gboolean gimp_vectors_stroke_flip (GimpVectors *vectors,
+ gint stroke_id,
+ GimpOrientationType flip_type,
+ gdouble axis);
+gboolean gimp_vectors_stroke_flip_free (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2);
+GimpVectorsStrokeType gimp_vectors_stroke_get_points (GimpVectors *vectors,
+ gint stroke_id,
+ gint *num_points,
+ gdouble **controlpoints,
+ gboolean *closed);
+gint gimp_vectors_stroke_new_from_points (GimpVectors *vectors,
+ GimpVectorsStrokeType type,
+ gint num_points,
+ const gdouble *controlpoints,
+ gboolean closed);
+gdouble* gimp_vectors_stroke_interpolate (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble precision,
+ gint *num_coords,
+ gboolean *closed);
+gint gimp_vectors_bezier_stroke_new_moveto (GimpVectors *vectors,
+ gdouble x0,
+ gdouble y0);
+gboolean gimp_vectors_bezier_stroke_lineto (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble x0,
+ gdouble y0);
+gboolean gimp_vectors_bezier_stroke_conicto (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble x0,
+ gdouble y0,
+ gdouble x1,
+ gdouble y1);
+gboolean gimp_vectors_bezier_stroke_cubicto (GimpVectors *vectors,
+ gint stroke_id,
+ gdouble x0,
+ gdouble y0,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2);
+gint gimp_vectors_bezier_stroke_new_ellipse (GimpVectors *vectors,
+ gdouble x0,
+ gdouble y0,
+ gdouble radius_x,
+ gdouble radius_y,
+ gdouble angle);
+gboolean gimp_vectors_import_from_file (GimpImage *image,
+ const gchar *filename,
+ gboolean merge,
+ gboolean scale,
+ gint *num_vectors,
+ GimpVectors ***vectors);
+gboolean gimp_vectors_import_from_string (GimpImage *image,
+ const gchar *string,
+ gint length,
+ gboolean merge,
+ gboolean scale,
+ gint *num_vectors,
+ GimpVectors ***vectors);
+gboolean gimp_vectors_export_to_file (GimpImage *image,
+ const gchar *filename,
+ GimpVectors *vectors);
+gchar* gimp_vectors_export_to_string (GimpImage *image,
+ GimpVectors *vectors);
G_END_DECLS
diff --git a/pdb/app.pl b/pdb/app.pl
index 7de0475c02..de8b7cc3bb 100644
--- a/pdb/app.pl
+++ b/pdb/app.pl
@@ -575,6 +575,51 @@ gimp_param_spec_rgb_array ("$name",
"$nick",
"$blurb",
$flags)
+CODE
+ }
+ elsif ($pdbtype eq 'imagearray') {
+ $pspec = <<CODE;
+gimp_param_spec_object_array ("$name",
+ "$nick",
+ "$blurb",
+ GIMP_TYPE_IMAGE,
+ $flags)
+CODE
+ }
+ elsif ($pdbtype eq 'itemarray') {
+ $pspec = <<CODE;
+gimp_param_spec_object_array ("$name",
+ "$nick",
+ "$blurb",
+ GIMP_TYPE_ITEM,
+ $flags)
+CODE
+ }
+ elsif ($pdbtype eq 'layerarray') {
+ $pspec = <<CODE;
+gimp_param_spec_object_array ("$name",
+ "$nick",
+ "$blurb",
+ GIMP_TYPE_LAYER,
+ $flags)
+CODE
+ }
+ elsif ($pdbtype eq 'channelarray') {
+ $pspec = <<CODE;
+gimp_param_spec_object_array ("$name",
+ "$nick",
+ "$blurb",
+ GIMP_TYPE_CHANNEL,
+ $flags)
+CODE
+ }
+ elsif ($pdbtype eq 'vectorarray') {
+ $pspec = <<CODE;
+gimp_param_spec_object_array ("$name",
+ "$nick",
+ "$blurb",
+ GIMP_TYPE_VECTORS,
+ $flags)
CODE
}
else {
diff --git a/pdb/groups/fileops.pdb b/pdb/groups/fileops.pdb
index b0f47eca69..9a63d08261 100644
--- a/pdb/groups/fileops.pdb
+++ b/pdb/groups/fileops.pdb
@@ -202,7 +202,7 @@ HELP
);
@outargs = (
- { name => 'layer_ids', type => 'int32array',
+ { name => 'layers', type => 'layerarray',
desc => 'The list of loaded layers',
array => { name => 'num_layers',
desc => 'The number of loaded layers' } }
@@ -215,12 +215,12 @@ HELP
if (file)
{
- GList *layers;
+ GList *layer_list;
GimpPDBStatusType status;
- layers = file_open_layers (gimp, context, progress,
- image, FALSE,
- file, run_mode, NULL, &status, error);
+ layer_list = file_open_layers (gimp, context, progress,
+ image, FALSE,
+ file, run_mode, NULL, &status, error);
g_object_unref (file);
@@ -229,16 +229,18 @@ HELP
GList *list;
gint i;
- num_layers = g_list_length (layers);
+ num_layers = g_list_length (layer_list);
- layer_ids = g_new (gint32, num_layers);
+ layers = g_new (GimpLayer *, num_layers);
- for (i = 0, list = layers;
+ for (i = 0, list = layer_list;
i < num_layers;
i++, list = g_list_next (list))
- layer_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ {
+ layers[i] = g_object_ref (list->data);
+ }
- g_list_free (layers);
+ g_list_free (layer_list);
}
else
success = FALSE;
diff --git a/pdb/groups/image.pdb b/pdb/groups/image.pdb
index 99d02a780e..a4eccc13d8 100644
--- a/pdb/groups/image.pdb
+++ b/pdb/groups/image.pdb
@@ -45,7 +45,7 @@ CODE
);
}
-sub image_list {
+sub get_images {
$blurb = 'Returns the list of images currently open.';
$help = <<'HELP';
@@ -53,10 +53,9 @@ This procedure returns the list of images currently open in GIMP.
HELP
&std_pdb_misc;
- $lib_private = 1;
@outargs = (
- { name => 'image_ids', type => 'int32array',
+ { name => 'images', type => 'imagearray',
desc => 'The list of images currently open.',
array => { name => 'num_images',
desc => 'The number of images currently open' } }
@@ -73,10 +72,10 @@ HELP
{
gint i;
- image_ids = g_new (gint32, num_images);
+ images = g_new (GimpImage *, num_images);
for (i = 0; i < num_images; i++, list = g_list_next (list))
- image_ids[i] = gimp_image_get_id (GIMP_IMAGE (list->data));
+ images[i] = g_object_ref (list->data);
}
}
CODE
@@ -247,7 +246,6 @@ The order of layers is from topmost to bottommost.
HELP
&std_pdb_misc;
- $lib_private = 1;
@inargs = (
{ name => 'image', type => 'image',
@@ -255,7 +253,7 @@ HELP
);
@outargs = (
- { name => 'layer_ids', type => 'int32array',
+ { name => 'layers', type => 'layerarray',
desc => 'The list of layers contained in the image.',
array => { name => 'num_layers',
desc => 'The number of layers contained in the image' } }
@@ -272,10 +270,10 @@ HELP
{
gint i;
- layer_ids = g_new (gint32, num_layers);
+ layers = g_new (GimpLayer *, num_layers);
for (i = 0; i < num_layers; i++, list = g_list_next (list))
- layer_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ layers[i] = g_object_ref (list->data);
}
}
CODE
@@ -293,7 +291,6 @@ include the image's color components.
HELP
&std_pdb_misc;
- $lib_private = 1;
@inargs = (
{ name => 'image', type => 'image',
@@ -301,7 +298,7 @@ HELP
);
@outargs = (
- { name => 'channel_ids', type => 'int32array',
+ { name => 'channels', type => 'channelarray',
desc => 'The list of channels contained in the image.',
array => { name => 'num_channels',
desc => 'The number of channels contained in the image' } }
@@ -318,10 +315,10 @@ HELP
{
gint i;
- channel_ids = g_new (gint32, num_channels);
+ channels = g_new (GimpChannel *, num_channels);
for (i = 0; i < num_channels; i++, list = g_list_next (list))
- channel_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ channels[i] = g_object_ref (list->data);
}
}
CODE
@@ -336,7 +333,6 @@ This procedure returns the list of vectors contained in the specified image.
HELP
&simon_pdb_misc('2005', '2.4');
- $lib_private = 1;
@inargs = (
{ name => 'image', type => 'image',
@@ -344,7 +340,7 @@ HELP
);
@outargs = (
- { name => 'vector_ids', type => 'int32array',
+ { name => 'vectors', type => 'vectorarray',
desc => 'The list of vectors contained in the image.',
array => { name => 'num_vectors',
desc => 'The number of vectors contained in the image' } }
@@ -361,10 +357,10 @@ HELP
{
gint i;
- vector_ids = g_new (gint32, num_vectors);
+ vectors = g_new (GimpVectors *, num_vectors);
for (i = 0; i < num_vectors; i++, list = g_list_next (list))
- vector_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ vectors[i] = g_object_ref (list->data);
}
}
CODE
@@ -2949,7 +2945,7 @@ CODE
"gimp-intl.h");
@procs = qw(image_id_is_valid
- image_list
+ get_images
image_new image_new_with_precision
image_duplicate image_delete
image_base_type
diff --git a/pdb/groups/item.pdb b/pdb/groups/item.pdb
index f52abb0ba3..a5837818f5 100644
--- a/pdb/groups/item.pdb
+++ b/pdb/groups/item.pdb
@@ -399,7 +399,6 @@ item. The order is topmost to bottommost.
HELP
&mitch_pdb_misc('2010', '2.8');
- $lib_private = 1;
@inargs = (
{ name => 'item', type => 'item',
@@ -407,7 +406,7 @@ HELP
);
@outargs = (
- { name => 'child_ids', type => 'int32array',
+ { name => 'children', type => 'itemarray',
desc => "The item's list of children",
array => { name => 'num_children',
desc => "The item's number of children" } }
@@ -416,24 +415,24 @@ HELP
%invoke = (
code => <<'CODE'
{
- GimpContainer *children = gimp_viewable_get_children (GIMP_VIEWABLE (item));
+ GimpContainer *container = gimp_viewable_get_children (GIMP_VIEWABLE (item));
- if (children)
+ if (container)
{
- num_children = gimp_container_get_n_children (children);
+ num_children = gimp_container_get_n_children (container);
if (num_children)
{
GList *list;
gint i;
- child_ids = g_new (gint32, num_children);
+ children = g_new (GimpItem *, num_children);
- for (list = GIMP_LIST (children)->queue->head, i = 0;
+ for (list = GIMP_LIST (container)->queue->head, i = 0;
list;
list = g_list_next (list), i++)
{
- child_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ children[i] = g_object_ref (list->data);
}
}
}
diff --git a/pdb/groups/vectors.pdb b/pdb/groups/vectors.pdb
index 0a33df82a7..edb09c5783 100644
--- a/pdb/groups/vectors.pdb
+++ b/pdb/groups/vectors.pdb
@@ -1097,7 +1097,7 @@ HELP
);
@outargs = (
- { name => 'vectors_ids', type => 'int32array', void_ret => 1,
+ { name => 'vectors', type => 'vectorarray', void_ret => 1,
desc => 'The list of newly created vectors',
array => { name => 'num_vectors',
desc => 'The number of newly created vectors' } }
@@ -1126,11 +1126,14 @@ HELP
GList *list;
gint i;
- vectors_ids = g_new (gint32, num_vectors);
-
- list = vectors_list;
- for (i = 0; i < num_vectors; i++, list = g_list_next (list))
- vectors_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ vectors = g_new (GimpVectors *, num_vectors);
+
+ for (i = 0, list = vectors_list;
+ i < num_vectors;
+ i++, list = g_list_next (list))
+ {
+ vectors[i] = g_object_ref (list->data);
+ }
g_list_free (vectors_list);
}
@@ -1166,7 +1169,7 @@ HELP
);
@outargs = (
- { name => 'vectors_ids', type => 'int32array', void_ret => 1,
+ { name => 'vectors', type => 'vectorarray', void_ret => 1,
desc => 'The list of newly created vectors',
array => { name => 'num_vectors',
desc => 'The number of newly created vectors' } }
@@ -1176,7 +1179,7 @@ HELP
headers => [ qw("vectors/gimpvectors-import.h") ],
code => <<'CODE'
{
- GList *list, *vectors_list = NULL;
+ GList *vectors_list = NULL;
/* FIXME tree */
success = gimp_vectors_import_buffer (image, string, length,
@@ -1189,13 +1192,17 @@ HELP
if (num_vectors)
{
- gint i;
+ GList *list;
+ gint i;
- vectors_ids = g_new (gint32, num_vectors);
+ vectors = g_new (GimpVectors *, num_vectors);
- list = vectors_list;
- for (i = 0; i < num_vectors; i++, list = g_list_next (list))
- vectors_ids[i] = gimp_item_get_id (GIMP_ITEM (list->data));
+ for (i = 0, list = vectors_list;
+ i < num_vectors;
+ i++, list = g_list_next (list))
+ {
+ vectors[i] = g_object_ref (list->data);
+ }
g_list_free (vectors_list);
}
diff --git a/pdb/pdb.pl b/pdb/pdb.pl
index 4400980d90..91b9f6999d 100644
--- a/pdb/pdb.pl
+++ b/pdb/pdb.pl
@@ -136,6 +136,71 @@ package Gimp::CodeGen::pdb;
set_value_func => 'gimp_value_set_rgb_array ($value, $var, $var_len)',
take_value_func => 'gimp_value_take_rgb_array ($value, $var, $var_len)' },
+ imagearray => { name => 'IMAGEARRAY',
+ gtype => 'GIMP_TYPE_OBJECT_ARRAY',
+ type => 'GimpImage **',
+ const_type => 'const GimpImage **',
+ array => 1,
+ init_value => 'NULL',
+ in_annotate => '(element-type GimpImage)',
+ out_annotate => '(element-type GimpImage) (transfer container)',
+ get_value_func => '$var = gimp_value_get_object_array ($value)',
+ dup_value_func => '$var = GIMP_VALUES_DUP_OBJECT_ARRAY ($value)',
+ set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_IMAGE, (GObject **)
$var, $var_len)',
+ take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_IMAGE, (GObject **)
$var, $var_len)' },
+
+ itemarray => { name => 'ITEMARRAY',
+ gtype => 'GIMP_TYPE_OBJECT_ARRAY',
+ type => 'GimpItem **',
+ const_type => 'const GimpItem **',
+ array => 1,
+ init_value => 'NULL',
+ in_annotate => '(element-type GimpItem)',
+ out_annotate => '(element-type GimpItem) (transfer container)',
+ get_value_func => '$var = gimp_value_get_object_array ($value)',
+ dup_value_func => '$var = GIMP_VALUES_DUP_OBJECT_ARRAY ($value)',
+ set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_ITEM, (GObject **)
$var, $var_len)',
+ take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_ITEM, (GObject **)
$var, $var_len)' },
+
+ layerarray => { name => 'LAYERARRAY',
+ gtype => 'GIMP_TYPE_OBJECT_ARRAY',
+ type => 'GimpLayer **',
+ const_type => 'const GimpLayer **',
+ array => 1,
+ init_value => 'NULL',
+ in_annotate => '(element-type GimpLayer)',
+ out_annotate => '(element-type GimpLayer) (transfer container)',
+ get_value_func => '$var = gimp_value_get_object_array ($value)',
+ dup_value_func => '$var = GIMP_VALUES_DUP_OBJECT_ARRAY ($value)',
+ set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_LAYER, (GObject **)
$var, $var_len)',
+ take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_LAYER, (GObject **)
$var, $var_len)' },
+
+ channelarray => { name => 'CHANNELARRAY',
+ gtype => 'GIMP_TYPE_OBJECT_ARRAY',
+ type => 'GimpChannel **',
+ const_type => 'const GimpChannel **',
+ array => 1,
+ init_value => 'NULL',
+ in_annotate => '(element-type GimpChannel)',
+ out_annotate => '(element-type GimpChannel) (transfer container)',
+ get_value_func => '$var = gimp_value_get_object_array ($value)',
+ dup_value_func => '$var = GIMP_VALUES_DUP_OBJECT_ARRAY ($value)',
+ set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_CHANNEL, (GObject **)
$var, $var_len)',
+ take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_CHANNEL, (GObject
**) $var, $var_len)' },
+
+ vectorarray => { name => 'VECTORSARRAY',
+ gtype => 'GIMP_TYPE_OBJECT_ARRAY',
+ type => 'GimpVectors **',
+ const_type => 'const GimpVectors **',
+ array => 1,
+ init_value => 'NULL',
+ in_annotate => '(element-type GimpVectors)',
+ out_annotate => '(element-type GimpVectors) (transfer container)',
+ get_value_func => '$var = gimp_value_get_object_array ($value)',
+ dup_value_func => '$var = GIMP_VALUES_DUP_OBJECT_ARRAY ($value)',
+ set_value_func => 'gimp_value_set_object_array ($value, GIMP_TYPE_VECTORS, (GObject **)
$var, $var_len)',
+ take_value_func => 'gimp_value_take_object_array ($value, GIMP_TYPE_VECTORS, (GObject
**) $var, $var_len)' },
+
color => { name => 'COLOR',
gtype => 'GIMP_TYPE_RGB',
type => 'GimpRGB ',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]