SDL_WindowEvent(3type)

πŸ¦‹ SDL_WindowEvent(3type) πŸ¦‹

okay so bestie, welcome to the SDL_WindowEvent(3type) page from SDL3 DATATYPES. it's giving window state change event data, and we're gonna read it together like a group chat. no cap. πŸ’…


✨ NAME ✨

SDL_WindowEvent β€” Window state change event data (the whole event.window.* vibe). πŸ’–


✨ SYNOPSIS ✨

first, the include:

#include <SDL3/SDL_events.h>

then the struct, literally exactly:

typedef struct SDL_WindowEvent
{
    SDL_EventType type; /**< SDL_EVENT_WINDOW_* */
    Uint32 reserved;
    Uint64 timestamp;   /**< In nanoseconds, populated using SDL_GetTicksNS() */
    SDL_WindowID windowID; /**< The associated window */
    Sint32 data1;       /**< event dependent data */
    Sint32 data2;       /**< event dependent data */
} SDL_WindowEvent;

field-by-field, because we're thorough:

  • SDL_EventType type; β€” the comment says /**< SDL_EVENT_WINDOW_* */ so this is the event type situation. ✨
  • Uint32 reserved; β€” reserved, bestie. it's reserved. πŸ™ˆ
  • Uint64 timestamp; β€” comment: /**< In nanoseconds, populated using SDL_GetTicksNS() */ β€” nanoseconds, populated using SDL_GetTicksNS(). ⏱️
  • SDL_WindowID windowID; β€” comment: /**< The associated window */ β€” the associated window. πŸͺŸ
  • Sint32 data1; β€” comment: /**< event dependent data */ β€” event dependent data, so it depends on the event. πŸ’€
  • Sint32 data2; β€” comment: /**< event dependent data */ β€” same energy, second data. πŸ’…

✨ AVAILABILITY ✨

this struct is available since SDL 3.2.0. periodt. πŸŽ€


and that's the page, bestie 🫢 the footer didn't drop a date, but it did drop Simple Directmedia Layer, SDL 3.4.18, and the SDL_WindowEvent(3type) manual page β€” iconic forever βœ¨πŸ’–

πŸ“¦ where this page comes from