Method

PurpleBadgescompare

unstable since: 3.0

Declaration [src]

int
purple_badges_compare (
  PurpleBadges* badges1,
  PurpleBadges* badges2
)

Description [src]

Compares two badges instances for sorting.

The sort order for badges is based on the priority of the badges they contain with the highest priority sorting first. If the priorities are equal then the next badge is tested continuing until a difference is found or all badges have been exhausted.

Available since: 3.0

Parameters

badges2

Type: PurpleBadges

The instance to compare.

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

Return value

Type: int

Less than zero if the first badge should be sorted first, 0 if they are equal, greater than 0 if the second badge should be sorted first.