[gimp] gir: Add more missing (array) and (out) annotations
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] gir: Add more missing (array) and (out) annotations
- Date: Mon, 4 May 2020 19:30:18 +0000 (UTC)
commit 7f58f2d6e5e3dd44df168255b7cda80a6c5c1a1b
Author: Niels De Graef <niels degraef barco com>
Date: Mon May 4 21:29:42 2020 +0200
gir: Add more missing (array) and (out) annotations
libgimp/gimpbrushselectbutton.c | 2 +-
libgimpbase/gimpparamspecs.c | 6 ++++++
libgimpbase/gimputils.c | 3 ++-
libgimpcolor/gimprgb.c | 12 +++++++++++-
libgimpconfig/gimpconfig-iface.c | 2 +-
libgimpwidgets/gimpintcombobox.c | 2 +-
libgimpwidgets/gimppreviewarea.c | 26 +++++++++++++++++---------
7 files changed, 39 insertions(+), 14 deletions(-)
---
diff --git a/libgimp/gimpbrushselectbutton.c b/libgimp/gimpbrushselectbutton.c
index 07f982b9c8..f3cce9cc44 100644
--- a/libgimp/gimpbrushselectbutton.c
+++ b/libgimp/gimpbrushselectbutton.c
@@ -243,7 +243,7 @@ gimp_brush_select_button_class_init (GimpBrushSelectButtonClass *klass)
* @paint_mode: paint mode of the brush
* @width: width of the brush
* @height: height of the brush
- * @mask_data: brush mask data
+ * @mask_data: (array) (element-type guchar): brush mask data
* @dialog_closing: whether the dialog was closed or not.
*
* The ::brush-set signal is emitted when the user selects a brush.
diff --git a/libgimpbase/gimpparamspecs.c b/libgimpbase/gimpparamspecs.c
index 575762d47a..7a8e086648 100644
--- a/libgimpbase/gimpparamspecs.c
+++ b/libgimpbase/gimpparamspecs.c
@@ -29,6 +29,12 @@
* GIMP_TYPE_ARRAY
*/
+/**
+ * gimp_array_new:
+ * @data: (array length=length):
+ * @length:
+ * @static_data:
+ */
GimpArray *
gimp_array_new (const guint8 *data,
gsize length,
diff --git a/libgimpbase/gimputils.c b/libgimpbase/gimputils.c
index dd46e18610..3d213e5810 100644
--- a/libgimpbase/gimputils.c
+++ b/libgimpbase/gimputils.c
@@ -1198,7 +1198,8 @@ gimp_stack_trace_available (gboolean optimal)
* gimp_stack_trace_print:
* @prog_name: the program to attach to.
* @stream: a FILE* stream.
- * @trace: location to store a newly allocated string of the trace.
+ * @trace: (out) (optional): location to store a newly allocated string of
+ * the trace.
*
* Attempts to generate a stack trace at current code position in
* @prog_name. @prog_name is mostly a helper and can be set to NULL.
diff --git a/libgimpcolor/gimprgb.c b/libgimpcolor/gimprgb.c
index 695d5e8b20..ae97a2b348 100644
--- a/libgimpcolor/gimprgb.c
+++ b/libgimpcolor/gimprgb.c
@@ -474,7 +474,7 @@ gimp_rgba_set (GimpRGB *rgba,
* @blue: the blue component
* @alpha: the alpha component
*
- * Sets the red, green, blue and alpha components of @rgb from 8bit
+ * Sets the red, green, blue and alpha components of @rgba from 8bit
* values (0 to 255).
**/
void
@@ -492,6 +492,16 @@ gimp_rgba_set_uchar (GimpRGB *rgba,
rgba->a = (gdouble) a / 255.0;
}
+/**
+ * gimp_rgba_get_uchar:
+ * @rgba: a #GimpRGB struct
+ * @red: (out) (optional): Location for the red component
+ * @green: (out) (optional): Location for the green component
+ * @blue: (out) (optional): Location for the blue component
+ * @alpha: (out) (optional): Location for the alpha component
+ *
+ * Gets the 8bit red, green, blue and alpha components of @rgba.
+ **/
void
gimp_rgba_get_uchar (const GimpRGB *rgba,
guchar *r,
diff --git a/libgimpconfig/gimpconfig-iface.c b/libgimpconfig/gimpconfig-iface.c
index a366a83927..4bcb9bec3f 100644
--- a/libgimpconfig/gimpconfig-iface.c
+++ b/libgimpconfig/gimpconfig-iface.c
@@ -558,7 +558,7 @@ gimp_config_deserialize_stream (GimpConfig *config,
/**
* gimp_config_deserialize_string:
* @config: a #GObject that implements the #GimpConfigInterface.
- * @text: string to deserialize (in UTF-8 encoding)
+ * @text: (array length=text_len): string to deserialize (in UTF-8 encoding)
* @text_len: length of @text in bytes or -1
* @data: client data
* @error: return location for a possible error
diff --git a/libgimpwidgets/gimpintcombobox.c b/libgimpwidgets/gimpintcombobox.c
index c77daccee1..c300d751d1 100644
--- a/libgimpwidgets/gimpintcombobox.c
+++ b/libgimpwidgets/gimpintcombobox.c
@@ -529,7 +529,7 @@ gimp_int_combo_box_set_active_by_user_data (GimpIntComboBox *combo_box,
/**
* gimp_int_combo_box_get_active_user_data:
* @combo_box: a #GimpIntComboBox
- * @user_data: return location for the gpointer value
+ * @user_data: (out): return location for the gpointer value
*
* Retrieves the user-data of the selected (active) item in the @combo_box.
*
diff --git a/libgimpwidgets/gimppreviewarea.c b/libgimpwidgets/gimppreviewarea.c
index 3f49effaee..51436f5f02 100644
--- a/libgimpwidgets/gimppreviewarea.c
+++ b/libgimpwidgets/gimppreviewarea.c
@@ -439,7 +439,7 @@ gimp_preview_area_new (void)
* @width: buffer width
* @height: buffer height
* @type: the #GimpImageType of @buf
- * @buf: a #guchar buffer that contains the preview pixel data.
+ * @buf: (array): a #guchar buffer that contains the preview pixel data.
* @rowstride: rowstride of @buf
*
* Draws @buf on @area and queues a redraw on the given rectangle.
@@ -693,11 +693,11 @@ gimp_preview_area_draw (GimpPreviewArea *area,
* @width: buffer width
* @height: buffer height
* @type: the #GimpImageType of @buf1 and @buf2
- * @buf1: a #guchar buffer that contains the pixel data for
- * the lower layer
+ * @buf1: (array): a #guchar buffer that contains the pixel data for
+ * the lower layer
* @rowstride1: rowstride of @buf1
- * @buf2: a #guchar buffer that contains the pixel data for
- * the upper layer
+ * @buf2: (array): a #guchar buffer that contains the pixel data for
+ * the upper layer
* @rowstride2: rowstride of @buf2
* @opacity: The opacity of the first layer.
*
@@ -1077,13 +1077,13 @@ gimp_preview_area_blend (GimpPreviewArea *area,
* @width: buffer width
* @height: buffer height
* @type: the #GimpImageType of @buf1 and @buf2
- * @buf1: a #guchar buffer that contains the pixel data for
+ * @buf1: (array): a #guchar buffer that contains the pixel data for
* the lower layer
* @rowstride1: rowstride of @buf1
- * @buf2: a #guchar buffer that contains the pixel data for
+ * @buf2: (array): a #guchar buffer that contains the pixel data for
* the upper layer
* @rowstride2: rowstride of @buf2
- * @mask: a #guchar buffer representing the mask of the second
+ * @mask: (array): a #guchar buffer representing the mask of the second
* layer.
* @rowstride_mask: rowstride for the mask.
*
@@ -1832,6 +1832,14 @@ gimp_preview_area_set_color_config (GimpPreviewArea *area,
}
}
+/**
+ * gimp_preview_area_get_size:
+ * @area: a #GimpPreviewArea widget.
+ * @width: (out): The preview areay width
+ * @height: (out): The preview areay height
+ *
+ * Gets the preview area size
+ */
void
gimp_preview_area_get_size (GimpPreviewArea *area,
gint *width,
@@ -1964,7 +1972,7 @@ gimp_preview_area_menu_new (GimpPreviewArea *area,
/**
* gimp_preview_area_menu_popup:
* @area: a #GimpPreviewArea
- * @event: the button event that causes the menu to popup or %NULL
+ * @event: (nullable): the button event that causes the menu to popup or %NULL
*
* Creates a popup menu that allows one to configure the size and type of
* the checkerboard pattern that the @area uses to visualize transparency.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]