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 πŸ”₯


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