[glib/glib-2-44] Add introspection annotations to GListStore



commit 52d0328f7a733781bfd67bd99b84485470820856
Author: David Shea <dshea redhat com>
Date:   Wed Apr 8 13:14:22 2015 -0400

    Add introspection annotations to GListStore
    
    GListStore requires that item-type be derived from GObject, so specify
    that the type of the item parameters is GObject so the functions can be
    used via gobject-introspection.
    
    Add a scope parameter for the callback used during insert_sorted.

 gio/gliststore.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gio/gliststore.c b/gio/gliststore.c
index fce4dc2..5e5f3e3 100644
--- a/gio/gliststore.c
+++ b/gio/gliststore.c
@@ -245,7 +245,7 @@ g_list_store_new (GType item_type)
  * g_list_store_insert:
  * @store: a #GListStore
  * @position: the position at which to insert the new item
- * @item: the new item
+ * @item: (type GObject): the new item
  *
  * Inserts @item into @store at @position. @item must be of type
  * #GListStore:item-type or derived from it. @position must be smaller
@@ -278,8 +278,8 @@ g_list_store_insert (GListStore *store,
 /**
  * g_list_store_insert_sorted:
  * @store: a #GListStore
- * @item: the new item
- * @compare_func: pairwise comparison function for sorting
+ * @item: (type GObject): the new item
+ * @compare_func: (scope call): pairwise comparison function for sorting
  * @user_data: (closure): user data for @compare_func
  *
  * Inserts @item into @store at a position to be determined by the
@@ -319,7 +319,7 @@ g_list_store_insert_sorted (GListStore       *store,
 /**
  * g_list_store_append:
  * @store: a #GListStore
- * @item: the new item
+ * @item: (type GObject): the new item
  *
  * Appends @item to @store. @item must be of type #GListStore:item-type.
  *
@@ -400,7 +400,7 @@ g_list_store_remove_all (GListStore *store)
  * @store: a #GListStore
  * @position: the position at which to make the change
  * @n_removals: the number of items to remove
- * @additions: (array length=n_additions): the items to add
+ * @additions: (array length=n_additions) (element-type GObject): the items to add
  * @n_additions: the number of items to add
  *
  * Changes @store by removing @n_removals items and adding @n_additions


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