al_get_clipboard_text(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

✨ al_get_clipboard_text(3) ✨

okay so this page is from the Allegro reference manual, and it’s all about the Allegro 5 API function al_get_clipboard_text β€” clipboard text retrieval, but make it main character energy πŸ’…

πŸŽ€ NAME πŸŽ€

al_get_clipboard_text β€” Allegro 5 API πŸ¦‹

πŸ“ SYNOPSIS

#include <allegro5/allegro.h>

char *al_get_clipboard_text(ALLEGRO_DISPLAY *display)

🌸 DESCRIPTION 🌸

This function returns a pointer to a string, allocated with al_malloc(3), that holds the text contents of the clipboard if available. Cute, right? ✨

If no text is available on the clipboard, then this function returns NULL. No text, no string, no drama 😭.

You must call al_free(3) on the returned pointer when you don’t need it anymore. That’s not optional, bestie β€” free your memory, slay responsibly 🫢.

⚠️ Beware: text on the clipboard on Windows may be in Windows format. That is, it may have carriage return newline combinations for the line endings instead of regular newlines for the line endings on Linux or OSX. It’s giving cross-platform plot twist πŸ’€ β€” no cap.

πŸ‘‘ SINCE

5.1.12 β€” iconic since then, periodt ✨

πŸ‘€ SEE ALSO


Signed off with love by the Allegro reference manual πŸ’– β€” this page is al_get_clipboard_text(3), the SINCE is 5.1.12, and the footer didn’t bring a date, so no invented date here, bestie πŸ™ˆπŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms