SDL_GetEventFilter(3)
π SDL_GetEventFilter π
okay bestie, welcome to the SDL_GetEventFilter(3) page, straight out of the SDL3 FUNCTIONS lineup β¨ this one's a little query function and she's lowkey iconic for it.
πΈ NAME πΈ
SDL_GetEventFilter β ask the universe (well, SDL) which event filter is currently doing its thing π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_events.h>
bool SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata);
π¦ DESCRIPTION π¦
so here's the vibe: this function lets you "chain" filters π«Ά like, you save the filter that's already there before you swap in your own replacement function, and then your replacement can just call that saved one like nothing ever happened. passing the torch, but make it event handling. π
π FUNCTION PARAMETERS π
filterβ the current callback function gets stored right here, no cap π₯userdataβ and the pointer that's passed to the current event filter gets stashed here too π₯
β RETURN VALUE β
returns true when it works out π or false if there's literally no event filter set β nothing to report, bestie π
π THREAD SAFETY π
you can call this from any thread and it's safe. go off, multithreaded queen π
π AVAILABILITY π
this one's been around since SDL 3.2.0 β a real one since day one, fr fr β¨
π₯ SEE ALSO π₯
SDL_SetEventFilter(3)β the partner in crime, the other half of the chain π«Ά
mwah π that's the whole page, and it comes to you courtesy of Simple Directmedia Layer, version SDL 3.4.18, dated SDL_GetEventFilter(3) β yes the date field is just the title again, she's quirky like that ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms