SDL_EventFilter(3type)

SDL_EventFilter3type

A function pointer used for callbacks that watch the event queue.

Usage

#include "SDL3/SDL.h"

typedef bool (SDLCALL *SDL_EventFilter)(void *userdata, SDL_Event *event);

Header file

Defined in SDL3/SDL_events.h

Function parameters

userdata

what was passed as userdata to SDL_SetEventFilter () or SDL_AddEventWatch , etc.

event

the event that triggered the callback.

Return value

Returns true to permit event to be added to the queue, and false to disallow it. When used with SDL_AddEventWatch , the return value is ignored.

Thread safety

SDL may call this callback at any time from any thread; the application is responsible for locking resources the callback touches that need to be protected.

Availability

This datatype is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.