mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
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:
@@ -12,6 +12,7 @@ import (
|
||||
"unicode/utf8"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/io/clipboard"
|
||||
"gioui.org/io/key"
|
||||
"gioui.org/io/pointer"
|
||||
"gioui.org/io/system"
|
||||
@@ -59,7 +60,7 @@ func NewWindow(win Callbacks, opts *Options) error {
|
||||
})
|
||||
w.clipboardCallback = w.funcOf(func(this js.Value, args []js.Value) interface{} {
|
||||
content := args[0].String()
|
||||
win.Event(system.ClipboardEvent{Text: content})
|
||||
win.Event(clipboard.Event{Text: content})
|
||||
return nil
|
||||
})
|
||||
w.addEventListeners()
|
||||
|
||||
Reference in New Issue
Block a user