// GetClipboardText (https://wiki.libsdl.org/SDL_GetClipboardText) func GetClipboardText() (string, error) { text := C.SDL_GetClipboardText() if text == nil { return "", GetError() } defer C.SDL_free(unsafe.Pointer(text)) _text := C.GoString(text) return _text, nil }
// GetClipboardText returns text from the clipboard. // // Note: A Window must be created before calling this function. func GetClipboardText() (text string, err error) { s := C.SDL_GetClipboardText() if s == nil { return "", getError() } defer C.SDL_free(unsafe.Pointer(s)) text = C.GoString(s) return text, nil }
func GetClipboardText() string { return C.GoString(C.SDL_GetClipboardText()) }
func GetClipboardText() string { ctext := C.SDL_GetClipboardText() defer C.SDL_free(unsafe.Pointer(ctext)) return C.GoString(ctext) }
// GetClipboardText (https://wiki.libsdl.org/SDL_GetClipboardText) func GetClipboardText() string { text := C.SDL_GetClipboardText() defer C.SDL_free(unsafe.Pointer(text)) _text := C.GoString(text) return _text }