SDL_RegisterEvents(3)
π SDL_RegisterEvents(3) π
okay so bestie, you're in the SDL3 FUNCTIONS manual, and today's main character is SDL_RegisterEvents.
SDL_RegisterEvents β allocate a set of user-defined events, and return the beginning event number for that set of events. periodt. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_events.h>
Uint32 SDL_RegisterEvents(int numevents);
π FUNCTION PARAMETERS π
numeventsβ the number of events to be allocated. yes bestie, literally how many events you're asking for.
πΈ RETURN VALUE πΈ
Returns the beginning event number, or 0 if numevents is invalid or if there are not enough user-defined events left.
so if you get 0, that's the signal that something was not giving what it needed to give. π
π¦ THREAD SAFETY π¦
It is safe to call this function from any thread. any thread, no cap. π₯
π AVAILABILITY π
This function is available since SDL 3.2.0. iconic behavior, honestly. β
π SEE ALSO π
SDL_PushEvent(3)β go peek at this one too, iykyk.
This has been your girl signing off from the Simple Directmedia Layer zone, SDL 3.4.18 edition, with the footer's SDL_RegisterEvents(3) date/title slot giving main character energy. Mwah π
π¦ 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