SDL_ClipboardEvent(3type)
π NAME π
SDL_ClipboardEvent β the event that gets triggered when the clipboard contents have changed (that's the event.clipboard.* family, bestie π«Ά)
β¨ SYNOPSIS β¨
#include <SDL3/SDL_events.h>
typedef struct SDL_ClipboardEvent
{
SDL_EventType type; /**< SDL_EVENT_CLIPBOARD_UPDATE */
Uint32 reserved;
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
bool owner; /**< are we owning the clipboard (internal update) */
Sint32 num_mime_types; /**< number of mime types */
const char **mime_types; /**< current mime types */
} SDL_ClipboardEvent;
π¦ DESCRIPTION π¦
okay so picture this: somebody copies something. anything. a screenshot, a meme, a whole thesis. the clipboard goes π and changes, and this is the struct that shows up to tell you about it. it's giving "I have news" energy π
here's the field-by-field vibe check:
typeβ it's anSDL_EventType, and the comment saysSDL_EVENT_CLIPBOARD_UPDATE. that's the whole personality of this event fr fr.reservedβ aUint32that's justβ¦ there. not your business, don't touch it, it's reserved bestie πtimestampβ aUint64in nanoseconds, populated usingSDL_GetTicksNS(). yes, nanoseconds. she's precise like that β±οΈownerβ abool. the comment asks: are we owning the clipboard (internal update). so if it's you doing the copying, you're the main character here πnum_mime_typesβ aSint32holding the number of mime types. the headcount, basically.mime_typesβ aconst char **holding the current mime types. the actual list. lowkey the star of the show π
not me being obsessed with a clipboard event. but the way that a copy can come with a whole array of mime types?? iconic. periodt. π
πΈ AVAILABILITY πΈ
this struct is available since SDL 3.2.0. so if you're on anything olderβ¦ no she's not there yet, bestie π
Simple Directmedia Layer wrote this, it's the SDL 3.4.18 era of the docs, and the page is filed under SDL_ClipboardEvent(3type). mwah, go copy something and enjoy the event πβ¨π
π¦ 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