Windows only
I've tested it a few times, but would like for someone else to test it. Also any suggestions.
// header ALLEGRO_USTR *al_read_from_clipboard(); bool al_write_to_clipboard(ALLEGRO_USTR *str);
Good beginning, but this needs to be made portable. Copy paste under Linux is a bit ... complex as well.
Edgar Reynaldo was working on this a few years back.
Yeah, but mine never supported utf16 on windows. And the linux version was a nightmare but it worked.
For Linux copy/paste your program needs to respond to SelectionRequest events, something an Allegro program could not do without hacking Allegro to expose the X11 events that it monitors. For these reasons, an external program is the best solution to manage copy/paste on Linux. Since xsel, xclip and others don't manage images, I wrote my own program that does, xcsi. Copying to the clipboard (through xcsi) also works better, because xcsi stays running as long as it is the selection owner, as opposed to closing your program and losing the selection data.
What we need is someone experienced with MacOSX and obj-C to write clipboard code for OSX.