SDL_SetClipboardText(3)

πŸ’– SDL_SetClipboardText(3) πŸ’–

okay bestie, so this is a page from the SDL3 FUNCTIONS manual and it's literally just "how do I put text on the clipboard" and honestly? iconic. ✨


✨ NAME ✨

SDL_SetClipboardText β€” put UTF-8 text into the clipboard. that's it. that's the whole job. πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_clipboard.h>

bool SDL_SetClipboardText(const char *text);

✨ FUNCTION PARAMETERS ✨

  • text β€” the text you wanna store in the clipboard. the actual goods. the content. 🫢

✨ RETURN VALUE ✨

It hands back true if everything went great and false if it flopped. πŸ’€ And if it flopped, you go call SDL_GetError() to find out what happened β€” that's your group chat receipt for the drama.


✨ THREAD SAFETY ✨

main thread only, bestie!! 🚨 This function should only be called on the main thread. no side-quests, no background threads pulling up. main character thread only. periodt. πŸ’…

✨ AVAILABILITY ✨

She's been around since SDL 3.2.0. vintage. a classic. 🌸


✨ SEE ALSO ✨

go read those next, iykyk πŸ¦‹


and that's the whole page!! πŸ’œ this one came to you from Simple Directmedia Layer, specifically SDL 3.4.18 β€” so if you're out here on that version, you're all set. now go forth and copy-paste responsibly, queen. πŸ‘‘πŸ’–

πŸ“¦ where this page comes from