[gimp] gir: Add more (out) tags when appropriate
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] gir: Add more (out) tags when appropriate
- Date: Sun, 3 May 2020 15:36:05 +0000 (UTC)
commit 5f1598f63d4022570d8b9a2777fdde38c63fa8b5
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun May 3 17:35:01 2020 +0200
gir: Add more (out) tags when appropriate
This makes a big difference for bindings, so make sure out-parameters
are properly annotated.
app/core/gimpitem.c | 14 +++++++-------
app/core/gimpviewable.c | 13 ++++++++-----
libgimpbase/gimprectangle.c | 20 ++++++++++++--------
3 files changed, 27 insertions(+), 20 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 56dfa07ada..95069b2742 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -1134,8 +1134,8 @@ gimp_item_set_size (GimpItem *item,
/**
* gimp_item_get_offset:
* @item: The #GimpItem to check.
- * @offset_x: Return location for the item's X offset.
- * @offset_y: Return location for the item's Y offset.
+ * @offset_x: (out) (optional): Return location for the item's X offset.
+ * @offset_y: (out) (optional): Return location for the item's Y offset.
*
* Reveals the X and Y offsets of the item.
*/
@@ -2584,15 +2584,15 @@ gimp_item_mask_bounds (GimpItem *item,
/**
* gimp_item_mask_intersect:
* @item: a #GimpItem
- * @x: return location for x
- * @y: return location for y
- * @width: return location for the width
- * @height: return location for the height
+ * @x: (out) (optional): return location for x
+ * @y: (out) (optional): return location for y
+ * @width: (out) (optional): return location for the width
+ * @height: (out) (optional): return location for the height
*
* Intersect the area of the @item and its image's selection mask.
* The computed area is the bounding box of he selection within the
* item.
- **/
+ */
gboolean
gimp_item_mask_intersect (GimpItem *item,
gint *x,
diff --git a/app/core/gimpviewable.c b/app/core/gimpviewable.c
index d43badf93f..19793c8481 100644
--- a/app/core/gimpviewable.c
+++ b/app/core/gimpviewable.c
@@ -725,8 +725,8 @@ gimp_viewable_get_size (GimpViewable *viewable,
* @size: requested size for preview.
* @popup: %TRUE if the preview is intended for a popup window.
* @dot_for_dot: If %TRUE, ignore any differences in X and Y resolution.
- * @width: return location for the the calculated width.
- * @height: return location for the calculated height.
+ * @width: (out) (optional): return location for the the calculated width.
+ * @height: (out) (optional): return location for the calculated height.
*
* Retrieve the size of a viewable's preview. By default, this
* simply returns the value of the @size argument for both the @width
@@ -765,8 +765,10 @@ gimp_viewable_get_preview_size (GimpViewable *viewable,
* @width: the width of the preview from which the popup will be shown.
* @height: the height of the preview from which the popup will be shown.
* @dot_for_dot: If %TRUE, ignore any differences in X and Y resolution.
- * @popup_width: return location for the calculated popup width.
- * @popup_height: return location for the calculated popup height.
+ * @popup_width: (out) (optional): return location for the calculated popup
+ * width.
+ * @popup_height: (out) (optional): return location for the calculated popup
+ * height.
*
* Calculate the size of a viewable's preview, for use in making a
* popup. The arguments @width and @height specify the size of the
@@ -1178,7 +1180,8 @@ gimp_viewable_get_dummy_pixbuf (GimpViewable *viewable,
/**
* gimp_viewable_get_description:
* @viewable: viewable object for which to retrieve a description.
- * @tooltip: return location for an optional tooltip string.
+ * @tooltip: (out) (optional) (nullable): return location for an optional
+ * tooltip string.
*
* Retrieves a string containing a description of the viewable object,
* By default, it simply returns the name of the object, but this can
diff --git a/libgimpbase/gimprectangle.c b/libgimpbase/gimprectangle.c
index c5cb0ae3ac..7f17baa719 100644
--- a/libgimpbase/gimprectangle.c
+++ b/libgimpbase/gimprectangle.c
@@ -44,10 +44,14 @@
* @y2: origin of second rectangle
* @width2: width of second rectangle
* @height2: height of second rectangle
- * @dest_x: return location for origin of intersection (may be %NULL)
- * @dest_y: return location for origin of intersection (may be %NULL)
- * @dest_width: return location for width of intersection (may be %NULL)
- * @dest_height: return location for height of intersection (may be %NULL)
+ * @dest_x: (out) (optional): return location for origin of intersection,
+ * or %NULL
+ * @dest_y: (out) (optional): return location for origin of intersection,
+ * or %NULL
+ * @dest_width: (out) (optional): return location for width of intersection,
+ * or %NULL
+ * @dest_height: (out) (optional): return location for height of intersection,
+ * or %NULL
*
* Calculates the intersection of two rectangles.
*
@@ -95,10 +99,10 @@ gimp_rectangle_intersect (gint x1,
* @y2: origin of second rectangle
* @width2: width of second rectangle
* @height2: height of second rectangle
- * @dest_x: return location for origin of union (may be %NULL)
- * @dest_y: return location for origin of union (may be %NULL)
- * @dest_width: return location for width of union (may be %NULL)
- * @dest_height: return location for height of union (may be %NULL)
+ * @dest_x: (out) (optional): return location for origin of union, or %NULL
+ * @dest_y: (out) (optional): return location for origin of union, or %NULL
+ * @dest_width: (out) (optional): return location for width of union, or %NULL
+ * @dest_height: (out) (optional): return location for height of union, or %NULL
*
* Calculates the union of two rectangles.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]