[gtk/wip/dboles/scrolledwindow-annotations: 2/2] ScrolledWindow: Annotate h|vadjustment as nullable
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/dboles/scrolledwindow-annotations: 2/2] ScrolledWindow: Annotate h|vadjustment as nullable
- Date: Tue, 21 May 2019 20:25:23 +0000 (UTC)
commit 7575d5216f9bdc6519719852593629eb7ab21941
Author: Daniel Boles <dboles src gmail com>
Date: Tue May 21 20:26:49 2019 +0100
ScrolledWindow: Annotate h|vadjustment as nullable
The code interprets NULL to mean 'create a new Adjustment and use that,
deposing the old one', but we neither documented nor annotated that
ability, so users could be unsure how to "unlink" a specific Adjustment.
While users could pass their own Adjustment in if this wasn't nullable,
we already support NULL in the code, and it doesn't hurt to document
that this is available as a convenience while retaining the behaviour.
gtk/gtkscrolledwindow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 1a1c03b4ae..1a87169b71 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2032,7 +2032,7 @@ gtk_scrolled_window_new (GtkAdjustment *hadjustment,
/**
* gtk_scrolled_window_set_hadjustment:
* @scrolled_window: a #GtkScrolledWindow
- * @hadjustment: horizontal scroll adjustment
+ * @hadjustment: (nullable): the #GtkAdjustment to use, or %NULL to create a new one
*
* Sets the #GtkAdjustment for the horizontal scrollbar.
*/
@@ -2106,7 +2106,7 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
/**
* gtk_scrolled_window_set_vadjustment:
* @scrolled_window: a #GtkScrolledWindow
- * @vadjustment: vertical scroll adjustment
+ * @vadjustment: (nullable): the #GtkAdjustment to use, or %NULL to create a new one
*
* Sets the #GtkAdjustment for the vertical scrollbar.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]