diff options
author | Alexander Tkachev | 2016-07-26 12:21:15 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | b9bba9bd4bec1bf00a61c347f411a8ecf9ea69e8 (patch) | |
tree | dc84602db91c43f060dbcd7f869ace78132142ca /common | |
parent | 527ab4cdf6fc314cb260ae329d88794440b875ef (diff) | |
download | scummvm-rg350-b9bba9bd4bec1bf00a61c347f411a8ecf9ea69e8.tar.gz scummvm-rg350-b9bba9bd4bec1bf00a61c347f411a8ecf9ea69e8.tar.bz2 scummvm-rg350-b9bba9bd4bec1bf00a61c347f411a8ecf9ea69e8.zip |
ALL: Move Clipboard support to OSystem
Commit adds kFeatureClipboardSupport. hasTextInClipboard() and
getTextFromClipboard().
OSystem_SDL has this feature if SDL2 is used.
EditableWidget and StorageWizardDialog use g_system to access clipboard
now.
Diffstat (limited to 'common')
-rw-r--r-- | common/system.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/common/system.h b/common/system.h index 3cbeee7d82..805eba68ed 100644 --- a/common/system.h +++ b/common/system.h @@ -314,7 +314,15 @@ public: * * This feature has no associated state. */ - kFeatureDisplayLogFile + kFeatureDisplayLogFile, + + /** + * The presence of this feature indicates whether the hasTextInClipboard() + * and getTextFromClipboard() calls are supported. + * + * This feature has no associated state. + */ + kFeatureClipboardSupport }; /** @@ -1239,6 +1247,28 @@ public: virtual bool displayLogFile() { return false; } /** + * Returns whether there is text available in the clipboard. + * + * The kFeatureClipboardSupport feature flag can be used to + * test whether this call has been implemented by the active + * backend. + * + * @return true if there is text in the clipboard, false otherwise + */ + virtual bool hasTextInClipboard() { return false; } + + /** + * Returns clipboard contents as a String. + * + * The kFeatureClipboardSupport feature flag can be used to + * test whether this call has been implemented by the active + * backend. + * + * @return clipboard contents ("" if hasTextInClipboard() == false) + */ + virtual Common::String getTextFromClipboard() { return ""; } + + /** * Returns the locale of the system. * * This returns the currently set up locale of the system, on which |