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.
This commit is contained in:
David Shea 2015-04-08 13:14:22 -04:00 committed by Debarshi Ray
parent 074fe89f22
commit 3bd703e9c4

View File

@ -245,7 +245,7 @@ g_list_store_new (GType item_type)
* g_list_store_insert: * g_list_store_insert:
* @store: a #GListStore * @store: a #GListStore
* @position: the position at which to insert the new item * @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 * Inserts @item into @store at @position. @item must be of type
* #GListStore:item-type or derived from it. @position must be smaller * #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: * g_list_store_insert_sorted:
* @store: a #GListStore * @store: a #GListStore
* @item: the new item * @item: (type GObject): the new item
* @compare_func: pairwise comparison function for sorting * @compare_func: (scope call): pairwise comparison function for sorting
* @user_data: (closure): user data for @compare_func * @user_data: (closure): user data for @compare_func
* *
* Inserts @item into @store at a position to be determined by the * 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: * g_list_store_append:
* @store: a #GListStore * @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. * 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 * @store: a #GListStore
* @position: the position at which to make the change * @position: the position at which to make the change
* @n_removals: the number of items to remove * @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 * @n_additions: the number of items to add
* *
* Changes @store by removing @n_removals items and adding @n_additions * Changes @store by removing @n_removals items and adding @n_additions