]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.clipboards: add some helper words
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 25 Oct 2023 18:01:33 +0000 (11:01 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 25 Oct 2023 18:01:33 +0000 (11:01 -0700)
basis/ui/clipboards/clipboards.factor

index 34df97a29c5fe1e2d9ce86d2f6a5ec7e13cd3061..87f3fd9b5232f48668dd86564898202d24b1a26a 100644 (file)
@@ -40,3 +40,9 @@ SYMBOL: selection
 : com-copy ( gadget -- ) clipboard get gadget-copy ;
 
 : com-copy-selection ( gadget -- ) selection get gadget-copy ;
+
+: >clipboard ( string -- )
+    clipboard get set-clipboard-contents ;
+
+: clipboard> ( -- string )
+    clipboard get clipboard-contents ;