SDL 3.0
SDL_UserEvent Struct Reference

#include <SDL_events.h>

Data Fields

Uint32 type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_WindowID windowID
 
Sint32 code
 
void * data1
 
void * data2
 

Detailed Description

A user-defined event type (event.user.*)

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().

Since
This struct is available since SDL 3.1.3.

Definition at line 966 of file SDL_events.h.

Field Documentation

◆ code

Sint32 SDL_UserEvent::code

User defined event code

Definition at line 972 of file SDL_events.h.

◆ data1

void* SDL_UserEvent::data1

User defined data pointer

Definition at line 973 of file SDL_events.h.

◆ data2

void* SDL_UserEvent::data2

User defined data pointer

Definition at line 974 of file SDL_events.h.

◆ reserved

Uint32 SDL_UserEvent::reserved

Definition at line 969 of file SDL_events.h.

◆ timestamp

Uint64 SDL_UserEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 970 of file SDL_events.h.

◆ type

Uint32 SDL_UserEvent::type

SDL_EVENT_USER through SDL_EVENT_LAST-1, Uint32 because these are not in the SDL_EventType enumeration

Definition at line 968 of file SDL_events.h.

◆ windowID

SDL_WindowID SDL_UserEvent::windowID

The associated window if any

Definition at line 971 of file SDL_events.h.


The documentation for this struct was generated from the following file: