aboutsummaryrefslogtreecommitdiff
path: root/copypasta/src/macos.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-10-08 18:42:33 -0700
committerJoe Wilm <joe@jwilm.com>2016-10-08 18:42:33 -0700
commit9d491f9f676536634040fea8294dc672f3466e26 (patch)
tree81d4ddc867c570a9004c3d878647feb69e0e2d91 /copypasta/src/macos.rs
parent7e69a070aaf92eff3bea1878bd77821b5ae60ede (diff)
downloadalacritty-9d491f9f676536634040fea8294dc672f3466e26.tar.gz
alacritty-9d491f9f676536634040fea8294dc672f3466e26.zip
Start implementing copypasta, a clipboard library
Currently it only supports x11 via the xclip program, and that only supports reading the clipboard contents.
Diffstat (limited to 'copypasta/src/macos.rs')
-rw-r--r--copypasta/src/macos.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/copypasta/src/macos.rs b/copypasta/src/macos.rs
new file mode 100644
index 00000000..5ef7630e
--- /dev/null
+++ b/copypasta/src/macos.rs
@@ -0,0 +1,19 @@
+//! Clipboard access on macOS
+//!
+//! Implemented according to https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/PasteboardGuide106/Articles/pbReading.html#//apple_ref/doc/uid/TP40008123-SW1
+//!
+//! FIXME implement this :)
+
+struct Clipboard;
+
+impl Load for Clipboard {
+ type Err = ();
+
+ fn new() -> Result<Self, Error> {
+ Ok(Clipboard)
+ }
+
+ fn load_primary(&self) -> Result<String, Self::Err> {
+ Ok(String::new())
+ }
+}