aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/COSOperator.cpp
diff options
context:
space:
mode:
authorDesour <vorunbekannt75@web.de>2022-08-23 17:19:23 +0200
committersfan5 <sfan5@live.de>2023-03-24 17:59:06 +0100
commit53b9eaa83172478f9ddffb88d946801a1c57c8f0 (patch)
treeb5df510a1ce4bbcbb17869b23fb79457966f2da2 /source/Irrlicht/COSOperator.cpp
parent1967d71cfba23fb54ac88cea64673f73af13bfda (diff)
downloadirrlicht-53b9eaa83172478f9ddffb88d946801a1c57c8f0.tar.xz
Implement X11 primary selection
Diffstat (limited to 'source/Irrlicht/COSOperator.cpp')
-rw-r--r--source/Irrlicht/COSOperator.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/source/Irrlicht/COSOperator.cpp b/source/Irrlicht/COSOperator.cpp
index 25b04ad..906035a 100644
--- a/source/Irrlicht/COSOperator.cpp
+++ b/source/Irrlicht/COSOperator.cpp
@@ -54,7 +54,6 @@ const core::stringc& COSOperator::getOperatingSystemVersion() const
//! copies text to the clipboard
-//! \param text: text in utf-8
void COSOperator::copyToClipboard(const c8 *text) const
{
if (strlen(text)==0)
@@ -102,8 +101,20 @@ void COSOperator::copyToClipboard(const c8 *text) const
}
+//! copies text to the primary selection
+void COSOperator::copyToPrimarySelection(const c8 *text) const
+{
+ if (strlen(text)==0)
+ return;
+
+#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
+ if ( IrrDeviceLinux )
+ IrrDeviceLinux->copyToPrimarySelection(text);
+#endif
+}
+
+
//! gets text from the clipboard
-//! \return Returns 0 if no string is in there, otherwise an utf-8 string.
const c8* COSOperator::getTextFromClipboard() const
{
#if defined(_IRR_WINDOWS_API_)
@@ -147,6 +158,21 @@ const c8* COSOperator::getTextFromClipboard() const
}
+//! gets text from the primary selection
+const c8* COSOperator::getTextFromPrimarySelection() const
+{
+#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
+ if ( IrrDeviceLinux )
+ return IrrDeviceLinux->getTextFromPrimarySelection();
+ return 0;
+
+#else
+
+ return 0;
+#endif
+}
+
+
bool COSOperator::getSystemMemory(u32* Total, u32* Avail) const
{
#if defined(_IRR_WINDOWS_API_)