From 268e9e44b8fd52a75bb53e319495166931d3a77c Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 16 May 2020 20:25:56 +0200 Subject: [PATCH] io/system: add ClipboardEvent for sending clipboard updates Not wired up yet; each platform needs implementing low-level access first. Updates gio#31 Signed-off-by: Elias Naur --- io/system/system.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/io/system/system.go b/io/system/system.go index dd8faf40..97f491f8 100644 --- a/io/system/system.go +++ b/io/system/system.go @@ -64,6 +64,12 @@ type DestroyEvent struct { Err error } +// ClipboardEvent is sent once for each request for the +// clipboard content. +type ClipboardEvent struct { + Text string +} + // Insets is the space taken up by // system decoration such as translucent // system bars and software keyboards. @@ -115,7 +121,8 @@ func (l Stage) String() string { } } -func (FrameEvent) ImplementsEvent() {} -func (StageEvent) ImplementsEvent() {} -func (*CommandEvent) ImplementsEvent() {} -func (DestroyEvent) ImplementsEvent() {} +func (FrameEvent) ImplementsEvent() {} +func (StageEvent) ImplementsEvent() {} +func (*CommandEvent) ImplementsEvent() {} +func (DestroyEvent) ImplementsEvent() {} +func (ClipboardEvent) ImplementsEvent() {}