app: add gimp_list_get_sort_func()

This commit is contained in:
Michael Natterer 2012-03-31 23:23:52 +02:00
parent 9031cdc645
commit 6e4599806f
2 changed files with 17 additions and 0 deletions

View File

@ -447,6 +447,22 @@ gimp_list_set_sort_func (GimpList *list,
} }
} }
/**
* gimp_list_get_sort_func:
* @list: a #GimpList
*
* Returns the @list's sort function, see gimp_list_set_sort_func().
*
* Return Value: The @list's sort function.
**/
GCompareFunc
gimp_list_get_sort_func (GimpList*list)
{
g_return_val_if_fail (GIMP_IS_LIST (list), NULL);
return list->sort_func;
}
/** /**
* gimp_list_sort: * gimp_list_sort:
* @list: a #GimpList * @list: a #GimpList

View File

@ -61,6 +61,7 @@ GimpContainer * gimp_list_new_weak (GType children_type,
void gimp_list_reverse (GimpList *list); void gimp_list_reverse (GimpList *list);
void gimp_list_set_sort_func (GimpList *list, void gimp_list_set_sort_func (GimpList *list,
GCompareFunc sort_func); GCompareFunc sort_func);
GCompareFunc gimp_list_get_sort_func (GimpList *list);
void gimp_list_sort (GimpList *list, void gimp_list_sort (GimpList *list,
GCompareFunc sort_func); GCompareFunc sort_func);
void gimp_list_sort_by_name (GimpList *list); void gimp_list_sort_by_name (GimpList *list);