示例#1
0
// SetBuffer sets the visible characters in the field. A buffer is empty by
// default.
func (f *Field) SetBuffer(s string) error {
	cstr := C.CString(s)
	defer C.free(unsafe.Pointer(cstr))

	err := C.set_field_buffer((*C.FIELD)(f), C.int(0), cstr)
	return ncursesError(syscall.Errno(err))
}
示例#2
0
文件: forms.go 项目: mpatraw/gocurse
func (field *Field) SetBuffer(ind int, message string) bool {
	return isOk(C.set_field_buffer((*C.FIELD)(field), C.int(ind), C.CString(message)))
}
示例#3
0
文件: form.go 项目: zozor/gocurse
func (f *Field) SetBuffer(ind int, message string) error { //Memoryleak
	return geterror(C.set_field_buffer(f.field, C.int(ind), C.CString(message)))
}