---
name: "SDL_GetEventFilter"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetEventFilter"
---

# SDL\_GetEventFilter(3)

Query the current event filter.

## NAME

SDL\_GetEventFilter - Query the current event filter.

## HEADER FILE

Defined in SDL3/SDL\_events.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_GetEventFilter(SDL\_EventFilter \*filter, void \*\*userdata);**

## DESCRIPTION

This function can be used to "chain" filters, by saving the existing filter before replacing it with a function that will call that saved filter.

## FUNCTION PARAMETERS

- *filter*

  the current callback function will be stored here.

- *userdata*

  the pointer that is passed to the current event filter will be stored here.

## RETURN VALUE

Returns true on success or false if there is no event filter set.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetEventFilter**(3)](/SDL_SetEventFilter/3.md)
