commit
24ffdadbf8
|
@ -494,3 +494,19 @@ func (w *Window) Show() {
|
||||||
w.window.Show()
|
w.window.Show()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clipboard returns the contents of the system clipboard.
|
||||||
|
func (w *Window) Clipboard() string {
|
||||||
|
var clipboard string
|
||||||
|
mainthread.Call(func() {
|
||||||
|
clipboard = w.window.GetClipboardString()
|
||||||
|
})
|
||||||
|
return clipboard
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetClipboardString sets the system clipboard to the specified UTF-8 encoded string.
|
||||||
|
func (w *Window) SetClipboard(str string) {
|
||||||
|
mainthread.Call(func() {
|
||||||
|
w.window.SetClipboardString(str)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue