mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:21:01 +08:00
27 lines
383 B
Go
27 lines
383 B
Go
package application
|
|
|
|
import "C"
|
|
|
|
type clipboardImpl interface {
|
|
setText(text string) bool
|
|
text() string
|
|
}
|
|
|
|
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 {
|
|
return c.impl.text()
|
|
}
|