Virtual Method

GtkSortercompare

Declaration [src]

GtkOrdering
compare (
  GtkSorter* self,
  GObject* item1,
  GObject* item2
)

Description [src]

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

Sorters implement a partial order:

  • It is reflexive, ie a = a
  • It is antisymmetric, ie if a < b and b < a, then a = b
  • It is transitive, ie given any 3 items with a ≤ b and b ≤ c, then a ≤ c

The sorter may signal it conforms to additional constraints via the return value of gtk_sorter_get_order().

Parameters

item1 GObject
 

First item to compare.

 The argument can be NULL.
 The data is owned by the caller of the function.
item2 GObject
 

Second item to compare.

 The argument can be NULL.
 The data is owned by the caller of the function.

Return value

Returns: GtkOrdering
 

GTK_ORDERING_EQUAL if item1 == item2, GTK_ORDERING_SMALLER if item1 < item2, GTK_ORDERING_LARGER if item1 > item2