[gimp] libgimp*: fix various missing (transfer) annotations.



commit 6fe250830124db6fac98ac2ab675ae70865da100
Author: Jehan <jehan girinstud io>
Date:   Thu Aug 1 01:52:07 2019 +0200

    libgimp*: fix various missing (transfer) annotations.

 libgimp/gimpdrawable.c          |  4 ++--
 libgimp/gimpexport.c            |  4 ++--
 libgimp/gimpgimprc.c            |  4 ++--
 libgimp/gimpimage.c             |  3 ++-
 libgimp/gimpimagecolorprofile.c |  8 ++++----
 libgimp/gimpimagemetadata.c     |  4 ++--
 libgimp/gimppixbuf.c            |  6 +++---
 libgimp/gimpprocview.c          |  3 ++-
 libgimp/gimpui.c                | 12 ++++++------
 libgimp/gimpzoompreview.c       |  3 ++-
 libgimpcolor/gimpcolormanaged.c |  2 +-
 libgimpcolor/gimpcolorprofile.c |  8 ++++----
 libgimpmath/gimpmatrix.c        |  4 ++--
 libgimpthumb/gimpthumbnail.c    |  3 ++-
 14 files changed, 36 insertions(+), 32 deletions(-)
---
diff --git a/libgimp/gimpdrawable.c b/libgimp/gimpdrawable.c
index fe841588f5..7fe6c63bea 100644
--- a/libgimp/gimpdrawable.c
+++ b/libgimp/gimpdrawable.c
@@ -94,7 +94,7 @@ gimp_drawable_get_sub_thumbnail_data (gint32  drawable_ID,
  * drawable when the buffer gets destroyed, or when gegl_buffer_flush()
  * is called.
  *
- * Return value: The #GeglBuffer.
+ * Return value: (transfer full): The #GeglBuffer.
  *
  * See Also: gimp_drawable_get_shadow_buffer()
  *
@@ -127,7 +127,7 @@ gimp_drawable_get_buffer (gint32 drawable_ID)
  * synced back with the core drawable's shadow tiles when the buffer
  * gets destroyed, or when gegl_buffer_flush() is called.
  *
- * Return value: The #GeglBuffer.
+ * Return value: (transfer full): The #GeglBuffer.
  *
  * See Also: gimp_drawable_get_shadow_buffer()
  *
diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c
index d23caef280..3a99f786dc 100644
--- a/libgimp/gimpexport.c
+++ b/libgimp/gimpexport.c
@@ -1035,7 +1035,7 @@ gimp_export_image (gint32                 *image_ID,
  * %GTK_RESPONSE_OK, and when the Cancel button is clicked it is
  * %GTK_RESPONSE_CANCEL.
  *
- * Returns: The new export dialog.
+ * Returns: (transfer full): The new export dialog.
  *
  * Since: 2.8
  **/
@@ -1076,7 +1076,7 @@ gimp_export_dialog_new (const gchar *format_name,
  * Returns the #GtkVBox of the passed export dialog to be filled with
  * export options.
  *
- * Returns: The #GtkVBox to fill with export options.
+ * Returns: (transfer none): The #GtkVBox to fill with export options.
  *
  * Since: 2.8
  **/
diff --git a/libgimp/gimpgimprc.c b/libgimp/gimpgimprc.c
index 15dcde78f3..f5309643af 100644
--- a/libgimp/gimpgimprc.c
+++ b/libgimp/gimpgimprc.c
@@ -28,8 +28,8 @@
  *
  * Retrieve a copy of the current color management configuration.
  *
- * Returns: A copy of the core's #GimpColorConfig. You should unref
- *          this copy if you don't need it any longer.
+ * Returns: (transfer full): A copy of the core's #GimpColorConfig. You
+ *          should unref this copy if you don't need it any longer.
  *
  * Since: 2.4
  */
diff --git a/libgimp/gimpimage.c b/libgimp/gimpimage.c
index e765711485..a60b74d650 100644
--- a/libgimp/gimpimage.c
+++ b/libgimp/gimpimage.c
@@ -108,7 +108,8 @@ gimp_image_get_thumbnail_data (gint32  image_ID,
  *
  * Returns exif/iptc/xmp metadata from the image.
  *
- * Returns: The exif/ptc/xmp metadata, or %NULL if there is none.
+ * Returns: (transfer full): The exif/ptc/xmp metadata, or %NULL if
+ *          there is none.
  *
  * Since: 2.10
  **/
diff --git a/libgimp/gimpimagecolorprofile.c b/libgimp/gimpimagecolorprofile.c
index 0968445c3e..d2ffb7bb4a 100644
--- a/libgimp/gimpimagecolorprofile.c
+++ b/libgimp/gimpimagecolorprofile.c
@@ -32,8 +32,8 @@
  * This procedure returns the image's color profile, or NULL if the
  * image has no color profile assigned.
  *
- * Returns: The image's color profile. The returned value
- *          must be freed with g_object_unref().
+ * Returns: (transfer full): The image's color profile. The returned
+ *          value must be freed with g_object_unref().
  *
  * Since: 2.10
  **/
@@ -105,8 +105,8 @@ gimp_image_set_color_profile (gint32            image_ID,
  * assigned to the image. If there is no default RGB profile configured
  * in preferences either, a generated default RGB profile is returned.
  *
- * Returns: The color profile. The returned value
- *          must be freed with g_object_unref().
+ * Returns: (transfer full): The color profile. The returned value must
+ *          be freed with g_object_unref().
  *
  * Since: 2.10
  **/
diff --git a/libgimp/gimpimagemetadata.c b/libgimp/gimpimagemetadata.c
index f5f5e98603..a9ee960bff 100644
--- a/libgimp/gimpimagemetadata.c
+++ b/libgimp/gimpimagemetadata.c
@@ -65,7 +65,7 @@ static gboolean    gimp_image_metadata_rotate_dialog (gint32             image_I
  * Loads and returns metadata from @file to be passed into
  * gimp_image_metadata_load_finish().
  *
- * Returns: The file's metadata.
+ * Returns: (transfer full): The file's metadata.
  *
  * Since: 2.10
  */
@@ -220,7 +220,7 @@ gimp_image_metadata_load_finish (gint32                 image_ID,
  * The suggested value for GIMP_METADATA_SAVE_THUMBNAIL is determined by
  * whether there was a thumbnail in the previously imported image.
  *
- * Returns: The image's metadata, prepared for saving.
+ * Returns: (transfer full): The image's metadata, prepared for saving.
  *
  * Since: 2.10
  */
diff --git a/libgimp/gimppixbuf.c b/libgimp/gimppixbuf.c
index bd3cb46ab6..455e5bd01b 100644
--- a/libgimp/gimppixbuf.c
+++ b/libgimp/gimppixbuf.c
@@ -52,7 +52,7 @@ static GdkPixbuf * gimp_pixbuf_from_data (guchar                 *data,
  * Retrieves a thumbnail pixbuf for the image identified by @image_ID.
  * The thumbnail will be not larger than the requested size.
  *
- * Return value: a new #GdkPixbuf
+ * Return value: (transfer full): a new #GdkPixbuf
  *
  * Since: 2.2
  **/
@@ -93,7 +93,7 @@ gimp_image_get_thumbnail (gint32                  image_ID,
  * @drawable_ID. The thumbnail will be not larger than the requested
  * size.
  *
- * Return value: a new #GdkPixbuf
+ * Return value: (transfer full): a new #GdkPixbuf
  *
  * Since: 2.2
  **/
@@ -139,7 +139,7 @@ gimp_drawable_get_thumbnail (gint32                  drawable_ID,
  * @drawable_ID. The thumbnail will be not larger than the requested
  * size.
  *
- * Return value: a new #GdkPixbuf
+ * Return value: (transfer full): a new #GdkPixbuf
  *
  * Since: 2.2
  **/
diff --git a/libgimp/gimpprocview.c b/libgimp/gimpprocview.c
index cd305c66ee..04fcc18696 100644
--- a/libgimp/gimpprocview.c
+++ b/libgimp/gimpprocview.c
@@ -79,7 +79,8 @@ static GtkWidget * gimp_proc_view_create_params (const GimpParamDef *params,
  * @params:
  * @return_vals:
  *
- * Return value: a new widget providing a view on a GIMP procedure
+ * Return value: (transfer full): a new widget providing a view on a
+ *               GIMP procedure
  *
  * Since: 2.4
  **/
diff --git a/libgimp/gimpui.c b/libgimp/gimpui.c
index 863b768d0e..9118e0e0cf 100644
--- a/libgimp/gimpui.c
+++ b/libgimp/gimpui.c
@@ -204,9 +204,9 @@ gimp_ui_get_foreign_window (guint32 window)
  * You shouldn't have to call this function directly. Use
  * gimp_window_set_transient_for_display() instead.
  *
- * Return value: A reference to a #GdkWindow or %NULL. You should
- *               unref the window using g_object_unref() as soon as
- *               you don't need it any longer.
+ * Return value: (transfer full): A reference to a #GdkWindow or %NULL.
+ *               You should unref the window using g_object_unref() as
+ *               soon as you don't need it any longer.
  *
  * Since: 2.4
  */
@@ -234,9 +234,9 @@ gimp_ui_get_display_window (guint32 gdisp_ID)
  * You shouldn't have to call this function directly. Use
  * gimp_window_set_transient() instead.
  *
- * Return value: A reference to a #GdkWindow or %NULL. You should
- *               unref the window using g_object_unref() as soon as
- *               you don't need it any longer.
+ * Return value: (transfer full): A reference to a #GdkWindow or %NULL.
+ *               You should unref the window using g_object_unref() as
+ *               soon as you don't need it any longer.
  *
  * Since: 2.4
  */
diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c
index 638b32fb6e..cfdc47a8be 100644
--- a/libgimp/gimpzoompreview.c
+++ b/libgimp/gimpzoompreview.c
@@ -836,7 +836,8 @@ gimp_zoom_preview_get_drawable_id (GimpZoomPreview *preview)
  *
  * Returns the #GimpZoomModel the preview is using.
  *
- * Return Value: a pointer to the #GimpZoomModel owned by the @preview
+ * Return Value: (transfer none): a pointer to the #GimpZoomModel owned
+ *               by the @preview
  *
  * Since: 2.4
  **/
diff --git a/libgimpcolor/gimpcolormanaged.c b/libgimpcolor/gimpcolormanaged.c
index 91fdee8807..bddf312ca0 100644
--- a/libgimpcolor/gimpcolormanaged.c
+++ b/libgimpcolor/gimpcolormanaged.c
@@ -109,7 +109,7 @@ gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
  * This function always returns a #GimpColorProfile and falls back to
  * gimp_color_profile_new_rgb_srgb() if the method is not implemented.
  *
- * Return value: The @managed's #GimpColorProfile.
+ * Return value: (transfer full): The @managed's #GimpColorProfile.
  *
  * Since: 2.10
  **/
diff --git a/libgimpcolor/gimpcolorprofile.c b/libgimpcolor/gimpcolorprofile.c
index 5c150cffa6..eccd160816 100644
--- a/libgimpcolor/gimpcolorprofile.c
+++ b/libgimpcolor/gimpcolorprofile.c
@@ -1010,8 +1010,8 @@ gimp_color_profile_new_from_color_profile (GimpColorProfile *profile,
  * This function creates a new RGB #GimpColorProfile with a sRGB gamma
  * TRC and @profile's RGB chromacities and whitepoint.
  *
- * Return value: the new #GimpColorProfile, or %NULL if @profile is not
- *               an RGB profile or not matrix-based.
+ * Return value: (transfer full): the new #GimpColorProfile, or %NULL if
+ *               @profile is not an RGB profile or not matrix-based.
  *
  * Since: 2.10
  **/
@@ -1030,8 +1030,8 @@ gimp_color_profile_new_srgb_trc_from_color_profile (GimpColorProfile *profile)
  * This function creates a new RGB #GimpColorProfile with a linear TRC
  * and @profile's RGB chromacities and whitepoint.
  *
- * Return value: the new #GimpColorProfile, or %NULL if @profile is not
- *               an RGB profile or not matrix-based.
+ * Return value: (transfer full): the new #GimpColorProfile, or %NULL if
+ *               @profile is not an RGB profile or not matrix-based.
  *
  * Since: 2.10
  **/
diff --git a/libgimpmath/gimpmatrix.c b/libgimpmath/gimpmatrix.c
index 4e058ded48..8ede5b26f6 100644
--- a/libgimpmath/gimpmatrix.c
+++ b/libgimpmath/gimpmatrix.c
@@ -193,7 +193,7 @@ gimp_param_matrix2_values_cmp (GParamSpec   *pspec,
  * Creates a param spec to hold a #GimpMatrix2 value.
  * See g_param_spec_internal() for more information.
  *
- * Returns: a newly allocated #GParamSpec instance
+ * Returns: (transfer full): a newly allocated #GParamSpec instance
  *
  * Since: 2.4
  **/
@@ -411,7 +411,7 @@ gimp_param_matrix3_values_cmp (GParamSpec   *pspec,
  * Creates a param spec to hold a #GimpMatrix3 value.
  * See g_param_spec_internal() for more information.
  *
- * Returns: a newly allocated #GParamSpec instance
+ * Returns: (transfer full): a newly allocated #GParamSpec instance
  *
  * Since: 2.8
  **/
diff --git a/libgimpthumb/gimpthumbnail.c b/libgimpthumb/gimpthumbnail.c
index c153f6d1bb..99124eb82c 100644
--- a/libgimpthumb/gimpthumbnail.c
+++ b/libgimpthumb/gimpthumbnail.c
@@ -969,7 +969,8 @@ gimp_thumbnail_debug_notify (GObject    *object,
  * In order to verify if the preview is uptodate, you should check the
  * "thumb_state" property after calling this function.
  *
- * Return value: a preview pixbuf or %NULL if no thumbnail was found
+ * Return value: (transfer full): a preview pixbuf or %NULL if no
+ *               thumbnail was found
  **/
 GdkPixbuf *
 gimp_thumbnail_load_thumb (GimpThumbnail  *thumbnail,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]