TreeIterCompareFunc
Description:
[ Version ( deprecated = true , deprecated_since = "4.20" ) ]
public delegate int TreeIterCompareFunc (TreeModel model, TreeIter a, TreeIter b)
Warning: TreeIterCompareFunc is deprecated since 4.20.
A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive integer if a sorts before b, a
sorts with b, or a sorts after b respectively.
There is no replacement
If two iters compare as equal, their order in the sorted model is undefined. In order to ensure that the `GtkTreeSortable` behaves as expected, the GtkTreeIterCompareFunc must define a partial order on the model, i.e. it must be reflexive, antisymmetric and transitive.
For example, if model is a product catalogue, then a compare function for the “price” column could be one which returns
`price_of(a) - price_of(b)`.
Parameters:
| model |
The `GtkTreeModel` the comparison is within |
| a |
A `GtkTreeIter` in |
| b |
Another `GtkTreeIter` in |
| user_data |
Data passed when the compare func is assigned e.g. by set_sort_func |
Returns:
|
a negative integer, zero or a positive integer depending on whether |