[gimp] gir: Fix some missing (out) annotations



commit c2d4e7d2655267b261b3ac692de20137c8078aa1
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon May 18 13:24:59 2020 +0200

    gir: Fix some missing (out) annotations

 libgimpcolor/gimprgb.c               | 22 ++++++++++++++++------
 libgimpwidgets/gimpnumberpairentry.c |  8 ++++----
 libgimpwidgets/gimpscrolledpreview.c |  6 ++++++
 3 files changed, 26 insertions(+), 10 deletions(-)
---
diff --git a/libgimpcolor/gimprgb.c b/libgimpcolor/gimprgb.c
index ae97a2b348..4fe984a294 100644
--- a/libgimpcolor/gimprgb.c
+++ b/libgimpcolor/gimprgb.c
@@ -193,17 +193,27 @@ gimp_rgb_set_uchar (GimpRGB *rgb,
   rgb->b = (gdouble) b / 255.0;
 }
 
+/**
+ * gimp_rgb_get_uchar:
+ * @rgb: a #GimpRGB struct
+ * @red: (out) (optional): Location for red component, or %NULL
+ * @green: (out) (optional): Location for green component, or %NULL
+ * @blue: (out) (optional): Location for blue component, or %NULL
+ *
+ * Writes the red, green, blue and alpha components of @rgb to the
+ * color components @red, @green and @blue.
+ */
 void
 gimp_rgb_get_uchar (const GimpRGB *rgb,
-                    guchar        *r,
-                    guchar        *g,
-                    guchar        *b)
+                    guchar        *red,
+                    guchar        *green,
+                    guchar        *blue)
 {
   g_return_if_fail (rgb != NULL);
 
-  if (r) *r = ROUND (CLAMP (rgb->r, 0.0, 1.0) * 255.0);
-  if (g) *g = ROUND (CLAMP (rgb->g, 0.0, 1.0) * 255.0);
-  if (b) *b = ROUND (CLAMP (rgb->b, 0.0, 1.0) * 255.0);
+  if (red)   *red   = ROUND (CLAMP (rgb->r, 0.0, 1.0) * 255.0);
+  if (green) *green = ROUND (CLAMP (rgb->g, 0.0, 1.0) * 255.0);
+  if (blue)  *blue  = ROUND (CLAMP (rgb->b, 0.0, 1.0) * 255.0);
 }
 
 void
diff --git a/libgimpwidgets/gimpnumberpairentry.c b/libgimpwidgets/gimpnumberpairentry.c
index 1b4dd99755..de42d97e2a 100644
--- a/libgimpwidgets/gimpnumberpairentry.c
+++ b/libgimpwidgets/gimpnumberpairentry.c
@@ -586,8 +586,8 @@ gimp_number_pair_entry_set_values (GimpNumberPairEntry *entry,
 /**
  * gimp_number_pair_entry_get_values:
  * @entry: A #GimpNumberPairEntry widget.
- * @left:  Pointer of where to store the left number (may be %NULL).
- * @right: Pointer of to store the right number (may be %NULL).
+ * @left:  (out) (optional): Location to store the left number (may be %NULL).
+ * @right: (out) (optional): Location to store the right number (may be %NULL).
  *
  * Gets the numbers displayed by a #GimpNumberPairEntry.
  *
@@ -1243,8 +1243,8 @@ gimp_number_pair_entry_set_default_values (GimpNumberPairEntry *entry,
 /**
  * gimp_number_pair_entry_get_default_values:
  * @entry: A #GimpNumberPairEntry widget.
- * @left:  Pointer of where to put left value.
- * @right: Pointer of where to put right value.
+ * @left:  (out) (optional): Location to put the default left value, or %NULL.
+ * @right: (out) (optional): Location to put the default right value, or %NULL.
  *
  * Since: 2.4
  **/
diff --git a/libgimpwidgets/gimpscrolledpreview.c b/libgimpwidgets/gimpscrolledpreview.c
index cb63cf1163..d35b93b482 100644
--- a/libgimpwidgets/gimpscrolledpreview.c
+++ b/libgimpwidgets/gimpscrolledpreview.c
@@ -859,6 +859,12 @@ gimp_scrolled_preview_set_policy (GimpScrolledPreview *preview,
   gtk_widget_queue_resize (gimp_preview_get_area (GIMP_PREVIEW (preview)));
 }
 
+/**
+ * gimp_scrolled_preview_get_adjustments:
+ * @preview: a #GimpScrolledPreview
+ * @hadj: (out) (transfer none): Horizontal adjustment
+ * @vadj: (out) (transfer none): Vertical adjustment
+ */
 void
 gimp_scrolled_preview_get_adjustments (GimpScrolledPreview  *preview,
                                        GtkAdjustment       **hadj,


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