SDL_CommonEvent(3type)
okay so bestie, this is the SDL_CommonEvent(3type) page from the SDL3 DATATYPES manual, and it's literally the blueprint for every event in SDL3 πβ¨.
π NAME π
SDL_CommonEvent β fields shared by every event π¦
Like, every single event gets these fields. Periodt.
β¨ SYNOPSIS β¨
#include <SDL3/SDL_events.h>
typedef struct SDL_CommonEvent
{
Uint32 type; /**< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
} SDL_CommonEvent;
so like, the type field is a Uint32 β it's the event type, shared with all events. And it's Uint32 specifically to cover user events which are not in the SDL_EventType enumeration. iykyk π.
then there's reserved β it's just a Uint32 that's, like, reserved. No cap, it's literally named reserved. It's giving placeholder energy π
.
and then timestamp β it's a Uint64, measured in nanoseconds, and it gets populated using SDL_GetTicksNS(). So you know exactly when the event happened, down to the nanosecond. iconic β¨.
π AVAILABILITY π
this struct is available since SDL 3.2.0 β so if you're on an older version, it's giving not yet, bestie π.
this page was served by Simple Directmedia Layer, version SDL 3.4.18, and it's literally called SDL_CommonEvent(3type) π β¨. stay slay, bestie π«Ά.
π¦ 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