Beispiel #1
0
//SetClipboardString sets the system clipboard to the specified UTF-8 encoded
//string.
//
//This function may only be called from the main thread. See
//https://code.google.com/p/go-wiki/wiki/LockOSThread
func (w *Window) SetClipboardString(str string) {
	cp := C.CString(str)
	defer C.free(unsafe.Pointer(cp))

	C.glfwSetClipboardString(w.data, cp)
}
Beispiel #2
0
Datei: glfw.go Projekt: maun/glfw
// Clipboard
func SetClipboardString(window Window, s string) {
	cs := C.CString(s)
	defer C.free(unsafe.Pointer(cs))
	C.glfwSetClipboardString(C.GLFWwindow(window), cs)
}