SDL_RemoveEventWatch(3)
π SDL_RemoveEventWatch β the manual page, but make it cute π
ok so bestie, welcome to the SDL3 FUNCTIONS corner of the docs, where today's main character is SDL_RemoveEventWatch(3). yeah, that whole (3) thing just means it lives in the library section, iykyk. π
β¨ NAME β¨
SDL_RemoveEventWatch β the lil cleanup queen that removes an event watch callback you added earlier with SDL_AddEventWatch(). yes bestie, you have to undo the thing you did. balance. harmony. closure. π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_events.h>
void SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata);
not a single return value in sight, she just does her job and leaves. void energy fr fr. π
π DESCRIPTION π
okay so here's the tea: this function takes the same input as SDL_AddEventWatch() β literally the same two things β and uses them to identify and delete the corresponding callback. it's a matching game. you gave the watch a lil identity card when you added it, and now you hand over the same ID card so she can find it and yeet it. π₯
no cap, that's the whole vibe. same args in, callback out. π«Ά
π FUNCTION PARAMETERS π
filterβ the function you originally passed toSDL_AddEventWatch(). yes, originally. the exact same one. don't be out here inventing new ones, she will not find your callback and that's on you bestie. πuserdataβ the pointer you originally passed toSDL_AddEventWatch(). again: originally. same pointer, same energy, or it's a no-match. β
π THREAD SAFETY π
it is safe to call this function from any thread. any. thread. she's unbothered, she's multithreaded, she's iconic. π
β AVAILABILITY β
this function is available since SDL 3.2.0. if you're on something older, sorry babe, she doesn't exist yet. π
π SEE ALSO π
SDL_AddEventWatch(3)β the other half of this duo, the one that actually adds the watch. go read her too, they're a package deal. π
mwah and that's the page!! brought to you by the lovely humans at Simple Directmedia Layer, running SDL 3.4.18. go forth and remove your event watches responsibly, bestie. no leaks, only slay. π β¨π§
π¦ 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