Package: gtk

Function gtk:sorter-compare

Lambda List

gtk:sorter-compare (sorter obj1 obj2)

Arguments

sorter -- a gtk:sorter object
obj1 -- a g:object instance for the first item to compare
obj2 -- a g:object instance for the second item to compare

Return Value

The gtk:ordering value with the :equal value if obj1 = obj2, the :smaller value if obj1 < obj2, the :larger value if obj1 > obj2.

Details

Compares two given objects according to the sort order implemented by the sorter.

Sorters implement a partial order:
  • It is reflexive, that is a = a.
  • It is antisymmetric, that is if a < b and b < a, then a = b.
  • It is transitive, that is given any 3 objects with a ≤ b and b ≤ c, then a ≤ c.
The sorter may signal it conforms to additional constraints via the return value of the gtk:sorter-order function.
 

See also

2024-10-18