Constructor

GcrFilterCollectionnew_with_callback

Declaration [src]

GcrCollection*
gcr_filter_collection_new_with_callback (
  GcrCollection* underlying,
  GcrFilterCollectionFunc callback,
  gpointer user_data,
  GDestroyNotify destroy_func
)

Description [src]

Create a new GcrFilterCollection.

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

Type: GcrCollection

The underlying collection.

The data is owned by the caller of the function.
callback

Type: GcrFilterCollectionFunc

Function to call for each object.

The argument can be NULL.
user_data

Type: gpointer

Data to pass to the callback.

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

Type: GDestroyNotify

Called for user_data when it is no longer needed.

Return value

Type: GcrFilterCollection

A newly allocated filtered collection, which should be freed with g_object_unref().

The caller of the function takes ownership of the data, and is responsible for freeing it.