SDL_HasEvent(3)
β¨ SDL_HasEvent(3) β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual π this one's about peeking into your event queue and going "hey, is this kind of event in there?" β and it's giving detective energy, fr fr π
πΈ NAME πΈ
SDL_HasEvent β check if a certain event type is literally just vibing in the event queue. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_events.h>
bool SDL_HasEvent(Uint32 type);
π DESCRIPTION π
So like, you hand it an event type and it tells you whether events of that type are hanging out in the queue. Simple, iconic, no drama. π«Ά
but bestie, listen β if you need to check for a range of event types, you should use SDL_HasEvents() instead. Don't come for me, that's just the rule. π
π FUNCTION PARAMETERS π
typeβ the type of event you're querying, queen π; peepSDL_EventTypefor the deets.
β RETURN VALUE β
- Returns
trueif events matchingtypeare present π - Returns
falseif events matchingtypeare not present π
π§ THREAD SAFETY π§
It is safe to call this function from any thread. no cap. every thread. go off. ππ₯
πΈ AVAILABILITY πΈ
This function has been available since SDL 3.2.0 β¨ so if you're on something older, that's a vibe check fail, sorry babe.
π SEE ALSO π
okay that's the whole page, you ate it, periodt π β¨
mwah π this has been brought to you by Simple Directmedia Layer β SDL 3.4.18, the iconic-est. stay hydrated, check your event queue, and don't forget to free your stuff ππ¦π
π¦ 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