aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/CIrrDeviceLinux.h
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/CIrrDeviceLinux.h
parent1967d71cfba23fb54ac88cea64673f73af13bfda (diff)
downloadirrlicht-53b9eaa83172478f9ddffb88d946801a1c57c8f0.tar.xz
Implement X11 primary selection
Diffstat (limited to 'source/Irrlicht/CIrrDeviceLinux.h')
-rw-r--r--source/Irrlicht/CIrrDeviceLinux.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/Irrlicht/CIrrDeviceLinux.h b/source/Irrlicht/CIrrDeviceLinux.h
index 2d8945c..544a736 100644
--- a/source/Irrlicht/CIrrDeviceLinux.h
+++ b/source/Irrlicht/CIrrDeviceLinux.h
@@ -97,11 +97,20 @@ namespace irr
//! \return Returns 0 if no string is in there, otherwise utf-8 text.
virtual const c8 *getTextFromClipboard() const;
+ //! gets text from the primary selection
+ //! \return Returns 0 if no string is in there, otherwise utf-8 text.
+ virtual const c8 *getTextFromPrimarySelection() const;
+
//! copies text to the clipboard
- //! This sets the clipboard selection and _not_ the primary selection which you have on X on the middle mouse button.
+ //! This sets the clipboard selection and _not_ the primary selection.
//! @param text The text in utf-8
virtual void copyToClipboard(const c8 *text) const;
+ //! copies text to the primary selection
+ //! This sets the primary selection which you have on X on the middle mouse button.
+ //! @param text The text in utf-8
+ virtual void copyToPrimarySelection(const c8 *text) const;
+
//! Remove all messages pending in the system message loop
void clearSystemMessages() override;
@@ -141,6 +150,9 @@ namespace irr
bool createInputContext();
void destroyInputContext();
EKEY_CODE getKeyCode(XEvent &event);
+
+ const c8 *getTextFromSelection(Atom selection, core::stringc &text_buffer) const;
+ bool becomeSelectionOwner(Atom selection) const;
#endif
//! Implementation of the linux cursor control
@@ -413,6 +425,7 @@ namespace irr
bool HasNetWM;
// text is utf-8
mutable core::stringc Clipboard;
+ mutable core::stringc PrimarySelection;
#endif
#if defined(_IRR_LINUX_X11_XINPUT2_)
int currentTouchedCount;