Macaw OS C reference

Function sys_clipboard

#include <macaw.h>
int sys_clipboard(char *buf, int size);

Gets the text on the computer's own clipboard. getclipboard is usually better: it also has what Macaw OS programs copy.

Parameters

bufchar *
Where the clipboard's text goes.
sizeint
How many bytes buf holds. Text that doesn't fit is cut short.

Returns int

The text's whole length, or -1 if there's no text on it.

In The system, with platform, ismac, modkey, memory, sys_version, sys_fps, sys_display, sys_volume, sys_screenshot, sys_title, sys_cursor, sys_setclipboard.