### Method

# Gcr FilterCollection set_callback

#### Declaration [src]

    void
    gcr_filter_collection_set_callback (
      GcrFilterCollection* self,
      GcrFilterCollectionFunc callback,
      gpointer user_data,
      GDestroyNotify destroy_func
    )

#### Description [src]

Set the callback used to filter the objects in the underlying collection. 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.

This will refilter the collection.

#### Parameters

`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 method.

`destroy_func`

  Type: `GDestroyNotify`

  Called for user_data when it is no longer needed.