Files

29 lines
465 B
Go
Raw Permalink Normal View History

2023-06-15 13:53:22 -05:00
//go:build linux
package application
import (
"sync"
)
var clipboardLock sync.RWMutex
type linuxClipboard struct{}
func (m linuxClipboard) setText(text string) bool {
clipboardLock.Lock()
defer clipboardLock.Unlock()
clipboardSet(text)
2023-10-02 20:47:04 +11:00
return true
2023-06-15 13:53:22 -05:00
}
func (m linuxClipboard) text() (string, bool) {
clipboardLock.RLock()
defer clipboardLock.RUnlock()
return clipboardGet(), true
2023-06-15 13:53:22 -05:00
}
func newClipboardImpl() *linuxClipboard {
return &linuxClipboard{}
}