In my SDL2-based graphics framework, i have a need to intercept certain events before they enter the SDL event queue (somewhat dynamically). It was clear to me that SDL_SetEventFilter (https://wiki.libsdl.org/SDL_SetEventFilter) was the solution; however, each event type would have its own event filter to handle it–meaning that i would need to use SDL_GetEventFilter (https://wiki.libsdl.org/SDL_GetEventFilter) to “chain them together”.
The problem is, the SDL_GetEventFilter function appears to return a boolean value (http://hg.libsdl.org/SDL/file/default/include/SDL_events.h#l667) and i’m not sure what to do with the result. Furthermore, examples showing how properly “chain event filters” are few and far between in my Google search results.
How would one use SDL_GetEventFilter to chain different event filters together?