io/input,io/clipboard: [API] replace WriteOp with command

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-09 18:27:01 -05:00
parent a3c539b3c2
commit d51aea553f
16 changed files with 67 additions and 62 deletions
+2 -2
View File
@@ -308,8 +308,8 @@ func (w *window) ReadClipboard() {
w.w.Event(clipboard.Event{Text: content})
}
func (w *window) WriteClipboard(s string) {
cstr := stringToNSString(s)
func (w *window) WriteClipboard(mime string, s []byte) {
cstr := stringToNSString(string(s))
defer C.CFRelease(cstr)
C.writeClipboard(cstr)
}