// GetClipboardString returns the contents of the system clipboard, if it // contains or is convertible to a UTF-8 encoded string. // // This function may only be called from the main thread. func (w *Window) GetClipboardString() (string, error) { cs := C.glfwGetClipboardString(w.data) if cs == nil { return "", acceptError(FormatUnavailable) } return C.GoString(cs), nil }
//GetClipboardString returns the contents of the system clipboard, if it //contains or is convertible to a 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) GetClipboardString() (string, error) { cs := C.glfwGetClipboardString(w.data) if cs == nil { return "", errors.New("Can't get clipboard string.") } return C.GoString(cs), nil }
func ClipboardString(window Window) string { cs := C.glfwGetClipboardString(C.GLFWwindow(window)) return C.GoString(cs) }