SDL_EventFilter(3type)

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

HEADER FILE
Defined in SDL3/SDL_events.h

SYNOPSIS
#include "SDL3/SDL.h"

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

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 1 to permit event to be added to the queue, and 0 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.0.0.

SEE ALSO
SDL_SetEventFilter(3), SDL_AddEventWatch(3)