[gtk+/wip/aruiz/nullable-annotations] nullable annotations: gtk_progress_bar_get_text gtk_recent_filter_get_name gtk_recent_manager_



commit d60baf8a361a1861a8c16f9f87c84fcc69ad8f40
Author: Alberto Ruiz <aruiz gnome org>
Date:   Sun Dec 13 03:04:48 2015 +0000

    nullable annotations:
      gtk_progress_bar_get_text
      gtk_recent_filter_get_name
      gtk_recent_manager_lookup_item
      gtk_scale_get_layout
      gtk_settings_get_default
      gtk_socket_get_plug_window
      gtk_stack_sidebar_get_stack
      gtk_stack_switcher_get_stack

 gtk/gtkprogressbar.c   |    2 +-
 gtk/gtkrecentfilter.c  |    2 +-
 gtk/gtkrecentmanager.c |    2 +-
 gtk/gtkscale.c         |    2 +-
 gtk/gtksettings.c      |    4 ++--
 gtk/gtksocket.c        |    3 ++-
 gtk/gtkstacksidebar.c  |    2 +-
 gtk/gtkstackswitcher.c |    2 +-
 8 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 3bde93f..0c3f8c0 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -1331,7 +1331,7 @@ gtk_progress_bar_set_inverted (GtkProgressBar *pbar,
  * to the text, not a copy of it, so will become invalid
  * if you change the text in the progress bar.
  *
- * Returns: text, or %NULL; this string is owned by the widget
+ * Returns: (nullable): text, or %NULL; this string is owned by the widget
  * and should not be modified or freed.
  */
 const gchar*
diff --git a/gtk/gtkrecentfilter.c b/gtk/gtkrecentfilter.c
index bed06a6..bf32dbf 100644
--- a/gtk/gtkrecentfilter.c
+++ b/gtk/gtkrecentfilter.c
@@ -463,7 +463,7 @@ gtk_recent_filter_set_name (GtkRecentFilter *filter,
  * Gets the human-readable name for the filter.
  * See gtk_recent_filter_set_name().
  *
- * Returns: the name of the filter, or %NULL.  The returned string
+ * Returns: (nullable): the name of the filter, or %NULL.  The returned string
  *   is owned by the filter object and should not be freed.
  *
  * Since: 2.10
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index 38c0d8f..dcf0bb2 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -1162,7 +1162,7 @@ build_recent_info (GBookmarkFile *bookmarks,
  * returns a #GtkRecentInfo-struct containing informations about the resource
  * like its MIME type, or its display name.
  *
- * Returns: a #GtkRecentInfo-struct containing information
+ * Returns: (nullable): a #GtkRecentInfo-struct containing information
  *   about the resource pointed by @uri, or %NULL if the URI was
  *   not registered in the recently used resources list. Free with
  *   gtk_recent_info_unref().
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 1853625..77e7cbb 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1429,7 +1429,7 @@ gtk_scale_finalize (GObject *object)
  * object is owned by the scale so does not need to be freed by
  * the caller.
  *
- * Returns: (transfer none): the #PangoLayout for this scale,
+ * Returns: (nullable) (transfer none): the #PangoLayout for this scale,
  *     or %NULL if the #GtkScale:draw-value property is %FALSE.
  *
  * Since: 2.4
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 1f75dff..4362da8 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -1894,8 +1894,8 @@ gtk_settings_get_for_screen (GdkScreen *screen)
  * Gets the #GtkSettings object for the default GDK screen, creating
  * it if necessary. See gtk_settings_get_for_screen().
  *
- * Returns: (transfer none): a #GtkSettings object. If there is no default
- *  screen, then returns %NULL.
+ * Returns: (nullable) (transfer none): a #GtkSettings object. If there is
+ * no default screen, then returns %NULL.
  **/
 GtkSettings*
 gtk_settings_get_default (void)
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 579a1f6..21c1ed6 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -371,7 +371,8 @@ gtk_socket_get_id (GtkSocket *socket)
  * Retrieves the window of the plug. Use this to check if the plug has
  * been created inside of the socket.
  *
- * Returns: (transfer none): the window of the plug if available, or %NULL
+ * Returns: (nullable) (transfer none): the window of the plug if
+ * available, or %NULL
  *
  * Since:  2.14
  **/
diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c
index df96f37..383ba87 100644
--- a/gtk/gtkstacksidebar.c
+++ b/gtk/gtkstacksidebar.c
@@ -515,7 +515,7 @@ gtk_stack_sidebar_set_stack (GtkStackSidebar *sidebar,
  * Retrieves the stack.
  * See gtk_stack_sidebar_set_stack().
  *
- * Returns: (transfer full): the associated #GtkStack or
+ * Returns: (nullable) (transfer full): the associated #GtkStack or
  *     %NULL if none has been set explicitly
  *
  * Since: 3.16
diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c
index f2932a9..56797f6 100644
--- a/gtk/gtkstackswitcher.c
+++ b/gtk/gtkstackswitcher.c
@@ -428,7 +428,7 @@ gtk_stack_switcher_set_stack (GtkStackSwitcher *switcher,
  * Retrieves the stack.
  * See gtk_stack_switcher_set_stack().
  *
- * Returns: (transfer none): the stack, or %NULL if
+ * Returns: (nullable) (transfer none): the stack, or %NULL if
  *    none has been set explicitly.
  *
  * Since: 3.10


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