[gimp] gir: More missing annotations



commit 57d3837e4088b81b465d4508d7f8447376ff50d8
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri May 8 16:57:45 2020 +0200

    gir: More missing annotations
    
    Especially need to watch out with forgetting `(array)` and `(out)`
    annotations, as they can really give a different API in certain (if not
    most) bindings.

 libgimp/gimpbrushselect.h   | 13 ++++++++++++-
 libgimp/gimpdrawable.c      |  4 ++--
 libgimp/gimpimage.c         |  2 +-
 libgimp/gimppatternselect.h | 10 +++++++++-
 libgimp/gimpzoompreview.c   |  4 ++--
 libgimpbase/gimpchecks.c    |  4 ++--
 libgimpconfig/gimpscanner.c |  2 +-
 7 files changed, 29 insertions(+), 10 deletions(-)
---
diff --git a/libgimp/gimpbrushselect.h b/libgimp/gimpbrushselect.h
index c15bdc249d..c62c3c7b1d 100644
--- a/libgimp/gimpbrushselect.h
+++ b/libgimp/gimpbrushselect.h
@@ -27,7 +27,18 @@
 
 G_BEGIN_DECLS
 
-
+/**
+ * GimpRunBrushCallback:
+ * @brush_name: Name of the brush
+ * @opacity: Opacity
+ * @spacing: Spacing
+ * @paint_mode: Paint mode
+ * @width: width
+ * @height: height
+ * @mask_data: (array): Mask data
+ * @dialog_closing: Dialog closing?
+ * @user_data: (closure): user data
+ */
 typedef void (* GimpRunBrushCallback)   (const gchar          *brush_name,
                                          gdouble               opacity,
                                          gint                  spacing,
diff --git a/libgimp/gimpdrawable.c b/libgimp/gimpdrawable.c
index 9adddc4fa2..b7074b08ae 100644
--- a/libgimp/gimpdrawable.c
+++ b/libgimp/gimpdrawable.c
@@ -87,7 +87,7 @@ gimp_drawable_get_by_id (gint32 drawable_id)
  * Retrieves thumbnail data for the drawable identified by @drawable.
  * The thumbnail will be not larger than the requested size.
  *
- * Returns: (transfer full) (nullable): thumbnail data or %NULL if
+ * Returns: (transfer full) (array) (nullable): thumbnail data or %NULL if
  *          @drawable is invalid.
  **/
 guchar *
@@ -172,7 +172,7 @@ gimp_drawable_get_thumbnail (GimpDrawable           *drawable,
  * Retrieves thumbnail data for the drawable identified by @drawable.
  * The thumbnail will be not larger than the requested size.
  *
- * Returns: (transfer full) (nullable): thumbnail data or %NULL if
+ * Returns: (transfer full) (array) (nullable): thumbnail data or %NULL if
  *          @drawable is invalid.
  **/
 guchar *
diff --git a/libgimp/gimpimage.c b/libgimp/gimpimage.c
index a319b0dc4a..4f6ac55126 100644
--- a/libgimp/gimpimage.c
+++ b/libgimp/gimpimage.c
@@ -388,7 +388,7 @@ gimp_image_set_colormap (GimpImage    *image,
  * are returned in RGB[A] or GRAY[A] format. The bpp return value
  * gives the number of bytes per pixel in the image.
  *
- * Returns: (transfer full): the thumbnail data.
+ * Returns: (array) (transfer full): the thumbnail data.
  **/
 guchar *
 gimp_image_get_thumbnail_data (GimpImage *image,
diff --git a/libgimp/gimppatternselect.h b/libgimp/gimppatternselect.h
index 3de72fc03d..90d7508206 100644
--- a/libgimp/gimppatternselect.h
+++ b/libgimp/gimppatternselect.h
@@ -27,7 +27,15 @@
 
 G_BEGIN_DECLS
 
-
+/**
+ * GimpRunPatternCallback:
+ * @width: width
+ * @height: height
+ * @bpp: bytes per pixel
+ * @mask_data: (array): Mask data
+ * @dialog_closing: Dialog closing?
+ * @user_data: (closure): user data
+ */
 typedef void (* GimpRunPatternCallback)   (const gchar  *pattern_name,
                                            gint          width,
                                            gint          height,
diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c
index ea1648ca2d..917803efcb 100644
--- a/libgimp/gimpzoompreview.c
+++ b/libgimp/gimpzoompreview.c
@@ -884,8 +884,8 @@ gimp_zoom_preview_get_factor (GimpZoomPreview *preview)
  * This function also allow to get the current width, height and bpp of the
  * #GimpZoomPreview.
  *
- * Returns: (array): newly allocated data that should be released using g_free()
- *                   when it is not any longer needed
+ * Returns: (transfer full) (array): newly allocated data that should be
+ *          released using g_free() when it is not any longer needed
  *
  * Since: 2.4
  */
diff --git a/libgimpbase/gimpchecks.c b/libgimpbase/gimpchecks.c
index 589bf6faca..a393b23164 100644
--- a/libgimpbase/gimpchecks.c
+++ b/libgimpbase/gimpchecks.c
@@ -41,8 +41,8 @@
 /**
  * gimp_checks_get_shades:
  * @type:  the checkerboard type
- * @light: return location for the light shade
- * @dark:  return location for the dark shade
+ * @light: (out) (optional): return location for the light shade
+ * @dark:  (out) (optional): return location for the dark shade
  *
  * Retrieves the actual shades of gray to use when drawing a
  * checkerboard for a certain #GimpCheckType.
diff --git a/libgimpconfig/gimpscanner.c b/libgimpconfig/gimpscanner.c
index 110c099c78..15dad89081 100644
--- a/libgimpconfig/gimpscanner.c
+++ b/libgimpconfig/gimpscanner.c
@@ -465,7 +465,7 @@ gimp_scanner_parse_string_no_validate (GimpScanner  *scanner,
  * @scanner: A #GimpScanner created by gimp_scanner_new_file() or
  *           gimp_scanner_new_string()
  * @length: Length of the data to parse
- * @dest: (out): Return location for the parsed data
+ * @dest: (out) (array): Return location for the parsed data
  *
  * Returns: %TRUE on success
  *


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