Expose items in a KatzeArray as GList
This commit is contained in:
parent
9d3c884194
commit
c213824d5f
2 changed files with 22 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2008-2009 Christian Dywan <christian@twotoasts.de>
|
Copyright (C) 2008-2010 Christian Dywan <christian@twotoasts.de>
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -461,6 +461,24 @@ katze_array_move_item (KatzeArray* array,
|
||||||
g_signal_emit (array, signals[MOVE_ITEM], 0, item, position);
|
g_signal_emit (array, signals[MOVE_ITEM], 0, item, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* katze_array_get_items:
|
||||||
|
* @array: a #KatzeArray
|
||||||
|
*
|
||||||
|
* Retrieves the items as a list.
|
||||||
|
*
|
||||||
|
* Return value: a newly allocated #GList of items
|
||||||
|
*
|
||||||
|
* Since: 0.2.5
|
||||||
|
**/
|
||||||
|
GList*
|
||||||
|
katze_array_get_items (KatzeArray* array)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (KATZE_IS_ARRAY (array), NULL);
|
||||||
|
|
||||||
|
return g_list_copy (array->items);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* katze_array_clear:
|
* katze_array_clear:
|
||||||
* @array: a #KatzeArray
|
* @array: a #KatzeArray
|
||||||
|
|
|
@ -77,6 +77,9 @@ katze_array_move_item (KatzeArray* array,
|
||||||
gpointer item,
|
gpointer item,
|
||||||
gint position);
|
gint position);
|
||||||
|
|
||||||
|
GList*
|
||||||
|
katze_array_get_items (KatzeArray* array);
|
||||||
|
|
||||||
void
|
void
|
||||||
katze_array_clear (KatzeArray* array);
|
katze_array_clear (KatzeArray* array);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue