mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 16:40:41 +08:00
25 lines
387 B
Go
25 lines
387 B
Go
package application
|
|
|
|
type clipboardImpl interface {
|
|
setText(text string) bool
|
|
text() (string, bool)
|
|
}
|
|
|
|
type Clipboard struct {
|
|
impl clipboardImpl
|
|
}
|
|
|
|
func newClipboard() *Clipboard {
|
|
return &Clipboard{
|
|
impl: newClipboardImpl(),
|
|
}
|
|
}
|
|
|
|
func (c *Clipboard) SetText(text string) bool {
|
|
return c.impl.setText(text)
|
|
}
|
|
|
|
func (c *Clipboard) Text() (string, bool) {
|
|
return c.impl.text()
|
|
}
|