Package: gtk

Callback gtk:tree-iter-compare-func

Syntax

lambda (model iter1 iter2) => result

Arguments

model -- a gtk:tree-model object the comparison is within
iter1 -- a gtk:tree-iter iterator in model
iter2 -- another gtk:tree-iter iterator in model
result -- a negative integer, zero or a positive integer depending on whether iter1 sorts before, with or after iter2

Details

The gtk:tree-iter-compare-func callback function should return a negative integer, zero, or a positive integer if iter1 sorts before iter2, iter1 sorts with iter2, or iter1 sorts after iter2 respectively. If two iterators compare as equal, their order in the sorted model is undefined. To ensure that the gtk:tree-sortable object behaves as expected, the gtk:tree-iter-compare-func callback function must define a partial order on the model, that is, it must be reflexive, antisymmetric and transitive.
 

See also

#2024-5-9