[gimp] pdb, libgimp: generate (transfer full) annotations for libgimp
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb, libgimp: generate (transfer full) annotations for libgimp
- Date: Wed, 31 Jul 2019 10:58:46 +0000 (UTC)
commit 5b6cfd98632414107d8d77d74f45c5c6f5f1007a
Author: Michael Natterer <mitch gimp org>
Date: Wed Jul 31 12:54:51 2019 +0200
pdb, libgimp: generate (transfer full) annotations for libgimp
for all returned allocated memory.
libgimp/gimp_pdb.c | 10 +++----
libgimp/gimpbrush_pdb.c | 16 ++++++------
libgimp/gimpbrushes_pdb.c | 4 +--
libgimp/gimpbuffer_pdb.c | 6 ++---
libgimp/gimpcontext_pdb.c | 21 ++++++++-------
libgimp/gimpdrawable_pdb.c | 10 +++----
libgimp/gimpdynamics_pdb.c | 4 +--
libgimp/gimpedit_pdb.c | 12 ++++-----
libgimp/gimpfileops_pdb.c | 2 +-
libgimp/gimpfonts_pdb.c | 4 +--
libgimp/gimpgimprc_pdb.c | 9 ++++---
libgimp/gimpgradient_pdb.c | 10 +++----
libgimp/gimpgradients_pdb.c | 4 +--
libgimp/gimpimage_pdb.c | 52 +++++++++++++++++++------------------
libgimp/gimpimagecolorprofile_pdb.c | 8 +++---
libgimp/gimpitem_pdb.c | 10 +++----
libgimp/gimppalette_pdb.c | 10 +++----
libgimp/gimppalettes_pdb.c | 4 +--
libgimp/gimppattern_pdb.c | 2 +-
libgimp/gimppatterns_pdb.c | 4 +--
libgimp/gimpproceduraldb_pdb.c | 25 +++++++++---------
libgimp/gimptextlayer_pdb.c | 11 ++++----
libgimp/gimpunit_pdb.c | 10 +++----
libgimp/gimpvectors_pdb.c | 14 +++++-----
pdb/lib.pl | 14 +++++++++-
pdb/pdb.pl | 8 ++++++
26 files changed, 156 insertions(+), 128 deletions(-)
---
diff --git a/libgimp/gimp_pdb.c b/libgimp/gimp_pdb.c
index cfcafa6175..2098634447 100644
--- a/libgimp/gimp_pdb.c
+++ b/libgimp/gimp_pdb.c
@@ -46,7 +46,7 @@
* This procedure returns the version number of the currently running
* GIMP.
*
- * Returns: GIMP version number.
+ * Returns: (transfer full) GIMP version number.
**/
gchar *
gimp_version (void)
@@ -178,7 +178,7 @@ gimp_detach_parasite (const gchar *name)
*
* Finds and returns the global parasite that was previously attached.
*
- * Returns: The found parasite.
+ * Returns: (transfer full) The found parasite.
*
* Since: 2.8
**/
@@ -213,8 +213,8 @@ gimp_get_parasite (const gchar *name)
*
* Returns a list of all currently attached global parasites.
*
- * Returns: The names of currently attached parasites. The returned
- * value must be freed with g_strfreev().
+ * Returns: (transfer full) The names of currently attached parasites.
+ * The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/
@@ -253,7 +253,7 @@ gimp_get_parasite_list (gint *num_parasites)
* Generates a unique filename using the temp path supplied in the
* user's gimprc.
*
- * Returns: The new temp filename.
+ * Returns: (transfer full) The new temp filename.
**/
gchar *
gimp_temp_name (const gchar *extension)
diff --git a/libgimp/gimpbrush_pdb.c b/libgimp/gimpbrush_pdb.c
index 89aa0fc225..63f4b6dbb8 100644
--- a/libgimp/gimpbrush_pdb.c
+++ b/libgimp/gimpbrush_pdb.c
@@ -42,8 +42,8 @@
*
* This procedure creates a new, uninitialized brush.
*
- * Returns: The actual new brush name. The returned value must be freed
- * with g_free().
+ * Returns: (transfer full) The actual new brush name. The returned
+ * value must be freed with g_free().
*
* Since: 2.2
**/
@@ -78,8 +78,8 @@ gimp_brush_new (const gchar *name)
*
* This procedure creates an identical brush by a different name.
*
- * Returns: The name of the brush's copy. The returned value must be
- * freed with g_free().
+ * Returns: (transfer full) The name of the brush's copy. The returned
+ * value must be freed with g_free().
*
* Since: 2.2
**/
@@ -150,8 +150,8 @@ gimp_brush_is_generated (const gchar *name)
*
* This procedure renames a brush.
*
- * Returns: The actual new name of the brush. The returned value must
- * be freed with g_free().
+ * Returns: (transfer full) The actual new name of the brush. The
+ * returned value must be freed with g_free().
*
* Since: 2.2
**/
@@ -313,10 +313,10 @@ gimp_brush_get_info (const gchar *name,
* @height: The brush height.
* @mask_bpp: The brush mask bpp.
* @num_mask_bytes: Length of brush mask data.
- * @mask_bytes: The brush mask data.
+ * @mask_bytes: (transfer full) The brush mask data.
* @color_bpp: The brush color bpp.
* @num_color_bytes: Length of brush color data.
- * @color_bytes: The brush color data.
+ * @color_bytes: (transfer full) The brush color data.
*
* Retrieves information about the specified brush.
*
diff --git a/libgimp/gimpbrushes_pdb.c b/libgimp/gimpbrushes_pdb.c
index 1391dfe278..fe6306748e 100644
--- a/libgimp/gimpbrushes_pdb.c
+++ b/libgimp/gimpbrushes_pdb.c
@@ -75,8 +75,8 @@ gimp_brushes_refresh (void)
* Each name returned can be used as input to the
* gimp_context_set_brush() procedure.
*
- * Returns: The list of brush names. The returned value must be freed
- * with g_strfreev().
+ * Returns: (transfer full) The list of brush names. The returned value
+ * must be freed with g_strfreev().
**/
gchar **
gimp_brushes_get_list (const gchar *filter,
diff --git a/libgimp/gimpbuffer_pdb.c b/libgimp/gimpbuffer_pdb.c
index c34d10a68a..276ff201e8 100644
--- a/libgimp/gimpbuffer_pdb.c
+++ b/libgimp/gimpbuffer_pdb.c
@@ -44,8 +44,8 @@
* This procedure returns a complete listing of available named
* buffers.
*
- * Returns: The list of buffer names. The returned value must be freed
- * with g_strfreev().
+ * Returns: (transfer full) The list of buffer names. The returned
+ * value must be freed with g_strfreev().
*
* Since: 2.4
**/
@@ -87,7 +87,7 @@ gimp_buffers_get_list (const gchar *filter,
*
* This procedure renames a named buffer.
*
- * Returns: The real name given to the buffer.
+ * Returns: (transfer full) The real name given to the buffer.
*
* Since: 2.4
**/
diff --git a/libgimp/gimpcontext_pdb.c b/libgimp/gimpcontext_pdb.c
index 40cf81dcf9..70530f4d68 100644
--- a/libgimp/gimpcontext_pdb.c
+++ b/libgimp/gimpcontext_pdb.c
@@ -139,7 +139,7 @@ gimp_context_set_defaults (void)
/**
* gimp_context_list_paint_methods:
* @num_paint_methods: The number of the available paint methods.
- * @paint_methods: The names of the available paint methods.
+ * @paint_methods: (transfer full) The names of the available paint methods.
*
* Lists the available paint methods.
*
@@ -188,7 +188,7 @@ gimp_context_list_paint_methods (gint *num_paint_methods,
* This procedure returns the name of the currently active paint
* method.
*
- * Returns: The name of the active paint method.
+ * Returns: (transfer full) The name of the active paint method.
*
* Since: 2.4
**/
@@ -1100,7 +1100,7 @@ gimp_context_set_line_dash_offset (gdouble dash_offset)
/**
* gimp_context_get_line_dash_pattern:
* @num_dashes: The number of dashes in the dash_pattern array.
- * @dashes: The line dash pattern setting.
+ * @dashes: (transfer full) The line dash pattern setting.
*
* Get the line dash pattern setting.
*
@@ -1196,7 +1196,7 @@ gimp_context_set_line_dash_pattern (gint num_dashes,
* paint operations and stroke operations use this brush to control the
* application of paint to the image.
*
- * Returns: The name of the active brush.
+ * Returns: (transfer full) The name of the active brush.
*
* Since: 2.2
**/
@@ -1762,7 +1762,7 @@ gimp_context_set_brush_force (gdouble force)
* dynamics. All paint operations and stroke operations use this paint
* dynamics to control the application of paint to the image.
*
- * Returns: The name of the active paint dynamics.
+ * Returns: (transfer full) The name of the active paint dynamics.
*
* Since: 2.8
**/
@@ -1834,7 +1834,7 @@ gimp_context_set_dynamics (const gchar *name)
* This procedure returns the name of the currently active MyPaint
* brush.
*
- * Returns: The name of the active MyPaint brush.
+ * Returns: (transfer full) The name of the active MyPaint brush.
*
* Since: 2.10
**/
@@ -1907,7 +1907,7 @@ gimp_context_set_mypaint_brush (const gchar *name)
* clone and bucket-fill operations with patterns will use this pattern
* to control the application of paint to the image.
*
- * Returns: The name of the active pattern.
+ * Returns: (transfer full) The name of the active pattern.
*
* Since: 2.2
**/
@@ -1978,7 +1978,7 @@ gimp_context_set_pattern (const gchar *name)
*
* This procedure returns the name of the currently active gradient.
*
- * Returns: The name of the active gradient.
+ * Returns: (transfer full) The name of the active gradient.
*
* Since: 2.2
**/
@@ -2383,7 +2383,8 @@ gimp_context_set_gradient_reverse (gboolean reverse)
*
* This procedure returns the name of the the currently active palette.
*
- * Returns: (transfer full): The name of the active palette.
+ * Returns: (transfer full) (transfer full): The name of the active
+ * palette.
*
* Since: 2.2
**/
@@ -2454,7 +2455,7 @@ gimp_context_set_palette (const gchar *name)
*
* This procedure returns the name of the currently active font.
*
- * Returns: The name of the active font.
+ * Returns: (transfer full) The name of the active font.
*
* Since: 2.2
**/
diff --git a/libgimp/gimpdrawable_pdb.c b/libgimp/gimpdrawable_pdb.c
index da025e26d3..64fe620eb9 100644
--- a/libgimp/gimpdrawable_pdb.c
+++ b/libgimp/gimpdrawable_pdb.c
@@ -45,7 +45,7 @@
* encoding. In order to get to the real format, the libbgimp C wrapper
* must be used.
*
- * Returns: The drawable's Babl format.
+ * Returns: (transfer full) The drawable's Babl format.
*
* Since: 2.10
**/
@@ -82,7 +82,7 @@ _gimp_drawable_get_format (gint32 drawable_ID)
* Thumbnails are always 8-bit images, see gimp_drawable_thumbnail()
* and gimp_drawable_sub_thmbnail().
*
- * Returns: The drawable's thumbnail Babl format.
+ * Returns: (transfer full) The drawable's thumbnail Babl format.
*
* Since: 2.10.14
**/
@@ -714,7 +714,7 @@ gimp_drawable_update (gint32 drawable_ID,
* The 'num_channels' argument must always be equal to the
* bytes-per-pixel value for the specified drawable.
*
- * Returns: The pixel value.
+ * Returns: (transfer full) The pixel value.
**/
guint8 *
gimp_drawable_get_pixel (gint32 drawable_ID,
@@ -912,7 +912,7 @@ gimp_drawable_offset (gint32 drawable_ID,
* @actual_height: The previews height.
* @bpp: The previews bpp.
* @thumbnail_data_count: The number of bytes in thumbnail data.
- * @thumbnail_data: The thumbnail data.
+ * @thumbnail_data: (transfer full) The thumbnail data.
*
* Get a thumbnail of a drawable.
*
@@ -984,7 +984,7 @@ _gimp_drawable_thumbnail (gint32 drawable_ID,
* @height: The previews height.
* @bpp: The previews bpp.
* @thumbnail_data_count: The number of bytes in thumbnail data.
- * @thumbnail_data: The thumbnail data.
+ * @thumbnail_data: (transfer full) The thumbnail data.
*
* Get a thumbnail of a sub-area of a drawable drawable.
*
diff --git a/libgimp/gimpdynamics_pdb.c b/libgimp/gimpdynamics_pdb.c
index ea4f30756a..09fe3711fc 100644
--- a/libgimp/gimpdynamics_pdb.c
+++ b/libgimp/gimpdynamics_pdb.c
@@ -77,8 +77,8 @@ gimp_dynamics_refresh (void)
* This procedure returns a list of the paint dynamics that are
* currently available.
*
- * Returns: The list of paint dynamics names. The returned value must
- * be freed with g_strfreev().
+ * Returns: (transfer full) The list of paint dynamics names. The
+ * returned value must be freed with g_strfreev().
*
* Since: 2.8
**/
diff --git a/libgimp/gimpedit_pdb.c b/libgimp/gimpedit_pdb.c
index 5114a29537..511a37fe26 100644
--- a/libgimp/gimpedit_pdb.c
+++ b/libgimp/gimpedit_pdb.c
@@ -254,8 +254,8 @@ gimp_edit_paste_as_new_image (void)
* later pasting, regardless of any intermediate copy or cut
* operations.
*
- * Returns: The real name given to the buffer, or NULL if the cut
- * failed.
+ * Returns: (transfer full) The real name given to the buffer, or NULL
+ * if the cut failed.
*
* Since: 2.4
**/
@@ -297,8 +297,8 @@ gimp_edit_named_cut (gint32 drawable_ID,
* later pasting, regardless of any intermediate copy or cut
* operations.
*
- * Returns: The real name given to the buffer, or NULL if the copy
- * failed.
+ * Returns: (transfer full) The real name given to the buffer, or NULL
+ * if the copy failed.
*
* Since: 2.4
**/
@@ -340,8 +340,8 @@ gimp_edit_named_copy (gint32 drawable_ID,
* available for later pasting, regardless of any intermediate copy or
* cut operations.
*
- * Returns: The real name given to the buffer, or NULL if the copy
- * failed.
+ * Returns: (transfer full) The real name given to the buffer, or NULL
+ * if the copy failed.
*
* Since: 2.4
**/
diff --git a/libgimp/gimpfileops_pdb.c b/libgimp/gimpfileops_pdb.c
index 1f46fb8bf2..7fa852543d 100644
--- a/libgimp/gimpfileops_pdb.c
+++ b/libgimp/gimpfileops_pdb.c
@@ -141,7 +141,7 @@ gimp_file_load_layer (GimpRunMode run_mode,
* needs to be added to the existing image with
* gimp_image_insert_layer().
*
- * Returns: The list of loaded layers.
+ * Returns: (transfer full) The list of loaded layers.
*
* Since: 2.4
**/
diff --git a/libgimp/gimpfonts_pdb.c b/libgimp/gimpfonts_pdb.c
index e75a8f1565..eb6dbda906 100644
--- a/libgimp/gimpfonts_pdb.c
+++ b/libgimp/gimpfonts_pdb.c
@@ -75,8 +75,8 @@ gimp_fonts_refresh (void)
* This procedure returns a list of the fonts that are currently
* available.
*
- * Returns: The list of font names. The returned value must be freed
- * with g_strfreev().
+ * Returns: (transfer full) The list of font names. The returned value
+ * must be freed with g_strfreev().
**/
gchar **
gimp_fonts_get_list (const gchar *filter,
diff --git a/libgimp/gimpgimprc_pdb.c b/libgimp/gimpgimprc_pdb.c
index 2c41a72728..02ff43d976 100644
--- a/libgimp/gimpgimprc_pdb.c
+++ b/libgimp/gimpgimprc_pdb.c
@@ -50,7 +50,8 @@
* string. Entries not corresponding to this format will cause warnings
* to be issued on gimprc parsing and will not be queryable.
*
- * Returns: The value associated with the queried token.
+ * Returns: (transfer full) The value associated with the queried
+ * token.
**/
gchar *
gimp_gimprc_query (const gchar *token)
@@ -122,7 +123,7 @@ gimp_gimprc_set (const gchar *token,
*
* Returns a copy of the default image comment.
*
- * Returns: Default image comment.
+ * Returns: (transfer full) Default image comment.
**/
gchar *
gimp_get_default_comment (void)
@@ -229,7 +230,7 @@ gimp_get_monitor_resolution (gdouble *xres,
* Returns a string that can be deserialized into a GimpColorConfig
* object representing the current color management configuration.
*
- * Returns: Serialized color management configuration.
+ * Returns: (transfer full) Serialized color management configuration.
*
* Since: 2.4
**/
@@ -261,7 +262,7 @@ _gimp_get_color_configuration (void)
*
* Returns a copy of the list of modules which should not be loaded.
*
- * Returns: The list of modules.
+ * Returns: (transfer full) The list of modules.
**/
gchar *
gimp_get_module_load_inhibit (void)
diff --git a/libgimp/gimpgradient_pdb.c b/libgimp/gimpgradient_pdb.c
index 6bf14048f9..54b8db1259 100644
--- a/libgimp/gimpgradient_pdb.c
+++ b/libgimp/gimpgradient_pdb.c
@@ -42,7 +42,7 @@
*
* This procedure creates a new, uninitialized gradient
*
- * Returns: The actual new gradient name.
+ * Returns: (transfer full) The actual new gradient name.
*
* Since: 2.2
**/
@@ -77,7 +77,7 @@ gimp_gradient_new (const gchar *name)
*
* This procedure creates an identical gradient by a different name
*
- * Returns: The name of the gradient's copy.
+ * Returns: (transfer full) The name of the gradient's copy.
*
* Since: 2.2
**/
@@ -148,7 +148,7 @@ gimp_gradient_is_editable (const gchar *name)
*
* This procedure renames a gradient
*
- * Returns: The actual new name of the gradient.
+ * Returns: (transfer full) The actual new name of the gradient.
*
* Since: 2.2
**/
@@ -254,7 +254,7 @@ gimp_gradient_get_number_of_segments (const gchar *name)
* @num_samples: The number of samples to take.
* @reverse: Use the reverse gradient.
* @num_color_samples: Length of the color_samples array (4 * num_samples).
- * @color_samples: Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.
+ * @color_samples: (transfer full) Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.
*
* Sample the specified in uniform parts.
*
@@ -316,7 +316,7 @@ gimp_gradient_get_uniform_samples (const gchar *name,
* @positions: The list of positions to sample along the gradient.
* @reverse: Use the reverse gradient.
* @num_color_samples: Length of the color_samples array (4 * num_samples).
- * @color_samples: Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.
+ * @color_samples: (transfer full) Color samples: { R1, G1, B1, A1, ..., Rn, Gn, Bn, An }.
*
* Sample the specified gradient in custom positions.
*
diff --git a/libgimp/gimpgradients_pdb.c b/libgimp/gimpgradients_pdb.c
index 098267525f..501506e8ed 100644
--- a/libgimp/gimpgradients_pdb.c
+++ b/libgimp/gimpgradients_pdb.c
@@ -75,8 +75,8 @@ gimp_gradients_refresh (void)
* loaded. You can later use the gimp_context_set_gradient() function
* to set the active gradient.
*
- * Returns: The list of gradient names. The returned value must be
- * freed with g_strfreev().
+ * Returns: (transfer full) The list of gradient names. The returned
+ * value must be freed with g_strfreev().
**/
gchar **
gimp_gradients_get_list (const gchar *filter,
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index 95b7679e79..c1b093369d 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -79,8 +79,8 @@ gimp_image_is_valid (gint32 image_ID)
*
* This procedure returns the list of images currently open in GIMP.
*
- * Returns: The list of images currently open. The returned value must
- * be freed with g_free().
+ * Returns: (transfer full) The list of images currently open. The
+ * returned value must be freed with g_free().
**/
gint *
gimp_image_list (gint *num_images)
@@ -462,8 +462,8 @@ gimp_image_height (gint32 image_ID)
* This procedure returns the list of layers contained in the specified
* image. The order of layers is from topmost to bottommost.
*
- * Returns: The list of layers contained in the image. The returned
- * value must be freed with g_free().
+ * Returns: (transfer full) The list of layers contained in the image.
+ * The returned value must be freed with g_free().
**/
gint *
gimp_image_get_layers (gint32 image_ID,
@@ -507,8 +507,8 @@ gimp_image_get_layers (gint32 image_ID,
* \"channels\" are custom channels and do not include the image's
* color components.
*
- * Returns: The list of channels contained in the image. The returned
- * value must be freed with g_free().
+ * Returns: (transfer full) The list of channels contained in the
+ * image. The returned value must be freed with g_free().
**/
gint *
gimp_image_get_channels (gint32 image_ID,
@@ -549,8 +549,8 @@ gimp_image_get_channels (gint32 image_ID,
* This procedure returns the list of vectors contained in the
* specified image.
*
- * Returns: The list of vectors contained in the image. The returned
- * value must be freed with g_free().
+ * Returns: (transfer full) The list of vectors contained in the image.
+ * The returned value must be freed with g_free().
*
* Since: 2.4
**/
@@ -1728,8 +1728,8 @@ gimp_image_merge_down (gint32 image_ID,
* 3. If the image is not in Indexed color mode, no colormap is
* returned.
*
- * Returns: The image's colormap. The returned value must be freed with
- * g_free().
+ * Returns: (transfer full) The image's colormap. The returned value
+ * must be freed with g_free().
**/
guint8 *
_gimp_image_get_colormap (gint32 image_ID,
@@ -1812,7 +1812,7 @@ _gimp_image_set_colormap (gint32 image_ID,
*
* Returns exif/iptc/xmp metadata from the image.
*
- * Returns: The exif/ptc/xmp metadata as a string.
+ * Returns: (transfer full) The exif/ptc/xmp metadata as a string.
**/
gchar *
_gimp_image_get_metadata (gint32 image_ID)
@@ -1955,7 +1955,7 @@ gimp_image_is_dirty (gint32 image_ID)
* @actual_height: The previews height.
* @bpp: The previews bpp.
* @thumbnail_data_count: The number of bytes in thumbnail data.
- * @thumbnail_data: The thumbnail data.
+ * @thumbnail_data: (transfer full) The thumbnail data.
*
* Get a thumbnail of an image.
*
@@ -2443,8 +2443,8 @@ gimp_image_set_component_visible (gint32 image_ID,
* Otherwise, this function returns %NULL. See also
* gimp_image_get_uri().
*
- * Returns: The filename. The returned value must be freed with
- * g_free().
+ * Returns: (transfer full) The filename. The returned value must be
+ * freed with g_free().
**/
gchar *
gimp_image_get_filename (gint32 image_ID)
@@ -2520,7 +2520,8 @@ gimp_image_set_filename (gint32 image_ID,
* and not yet saved, or gimp-image-get-exported-uri if the image has
* been exported to a non-GIMP file format.
*
- * Returns: The URI. The returned value must be freed with g_free().
+ * Returns: (transfer full) The URI. The returned value must be freed
+ * with g_free().
*
* Since: 2.8
**/
@@ -2556,8 +2557,8 @@ gimp_image_get_uri (gint32 image_ID)
* This procedure returns the XCF URI associated with the image. If
* there is no such URI, this procedure returns %NULL.
*
- * Returns: The imported URI. The returned value must be freed with
- * g_free().
+ * Returns: (transfer full) The imported URI. The returned value must
+ * be freed with g_free().
*
* Since: 2.8
**/
@@ -2595,8 +2596,8 @@ gimp_image_get_xcf_uri (gint32 image_ID)
* image was not imported, or has since been saved in the native Gimp
* format, this procedure returns %NULL.
*
- * Returns: The imported URI. The returned value must be freed with
- * g_free().
+ * Returns: (transfer full) The imported URI. The returned value must
+ * be freed with g_free().
*
* Since: 2.8
**/
@@ -2633,8 +2634,8 @@ gimp_image_get_imported_uri (gint32 image_ID)
* if the image was exported a non-native GIMP format. If the image was
* not exported, this procedure returns %NULL.
*
- * Returns: The exported URI. The returned value must be freed with
- * g_free().
+ * Returns: (transfer full) The exported URI. The returned value must
+ * be freed with g_free().
*
* Since: 2.8
**/
@@ -2675,7 +2676,8 @@ gimp_image_get_exported_uri (gint32 image_ID)
* '(imported)' etc. and should only be used to label user interface
* elements. Never use it to construct filenames.
*
- * Returns: The name. The returned value must be freed with g_free().
+ * Returns: (transfer full) The name. The returned value must be freed
+ * with g_free().
**/
gchar *
gimp_image_get_name (gint32 image_ID)
@@ -3270,7 +3272,7 @@ gimp_image_detach_parasite (gint32 image_ID,
* Finds and returns the parasite that was previously attached to an
* image.
*
- * Returns: The found parasite.
+ * Returns: (transfer full) The found parasite.
*
* Since: 2.8
**/
@@ -3309,8 +3311,8 @@ gimp_image_get_parasite (gint32 image_ID,
*
* Returns a list of all currently attached parasites.
*
- * Returns: The names of currently attached parasites. The returned
- * value must be freed with g_strfreev().
+ * Returns: (transfer full) The names of currently attached parasites.
+ * The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/
diff --git a/libgimp/gimpimagecolorprofile_pdb.c b/libgimp/gimpimagecolorprofile_pdb.c
index c257a0df96..1db475c644 100644
--- a/libgimp/gimpimagecolorprofile_pdb.c
+++ b/libgimp/gimpimagecolorprofile_pdb.c
@@ -44,8 +44,8 @@
* This procedure returns the image's color profile, or NULL if the
* image has no color profile assigned.
*
- * Returns: The image's serialized color profile. The returned value
- * must be freed with g_free().
+ * Returns: (transfer full) The image's serialized color profile. The
+ * returned value must be freed with g_free().
*
* Since: 2.10
**/
@@ -91,8 +91,8 @@ _gimp_image_get_color_profile (gint32 image_ID,
* or a generated default RGB or grayscale profile, according to the
* image's type.
*
- * Returns: The image's serialized color profile. The returned value
- * must be freed with g_free().
+ * Returns: (transfer full) The image's serialized color profile. The
+ * returned value must be freed with g_free().
*
* Since: 2.10
**/
diff --git a/libgimp/gimpitem_pdb.c b/libgimp/gimpitem_pdb.c
index 4510ea99f9..a27948d0a4 100644
--- a/libgimp/gimpitem_pdb.c
+++ b/libgimp/gimpitem_pdb.c
@@ -469,7 +469,7 @@ gimp_item_get_parent (gint32 item_ID)
* This procedure returns the list of items which are children of the
* specified item. The order is topmost to bottommost.
*
- * Returns: The item's list of children.
+ * Returns: (transfer full) The item's list of children.
*
* Since: 2.8
**/
@@ -583,7 +583,7 @@ gimp_item_set_expanded (gint32 item_ID,
*
* This procedure returns the specified item's name.
*
- * Returns: The item name.
+ * Returns: (transfer full) The item name.
*
* Since: 2.8
**/
@@ -1177,7 +1177,7 @@ gimp_item_detach_parasite (gint32 item_ID,
*
* Finds and returns the parasite that is attached to an item.
*
- * Returns: The found parasite.
+ * Returns: (transfer full) The found parasite.
*
* Since: 2.8
**/
@@ -1216,8 +1216,8 @@ gimp_item_get_parasite (gint32 item_ID,
*
* Returns a list of all parasites currently attached the an item.
*
- * Returns: The names of currently attached parasites. The returned
- * value must be freed with g_strfreev().
+ * Returns: (transfer full) The names of currently attached parasites.
+ * The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/
diff --git a/libgimp/gimppalette_pdb.c b/libgimp/gimppalette_pdb.c
index 2a65737dda..c179fab239 100644
--- a/libgimp/gimppalette_pdb.c
+++ b/libgimp/gimppalette_pdb.c
@@ -42,7 +42,7 @@
*
* This procedure creates a new, uninitialized palette
*
- * Returns: The actual new palette name.
+ * Returns: (transfer full) The actual new palette name.
*
* Since: 2.2
**/
@@ -77,7 +77,7 @@ gimp_palette_new (const gchar *name)
*
* This procedure creates an identical palette by a different name
*
- * Returns: The name of the palette's copy.
+ * Returns: (transfer full) The name of the palette's copy.
*
* Since: 2.2
**/
@@ -113,7 +113,7 @@ gimp_palette_duplicate (const gchar *name)
*
* This procedure renames a palette
*
- * Returns: The actual new name of the palette.
+ * Returns: (transfer full) The actual new name of the palette.
*
* Since: 2.2
**/
@@ -263,7 +263,7 @@ gimp_palette_get_info (const gchar *name,
*
* This procedure retrieves all color entries of the specified palette.
*
- * Returns: The colors in the palette.
+ * Returns: (transfer full) The colors in the palette.
*
* Since: 2.6
**/
@@ -554,7 +554,7 @@ gimp_palette_entry_set_color (const gchar *name,
* gimp_palette_entry_get_name:
* @name: The palette name.
* @entry_num: The entry to retrieve.
- * @entry_name: The name requested.
+ * @entry_name: (transfer full) The name requested.
*
* Gets the specified palette entry from the specified palette.
*
diff --git a/libgimp/gimppalettes_pdb.c b/libgimp/gimppalettes_pdb.c
index adf1873aad..5ccb33073b 100644
--- a/libgimp/gimppalettes_pdb.c
+++ b/libgimp/gimppalettes_pdb.c
@@ -75,8 +75,8 @@ gimp_palettes_refresh (void)
* Each name returned can be used as input to the command
* gimp_context_set_palette().
*
- * Returns: The list of palette names. The returned value must be freed
- * with g_strfreev().
+ * Returns: (transfer full) The list of palette names. The returned
+ * value must be freed with g_strfreev().
**/
gchar **
gimp_palettes_get_list (const gchar *filter,
diff --git a/libgimp/gimppattern_pdb.c b/libgimp/gimppattern_pdb.c
index 10454a2b5c..bc8cb500c2 100644
--- a/libgimp/gimppattern_pdb.c
+++ b/libgimp/gimppattern_pdb.c
@@ -93,7 +93,7 @@ gimp_pattern_get_info (const gchar *name,
* @height: The pattern height.
* @bpp: The pattern bpp.
* @num_color_bytes: Number of pattern bytes.
- * @color_bytes: The pattern data.
+ * @color_bytes: (transfer full) The pattern data.
*
* Retrieve information about the specified pattern (including pixels).
*
diff --git a/libgimp/gimppatterns_pdb.c b/libgimp/gimppatterns_pdb.c
index 27d3389ac3..86df88f272 100644
--- a/libgimp/gimppatterns_pdb.c
+++ b/libgimp/gimppatterns_pdb.c
@@ -75,8 +75,8 @@ gimp_patterns_refresh (void)
* patterns. Each name returned can be used as input to the
* gimp_context_set_pattern().
*
- * Returns: The list of pattern names. The returned value must be freed
- * with g_strfreev().
+ * Returns: (transfer full) The list of pattern names. The returned
+ * value must be freed with g_strfreev().
**/
gchar **
gimp_patterns_get_list (const gchar *filter,
diff --git a/libgimp/gimpproceduraldb_pdb.c b/libgimp/gimpproceduraldb_pdb.c
index 7d5f97f69e..1db586ce1f 100644
--- a/libgimp/gimpproceduraldb_pdb.c
+++ b/libgimp/gimpproceduraldb_pdb.c
@@ -43,7 +43,8 @@
* This procedure generates a temporary PDB entry name that is
* guaranteed to be unique.
*
- * Returns: A unique temporary name for a temporary PDB entry.
+ * Returns: (transfer full) A unique temporary name for a temporary PDB
+ * entry.
**/
gchar *
gimp_procedural_db_temp_name (void)
@@ -110,7 +111,7 @@ gimp_procedural_db_dump (const gchar *filename)
* @date: The regex for procedure date.
* @proc_type: The regex for procedure type: { 'Internal GIMP procedure', 'GIMP Plug-in', 'GIMP Extension',
'Temporary Procedure' }.
* @num_matches: The number of matching procedures.
- * @procedure_names: The list of procedure names.
+ * @procedure_names: (transfer full) The list of procedure names.
*
* Queries the procedural database for its contents using regular
* expression matching.
@@ -220,11 +221,11 @@ gimp_procedural_db_proc_exists (const gchar *procedure_name)
/**
* _gimp_procedural_db_proc_info:
* @procedure_name: The procedure name.
- * @blurb: A short blurb.
- * @help: Detailed procedure help.
- * @author: Author(s) of the procedure.
- * @copyright: The copyright.
- * @date: Copyright date.
+ * @blurb: (transfer full) A short blurb.
+ * @help: (transfer full) Detailed procedure help.
+ * @author: (transfer full) Author(s) of the procedure.
+ * @copyright: (transfer full) The copyright.
+ * @date: (transfer full) Copyright date.
* @proc_type: The procedure type.
* @num_args: The number of input arguments.
* @num_values: The number of return values.
@@ -297,8 +298,8 @@ _gimp_procedural_db_proc_info (const gchar *procedure_name,
* @procedure_name: The procedure name.
* @arg_num: The argument number.
* @arg_type: The type of argument.
- * @arg_name: The name of the argument.
- * @arg_desc: A description of the argument.
+ * @arg_name: (transfer full) The name of the argument.
+ * @arg_desc: (transfer full) A description of the argument.
*
* Queries the procedural database for information on the specified
* procedure's argument.
@@ -352,8 +353,8 @@ gimp_procedural_db_proc_arg (const gchar *procedure_name,
* @procedure_name: The procedure name.
* @val_num: The return value number.
* @val_type: The type of return value.
- * @val_name: The name of the return value.
- * @val_desc: A description of the return value.
+ * @val_name: (transfer full) The name of the return value.
+ * @val_desc: (transfer full) A description of the return value.
*
* Queries the procedural database for information on the specified
* procedure's return value.
@@ -407,7 +408,7 @@ gimp_procedural_db_proc_val (const gchar *procedure_name,
* _gimp_procedural_db_get_data:
* @identifier: The identifier associated with data.
* @bytes: The number of bytes in the data.
- * @data: A byte array containing data.
+ * @data: (transfer full) A byte array containing data.
*
* Returns data associated with the specified identifier.
*
diff --git a/libgimp/gimptextlayer_pdb.c b/libgimp/gimptextlayer_pdb.c
index 7121316640..072d8ca11c 100644
--- a/libgimp/gimptextlayer_pdb.c
+++ b/libgimp/gimptextlayer_pdb.c
@@ -98,7 +98,7 @@ gimp_text_layer_new (gint32 image_ID,
*
* This procedure returns the text from a text layer as a string.
*
- * Returns: The text from the specified text layer.
+ * Returns: (transfer full) The text from the specified text layer.
*
* Since: 2.6
**/
@@ -175,8 +175,8 @@ gimp_text_layer_set_text (gint32 layer_ID,
* markup. Note: Setting the markup of a text layer using Pango's
* markup is not supported for now.
*
- * Returns: The markup which represents the style of the specified text
- * layer.
+ * Returns: (transfer full) The markup which represents the style of
+ * the specified text layer.
*
* Since: 2.8
**/
@@ -211,7 +211,8 @@ gimp_text_layer_get_markup (gint32 layer_ID)
*
* This procedure returns the name of the font from a text layer.
*
- * Returns: The font which is used in the specified text layer.
+ * Returns: (transfer full) The font which is used in the specified
+ * text layer.
*
* Since: 2.6
**/
@@ -597,7 +598,7 @@ gimp_text_layer_set_kerning (gint32 layer_ID,
* This procedure returns the language string which is set for the text
* in the text layer.
*
- * Returns: The language used in the text layer.
+ * Returns: (transfer full) The language used in the text layer.
*
* Since: 2.6
**/
diff --git a/libgimp/gimpunit_pdb.c b/libgimp/gimpunit_pdb.c
index d93a982872..111fd71074 100644
--- a/libgimp/gimpunit_pdb.c
+++ b/libgimp/gimpunit_pdb.c
@@ -238,7 +238,7 @@ _gimp_unit_set_deletion_flag (GimpUnit unit_id,
* built-in units it will be the english singular form of the unit's
* name. For user-defined units this should equal to the singular form.
*
- * Returns: The unit's textual identifier.
+ * Returns: (transfer full) The unit's textual identifier.
**/
gchar *
_gimp_unit_get_identifier (GimpUnit unit_id)
@@ -342,7 +342,7 @@ _gimp_unit_get_digits (GimpUnit unit_id)
*
* This procedure returns the symbol of the unit (\"''\" for inches).
*
- * Returns: The unit's symbol.
+ * Returns: (transfer full) The unit's symbol.
**/
gchar *
_gimp_unit_get_symbol (GimpUnit unit_id)
@@ -376,7 +376,7 @@ _gimp_unit_get_symbol (GimpUnit unit_id)
* This procedure returns the abbreviation of the unit (\"in\" for
* inches).
*
- * Returns: The unit's abbreviation.
+ * Returns: (transfer full) The unit's abbreviation.
**/
gchar *
_gimp_unit_get_abbreviation (GimpUnit unit_id)
@@ -409,7 +409,7 @@ _gimp_unit_get_abbreviation (GimpUnit unit_id)
*
* This procedure returns the singular form of the unit.
*
- * Returns: The unit's singular form.
+ * Returns: (transfer full) The unit's singular form.
**/
gchar *
_gimp_unit_get_singular (GimpUnit unit_id)
@@ -442,7 +442,7 @@ _gimp_unit_get_singular (GimpUnit unit_id)
*
* This procedure returns the plural form of the unit.
*
- * Returns: The unit's plural form.
+ * Returns: (transfer full) The unit's plural form.
**/
gchar *
_gimp_unit_get_plural (GimpUnit unit_id)
diff --git a/libgimp/gimpvectors_pdb.c b/libgimp/gimpvectors_pdb.c
index 2ae2de9dc3..36fcee1f6f 100644
--- a/libgimp/gimpvectors_pdb.c
+++ b/libgimp/gimpvectors_pdb.c
@@ -161,7 +161,7 @@ gimp_vectors_copy (gint32 vectors_ID)
* Returns an Array with the stroke-IDs associated with the passed
* path.
*
- * Returns: List of the strokes belonging to the path.
+ * Returns: (transfer full) List of the strokes belonging to the path.
*
* Since: 2.4
**/
@@ -634,7 +634,7 @@ gimp_vectors_stroke_flip_free (gint32 vectors_ID,
* @vectors_ID: The vectors object.
* @stroke_id: The stroke ID.
* @num_points: The number of floats returned.
- * @controlpoints: List of the control points for the stroke (x0, y0, x1, y1, ...).
+ * @controlpoints: (transfer full) List of the control points for the stroke (x0, y0, x1, y1, ...).
* @closed: Whether the stroke is closed or not.
*
* returns the control points of a stroke.
@@ -755,7 +755,8 @@ gimp_vectors_stroke_new_from_points (gint32 vectors_ID,
*
* returns polygonal approximation of the stroke.
*
- * Returns: List of the coords along the path (x0, y0, x1, y1, ...).
+ * Returns: (transfer full) List of the coords along the path (x0, y0,
+ * x1, y1, ...).
*
* Since: 2.4
**/
@@ -1065,7 +1066,7 @@ gimp_vectors_bezier_stroke_new_ellipse (gint32 vectors_ID,
* @merge: Merge paths into a single vectors object.
* @scale: Scale the SVG to image dimensions.
* @num_vectors: The number of newly created vectors.
- * @vectors_ids: The list of newly created vectors.
+ * @vectors_ids: (transfer full) The list of newly created vectors.
*
* Import paths from an SVG file.
*
@@ -1126,7 +1127,7 @@ gimp_vectors_import_from_file (gint32 image_ID,
* @merge: Merge paths into a single vectors object.
* @scale: Scale the SVG to image dimensions.
* @num_vectors: The number of newly created vectors.
- * @vectors_ids: The list of newly created vectors.
+ * @vectors_ids: (transfer full) The list of newly created vectors.
*
* Import paths from an SVG string.
*
@@ -1240,7 +1241,8 @@ gimp_vectors_export_to_file (gint32 image_ID,
* string that holds a complete XML document. If you pass 0 as the
* 'vectors' argument, then all paths in the image will be exported.
*
- * Returns: A string whose contents are a complete SVG document.
+ * Returns: (transfer full) A string whose contents are a complete SVG
+ * document.
*
* Since: 2.6
**/
diff --git a/pdb/lib.pl b/pdb/lib.pl
index 8970479dba..63743dd482 100644
--- a/pdb/lib.pl
+++ b/pdb/lib.pl
@@ -120,11 +120,17 @@ sub generate {
my $rettype;
if ($retarg) {
+ my ($type) = &arg_parse($retarg->{type});
+ my $argtype = $arg_types{$type};
$rettype = &libtype($retarg, 1);
chop $rettype unless $rettype =~ /\*$/;
$retarg->{retval} = 1;
+ if (exists $argtype->{return_annotate}) {
+ $retdesc .= "$argtype->{return_annotate} ";
+ }
+
$retdesc .= exists $retarg->{desc} ? $retarg->{desc} : "";
if ($retarg->{type} eq 'stringarray') {
@@ -320,7 +326,13 @@ CODE
$argdesc .= " * \@$_->{libname}";
$argdesc .= '_ID' if $arg->{id};
- $argdesc .= ": $desc";
+
+ if (exists $arg->{return_annotate}) {
+ $argdesc .= ": $arg->{return_annotate} $desc";
+ }
+ else {
+ $argdesc .= ": $desc";
+ }
}
$var = exists $_->{retval} ? "" : '*';
diff --git a/pdb/pdb.pl b/pdb/pdb.pl
index 980f631d5c..301cced7e8 100644
--- a/pdb/pdb.pl
+++ b/pdb/pdb.pl
@@ -62,6 +62,7 @@ package Gimp::CodeGen::pdb;
type => 'gchar *',
const_type => 'const gchar *',
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = g_value_get_string ($value)',
dup_value_func => '$var = g_value_dup_string ($value)',
set_value_func => 'g_value_set_string ($value, $var)',
@@ -73,6 +74,7 @@ package Gimp::CodeGen::pdb;
const_type => 'const gint32 *',
array => 1,
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = gimp_value_get_int32_array ($value)',
dup_value_func => '$var = gimp_value_dup_int32_array ($value)',
set_value_func => 'gimp_value_set_int32_array ($value, $var, $var_len)',
@@ -84,6 +86,7 @@ package Gimp::CodeGen::pdb;
const_type => 'const gint16 *',
array => 1,
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = gimp_value_get_int16_array ($value)',
dup_value_func => '$var = gimp_value_dup_int16_array ($value)',
set_value_func => 'gimp_value_set_int16_array ($value, $var, $var_len)',
@@ -95,6 +98,7 @@ package Gimp::CodeGen::pdb;
const_type => 'const guint8 *',
array => 1,
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = gimp_value_get_int8_array ($value)',
dup_value_func => '$var = gimp_value_dup_int8_array ($value)',
set_value_func => 'gimp_value_set_int8_array ($value, $var, $var_len)',
@@ -106,6 +110,7 @@ package Gimp::CodeGen::pdb;
const_type => 'const gdouble *',
array => 1,
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = gimp_value_get_float_array ($value)',
dup_value_func => '$var = gimp_value_dup_float_array ($value)',
set_value_func => 'gimp_value_set_float_array ($value, $var, $var_len)',
@@ -117,6 +122,7 @@ package Gimp::CodeGen::pdb;
const_type => 'const gchar **',
array => 1,
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = gimp_value_get_string_array ($value)',
dup_value_func => '$var = gimp_value_dup_string_array ($value)',
set_value_func => 'gimp_value_set_string_array ($value, $var, $var_len)',
@@ -128,6 +134,7 @@ package Gimp::CodeGen::pdb;
const_type => 'const GimpRGB *',
array => 1,
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = gimp_value_get_rgb_array ($value)',
dup_value_func => '$var = gimp_value_dup_rgb_array ($value)',
set_value_func => 'gimp_value_set_rgb_array ($value, $var, $var_len)',
@@ -257,6 +264,7 @@ package Gimp::CodeGen::pdb;
type => 'GimpParasite *',
const_type => 'const GimpParasite *',
init_value => 'NULL',
+ return_annotate => '(transfer full)',
get_value_func => '$var = g_value_get_boxed ($value)',
dup_value_func => '$var = g_value_dup_boxed ($value)',
set_value_func => 'g_value_set_boxed ($value, $var)',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]