summaryrefslogtreecommitdiff
path: root/src/utils/copynpaste.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/copynpaste.cpp')
-rw-r--r--src/utils/copynpaste.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 1f88d8abf..45729021e 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -470,6 +470,24 @@ static bool runxsel(std::string& text, const char *p1, const char *p2)
return true;
}
+#elif defined __native_client__
+
+#include "utils/process.h"
+
+bool retrieveBuffer(std::string& text, size_t& pos)
+{
+ NaclMessageHandle *handle = naclRegisterMessageHandler("clipboard-paste");
+ naclPostMessage("clipboard-paste", "");
+ std::string response = naclWaitForMessage(handle);
+ text.insert(pos, response);
+ return true;
+}
+
+bool sendBuffer(std::string& text)
+{
+ naclPostMessage("clipboard-copy", text);
+ return true;
+}
#else
bool retrieveBuffer(std::string&, size_t&)
{