OSYSTEM: Add API to copy text to clipboard

This has also been implemented for the SDL2 and macOS backends.
This commit is contained in:
Thierry Crozat 2018-04-10 23:41:10 +01:00
parent a23216fbfc
commit 3fe0e3c38e
7 changed files with 36 additions and 3 deletions

View file

@ -124,6 +124,10 @@ Common::String OSystem_MacOSX::getTextFromClipboard() {
return getTextFromClipboardMacOSX();
}
bool OSystem_MacOSX::setTextInClipboard(const Common::String &text) {
return setTextInClipboardMacOSX(text);
}
bool OSystem_MacOSX::openUrl(const Common::String &url) {
CFURLRef urlRef = CFURLCreateWithBytes (NULL, (UInt8*)url.c_str(), url.size(), kCFStringEncodingASCII, NULL);
OSStatus err = LSOpenCFURLRef(urlRef, NULL);