ListStore.insertSorted

Inserts @item into @store at a position to be determined by the @compare_func.

The list must already be sorted before calling this function or the result is undefined. Usually you would approach this by only ever inserting items by way of this function.

This function takes a ref on @item.

class ListStore
uint
insertSorted
(,
GCompareDataFunc compareFunc
,
void* userData
)

Parameters

item ObjectG

the new item

compareFunc GCompareDataFunc

pairwise comparison function for sorting

userData void*

user data for @compare_func

Return Value

Type: uint

the position at which @item was inserted

Meta

Since

2.44