FilterCollection.with_callback


Description:

[ CCode ( has_construct_function = false , type = "GcrCollection*" ) ]
public FilterCollection.with_callback (Collection underlying, owned FilterCollectionFunc? callback)

Create a new FilterCollection.

The callback should return true if an object should appear in the filtered collection.

If a null callback is set, then all underlynig objects will appear in the filtered collection.

Parameters:

underlying

the underlying collection

callback

function to call for each object

destroy_func

called for user_data when it is no longer needed

user_data

data to pass to the callback

Returns:

a newly allocated filtered collection, which should be freed with unref