1.44 <GtkCustomSorter>

Class: <GtkCustomSorter>

It derives from <GtkSorter>.

Sorts items via a callback function.

Procedures

Procedure: custom-sorter:new [sort-func] ⇒ %return

Creates a new <GtkSorter> that works by calling sort-func to compare items.

If sort-func is #f, all items are considered equal.

sort-func

Passed, or left out: a procedure, or #f.

the GCompareDataFunc to use for sorting

See GCompareDataFunc for how it is called.

%return

Returned: a <GtkCustomSorter>.

a new <GtkCustomSorter>

user-data

Not passed: guile-gi supplies it.

user data to pass to sort-func

user-destroy

Not passed: guile-gi supplies it.

destroy notify for user-data

See GDestroyNotify for how it is called.

Method: custom-sorter:set-sort-func self [sort-func]
Method: set-sort-func self [sort-func]

Sets (or unsets) the function used for sorting items.

If sort-func is #f, all items are considered equal.

If the sort func changes its sorting behavior, sorter:changed needs to be called.

If a previous function was set, its user-destroy will be called now.

self

Passed: a <GtkCustomSorter>.

a <GtkCustomSorter>

sort-func

Passed, or left out: a procedure, or #f.

function to sort items

See GCompareDataFunc for how it is called.

user-data

Not passed: guile-gi supplies it.

user data to pass to match-func

user-destroy

Not passed: guile-gi supplies it.

destroy notify for user-data

See GDestroyNotify for how it is called.