Syntax
void AL_SortListItem(
LIST_HANDLE list,
int(*compare)(const AL_ListItemData *a, const AL_ListItemData *b)
);
Parameters
- list
- [in] List handle
- compare
- [in] Pointer to a user-supplied function that compares two list items.
Return value
None.Remarks
Sorts the list items registered in the list resource of the list handle specified by list .Sorting list items with this function does not update the list display. After sorting, call AL_ShowList function to update the list display.
The specifications of the comparison function specified in compare are as follows.
Syntax
int myCompare( const AL_ListItemData *a, const AL_ListItemData *b );
Parameters
- a
- [in] A pointer to the AL_ListItemData structure of the list item to be compared.
- b
- [in] A pointer to the AL_ListItemData structure of the list item to be compared.
Return value
<0 | when (list item a) < (list item b) |
0 | when (list item a) = (list item b) |
>0 | when (list item a) > (list item b) |
Remarks
The array of the list items is sorted in increasing order. When sorting in descending order, invert the sign of the return value.Requirements
Header file:
lib.hLibrary file:
AdvancedMenu.h
libAdvancedMenu.a
libSTARTUPOPH5000.a
Last updated: 2020/10/04