gtk-screen: Implement cut/paste.
authorMatt Birkholz <puck@birchwood-abbey.net>
Mon, 16 Jan 2017 19:17:54 +0000 (12:17 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Mon, 16 Jan 2017 19:17:54 +0000 (12:17 -0700)
src/gtk-screen/gtk-screen.pkg
src/gtk-screen/gtk-screen.scm

index b153ab13da70ad6f5542a4ea67ba1e548a31f19a..b15940e30ddae42413f3d466bc5b3ac1dbe3f3bf 100644 (file)
@@ -151,6 +151,8 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
          gtk-window-present
          gtk-window-set-title
          gtk-window-set-default-size
+         gtk-window-get-clipboard-text
+         gtk-window-set-clipboard-text
 
          set-scm-widget-minimum-size!
          set-scm-widget-natural-size!
index c70003ecce96ac47de5dfd3a9a5e2afc0207cc72..f72e7c44164eb6198829f551b1e6dd5ff295992e 100644 (file)
@@ -660,6 +660,19 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
         (%trace2 ";read => "event"\n")
         event)))))
 
+(set!
+ os/interprogram-cut
+ (named-lambda (os/interprogram-cut string point)
+   (declare (ignore point))
+   (gtk-window-set-clipboard-text (gtk-screen-toplevel (selected-screen))
+                                 (string->utf8-string string))))
+
+(set!
+ os/interprogram-paste
+ (named-lambda (os/interprogram-paste point)
+   (declare (ignore point))
+   (gtk-window-get-clipboard-text (gtk-screen-toplevel (selected-screen)))))
+
 (define interrupts?)
 
 (define (interrupt!)