An event used to drop text or request a file open by the system (event.drop.*)
Defined in <SDL3/SDL_events.h>
typedef struct SDL_DropEvent
{/**< ::SDL_EVENT_DROP_BEGIN or ::SDL_EVENT_DROP_FILE or ::SDL_EVENT_DROP_TEXT or ::SDL_EVENT_DROP_COMPLETE or ::SDL_EVENT_DROP_POSITION */
SDL_EventType type;
Uint32 reserved;/**< In nanoseconds, populated using SDL_GetTicksNS() */
Uint64 timestamp; /**< The window that was dropped on, if any */
SDL_WindowID windowID; float x; /**< X coordinate, relative to window (not on begin) */
float y; /**< Y coordinate, relative to window (not on begin) */
char *source; /**< The source app that sent this drop event, or NULL if that isn't available */
char *data; /**< The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events */
} SDL_DropEvent;
The data
is owned by SDL and should be copied if the application wants to hold onto it beyond the scope of handling this event. Do not free it!
This struct is available since SDL 3.0.0.
CategoryAPI, CategoryAPIStruct