diff options
author | Thierry Crozat | 2018-04-10 23:41:10 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-04-29 21:47:10 +0100 |
commit | 3fe0e3c38ee63534486a4353cdab1cfc76dab74f (patch) | |
tree | 99511156232ea131938e8fa83807c675862f23e3 /common | |
parent | a23216fbfcbe5b345f27d648775e6da6780e4dbd (diff) | |
download | scummvm-rg350-3fe0e3c38ee63534486a4353cdab1cfc76dab74f.tar.gz scummvm-rg350-3fe0e3c38ee63534486a4353cdab1cfc76dab74f.tar.bz2 scummvm-rg350-3fe0e3c38ee63534486a4353cdab1cfc76dab74f.zip |
OSYSTEM: Add API to copy text to clipboard
This has also been implemented for the SDL2 and macOS backends.
Diffstat (limited to 'common')
-rw-r--r-- | common/system.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/common/system.h b/common/system.h index 206c3134c4..a0034ee874 100644 --- a/common/system.h +++ b/common/system.h @@ -324,8 +324,8 @@ public: kFeatureDisplayLogFile, /** - * The presence of this feature indicates whether the hasTextInClipboard() - * and getTextFromClipboard() calls are supported. + * The presence of this feature indicates whether the hasTextInClipboard(), + * getTextFromClipboard() and setTextInClipboard() calls are supported. * * This feature has no associated state. */ @@ -1336,6 +1336,17 @@ public: virtual Common::String getTextFromClipboard() { return ""; } /** + * Set the content of the clipboard to the given string. + * + * The kFeatureClipboardSupport feature flag can be used to + * test whether this call has been implemented by the active + * backend. + * + * @return true if the text was properly set in the clipboard, false otherwise + */ + virtual bool setTextInClipboard(const Common::String &text) { return false; } + + /** * Open the given Url in the default browser (if available on the target * system). * |