### Function

# Clutter Event add_filter

#### Declaration [src]

    guint
    clutter_event_add_filter (
      ClutterStage* stage,
      ClutterEventFilterFunc func,
      GDestroyNotify notify,
      gpointer user_data
    )

#### Description [src]

Adds a function which will be called for all events that Clutter processes. The function will be called before any signals are emitted for the event and it will take precedence over any grabs.

#### Parameters

`stage`

  Type: `ClutterStage`

  The `ClutterStage` to capture events for.

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

`func`

  Type: `ClutterEventFilterFunc`

  The callback function which will be passed all events.

`notify`

  Type: `GDestroyNotify`

  A `GDestroyNotify`.

`user_data`

  Type: `gpointer`

  A data pointer to pass to the function.

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

#### Return value

Type: `guint`

An identifier for the event filter, to be used with `clutter_event_remove_filter()`.