gtk/gtk.go
func GetData(pointer uintptr) (data []byte) {
	c := (*C.GValue)(unsafe.Pointer(pointer))
	p := (*C.GtkSelectionData)(unsafe.Pointer(c))
	C.gtk_selection_data_get_text(p)

	var byteData []byte
	var length C.gint
	cptr := C.gtk_selection_data_get_data_with_length(p, &length)
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&byteData))
	sliceHeader.Data = uintptr(unsafe.Pointer(cptr))
	sliceHeader.Len = int(length)
	sliceHeader.Cap = int(length)

	return byteData
}
func GetData(pointer uintptr) (data []byte) {
	c := (*C.GValue)(unsafe.Pointer(pointer))
	p := (*C.GtkSelectionData)(unsafe.Pointer(c))
	C.gtk_selection_data_get_text(p)

	var byteData []byte
	var length C.gint
	cptr := C.gtk_selection_data_get_data_with_length(p, &length)
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&byteData))
	sliceHeader.Data = uintptr(unsafe.Pointer(cptr))
	sliceHeader.Len = int(length)
	sliceHeader.Cap = int(length)

	return byteData
}
//fixed GetData directly from ptr