app: move system.ClipboardEvent to its own package

API change. Update your code with gofmt rule and goimports:

gofmt -r "system.ClipboardEvent -> clipboard.Event"
goimports

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Inkeliz
2020-12-04 03:56:13 +00:00
committed by Elias Naur
parent feb93baee0
commit 828f19304b
10 changed files with 30 additions and 20 deletions
+2 -1
View File
@@ -36,6 +36,7 @@ import (
"unsafe"
"gioui.org/f32"
"gioui.org/io/clipboard"
"gioui.org/io/key"
"gioui.org/io/pointer"
"gioui.org/io/system"
@@ -434,7 +435,7 @@ func (h *x11EventHandler) handleEvents() bool {
break
}
str := C.GoStringN((*C.char)(unsafe.Pointer(text.value)), C.int(text.nitems))
w.w.Event(system.ClipboardEvent{Text: str})
w.w.Event(clipboard.Event{Text: str})
case C.SelectionRequest:
cevt := (*C.XSelectionRequestEvent)(unsafe.Pointer(xev))
if cevt.selection != w.atoms.clipboard || cevt.property == C.None {