SDL_UserEvent - A user-defined event type (event.user.*)
Contents
Availability
This struct is available since SDL 3.2.0.
Simple Directmedia Layer SDL 3.2.10 SDL_UserEvent(3type)
Description
This event is unique; it is never created by SDL, but only by the application. The event can be pushed
onto the event queue using
SDL_PushEvent (). The contents of the structure members are completely up to the programmer; the only
requirement is that '''type''' is a value obtained from SDL_RegisterEvents ().
Header File
Defined in SDL3/SDL_events.h
Name
SDL_UserEvent - A user-defined event type (event.user.*)
Synopsis
#include"SDL3/SDL.h"typedefstructSDL_UserEvent{Uint32type;/**<SDL_EVENT_USERthroughSDL_EVENT_LAST-1,Uint32becausethesearenotintheSDL_EventTypeenumeration*/Uint32reserved;Uint64timestamp;/**<Innanoseconds,populatedusingSDL_GetTicksNS()*/SDL_WindowIDwindowID;/**<Theassociatedwindowifany*/Sint32code;/**<Userdefinedeventcode*/void*data1;/**<Userdefineddatapointer*/void*data2;/**<Userdefineddatapointer*/}SDL_UserEvent;