[gimp] gir: Add more (out) annotations



commit db0493aa0df611f5ce2de28c49b06e13b58c7170
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sun May 3 17:57:23 2020 +0200

    gir: Add more (out) annotations
    
    This will change the API for some bindings, so we probably want to do it
    before a release.

 app/core/gimpsymmetry.c        |  4 ++--
 libgimp/gimpzoompreview.c      |  6 +++---
 libgimpbase/gimpmetadata.c     |  6 +++---
 libgimpwidgets/gimppreview.c   |  8 ++++----
 libgimpwidgets/gimpruler.c     | 11 +++++++----
 libgimpwidgets/gimpzoommodel.c |  4 ++--
 6 files changed, 21 insertions(+), 18 deletions(-)
---
diff --git a/app/core/gimpsymmetry.c b/app/core/gimpsymmetry.c
index 15d281a0ab..0d1ac16c35 100644
--- a/app/core/gimpsymmetry.c
+++ b/app/core/gimpsymmetry.c
@@ -401,9 +401,9 @@ gimp_symmetry_get_coords (GimpSymmetry *sym,
  * gimp_symmetry_get_transform:
  * @sym:     the #GimpSymmetry
  * @stroke:  the stroke number
- * @angle:   output pointer to the transformation rotation angle,
+ * @angle: (out): output pointer to the transformation rotation angle,
  *           in degrees (ccw)
- * @reflect: output pointer to the transformation reflection flag
+ * @reflect: (out): output pointer to the transformation reflection flag
  *
  * Returns: the transformation to apply to the paint content for stroke
  * number @stroke.  The transformation is comprised of rotation, possibly
diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c
index 42d81760ea..7b2c6ad8d8 100644
--- a/libgimp/gimpzoompreview.c
+++ b/libgimp/gimpzoompreview.c
@@ -874,11 +874,11 @@ gimp_zoom_preview_get_factor (GimpZoomPreview *preview)
 /**
  * gimp_zoom_preview_get_source:
  * @preview: a #GimpZoomPreview widget
- * @width: a pointer to an int where the current width of the zoom widget
+ * @width: (out): a pointer to an int where the current width of the zoom widget
  *         will be put.
- * @height: a pointer to an int where the current width of the zoom widget
+ * @height: (out): a pointer to an int where the current width of the zoom widget
  *          will be put.
- * @bpp: return location for the number of bytes per pixel
+ * @bpp: (out): return location for the number of bytes per pixel
  *
  * Returns the scaled image data of the part of the drawable the
  * #GimpZoomPreview is currently showing, as a newly allocated array of guchar.
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index dc2bf0167f..d2f376ac97 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -1200,9 +1200,9 @@ gimp_metadata_set_bits_per_sample (GimpMetadata *metadata,
 /**
  * gimp_metadata_get_resolution:
  * @metadata: A #GimpMetadata instance.
- * @xres:     Return location for the X Resolution, in ppi
- * @yres:     Return location for the Y Resolution, in ppi
- * @unit:     Return location for the unit unit
+ * @xres: (out) (optional): Return location for the X Resolution, in ppi
+ * @yres: (out) (optional): Return location for the Y Resolution, in ppi
+ * @unit: (out) (optional): Return location for the unit unit
  *
  * Returns values based on Exif.Image.XResolution,
  * Exif.Image.YResolution and Exif.Image.ResolutionUnit of @metadata.
diff --git a/libgimpwidgets/gimppreview.c b/libgimpwidgets/gimppreview.c
index 04ba73e253..4b0ae0df0f 100644
--- a/libgimpwidgets/gimppreview.c
+++ b/libgimpwidgets/gimppreview.c
@@ -656,8 +656,8 @@ gimp_preview_set_size (GimpPreview *preview,
 /**
  * gimp_preview_get_size:
  * @preview: a #GimpPreview widget
- * @width:   return location for the preview area width
- * @height:  return location for the preview area height
+ * @width: (out) (optional): return location for the preview area width
+ * @height: (out) (optional): return location for the preview area height
  *
  * Since: 2.2
  **/
@@ -709,8 +709,8 @@ gimp_preview_get_offsets (GimpPreview *preview,
 /**
  * gimp_preview_get_position:
  * @preview: a #GimpPreview widget
- * @x:       return location for the horizontal offset
- * @y:       return location for the vertical offset
+ * @x: (out) (optional): return location for the horizontal offset
+ * @y: (out) (optional): return location for the vertical offset
  *
  * Since: 2.2
  **/
diff --git a/libgimpwidgets/gimpruler.c b/libgimpwidgets/gimpruler.c
index c4307b5572..965af0b2f7 100644
--- a/libgimpwidgets/gimpruler.c
+++ b/libgimpwidgets/gimpruler.c
@@ -756,10 +756,13 @@ gimp_ruler_set_range (GimpRuler *ruler,
 /**
  * gimp_ruler_get_range:
  * @ruler: a #GimpRuler
- * @lower: location to store lower limit of the ruler, or %NULL
- * @upper: location to store upper limit of the ruler, or %NULL
- * @max_size: location to store the maximum size of the ruler used when
- *            calculating the space to leave for the text, or %NULL.
+ * @lower: (out) (optional): location to store lower limit of the ruler,
+ *                           or %NULL
+ * @upper: (out) (optional): location to store upper limit of the ruler,
+ *                           or %NULL
+ * @max_size: (out) (optional): location to store the maximum size of the ruler
+ *                              used when calculating the space to leave for
+ *                              the text, or %NULL.
  *
  * Retrieves values indicating the range and current position of a #GimpRuler.
  * See gimp_ruler_set_range().
diff --git a/libgimpwidgets/gimpzoommodel.c b/libgimpwidgets/gimpzoommodel.c
index 0f64ea38ae..07f8ef5c07 100644
--- a/libgimpwidgets/gimpzoommodel.c
+++ b/libgimpwidgets/gimpzoommodel.c
@@ -404,8 +404,8 @@ gimp_zoom_model_get_factor (GimpZoomModel *model)
 /**
  * gimp_zoom_model_get_fraction
  * @model:       a #GimpZoomModel
- * @numerator:   return location for numerator
- * @denominator: return location for denominator
+ * @numerator: (out): return location for numerator
+ * @denominator: (out): return location for denominator
  *
  * Retrieves the current zoom factor of @model as a fraction.
  *


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