app/clipboard: implement clipboard for Android

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-05-13 17:12:31 +02:00
parent a6dd70b2dc
commit 05dfceb7e7
6 changed files with 260 additions and 32 deletions
+20
View File
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: Unlicense OR MIT
// +build android
// Package clipboard accesses the system clipboard.
package clipboard
import (
"gioui.org/app/internal/window"
)
// Read the content of the clipboard as a string.
func Read() (string, error) {
return window.ReadClipboard()
}
// Write a string to the clipboard.
func Write(s string) error {
return window.WriteClipboard(s)
}