Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
neko-custom/server/internal/clip/clip.go
2020-02-02 22:48:23 +00:00

22 lines
439 B
Go

// NOTE: I have no fucking clue what I'm doing with this,
// it works, but I am positive I'm doing this very wrong...
// should I be freeing these strings? does go cg them?
// pretty sure this *isn't* thread safe either.... /shrug
package clip
/*
#cgo linux LDFLAGS: -lclipboard
#include "clip.h"
*/
import "C"
func Read() string {
return C.GoString(C.get_clipboard())
}
func Write(data string) {
C.set_clipboard(C.CString(data))
}