mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-05 00:27:15 -04:00
Add iOS clipboard support
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//go:build (android && !termux) || ios
|
||||
|
||||
package core
|
||||
|
||||
import (
|
||||
"golang.design/x/clipboard"
|
||||
)
|
||||
|
||||
// copyString copies a string to the clipboard.
|
||||
func copyString(continuous bool, copySubject string) error {
|
||||
clipboard.Write(clipboard.FmtText, []byte(copySubject))
|
||||
if !continuous {
|
||||
LaunchClipClearProcess(copySubject)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user