[gimp/goat-invasion: 366/418] app: add gimp_list_get_sort_func()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 366/418] app: add gimp_list_get_sort_func()
- Date: Wed, 4 Apr 2012 10:56:33 +0000 (UTC)
commit 8910741be958a1824d73a9e9f9a9f032792e008d
Author: Michael Natterer <mitch gimp org>
Date: Sat Mar 31 23:23:52 2012 +0200
app: add gimp_list_get_sort_func()
app/core/gimplist.c | 16 ++++++++++++++++
app/core/gimplist.h | 1 +
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimplist.c b/app/core/gimplist.c
index df83de5..7fcf7aa 100644
--- a/app/core/gimplist.c
+++ b/app/core/gimplist.c
@@ -448,6 +448,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:
* @list: a #GimpList
* @sort_func: a #GCompareFunc
diff --git a/app/core/gimplist.h b/app/core/gimplist.h
index f73edb8..b6c44de 100644
--- a/app/core/gimplist.h
+++ b/app/core/gimplist.h
@@ -61,6 +61,7 @@ GimpContainer * gimp_list_new_weak (GType children_type,
void gimp_list_reverse (GimpList *list);
void gimp_list_set_sort_func (GimpList *list,
GCompareFunc sort_func);
+GCompareFunc gimp_list_get_sort_func (GimpList *list);
void gimp_list_sort (GimpList *list,
GCompareFunc sort_func);
void gimp_list_sort_by_name (GimpList *list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]