示例#1
0
文件: forms.go 项目: mpatraw/gocurse
func NewField(height int, width int, top int, left int, offscreen int, nbuf int) (*Field, error) {
	field := (*Field)(C.new_field(C.int(height), C.int(width), C.int(top), C.int(left), C.int(offscreen), C.int(nbuf)))
	if field == nil {
		return nil, FormsError{"NewField failed"}
	}
	return field, nil
}
示例#2
0
func NewField(h, w, tr, lc, oscr, nbuf int) (*Field, error) {
	var new_field Field
	var err error
	new_field.field, err = C.new_field(C.int(h), C.int(w), C.int(tr), C.int(lc),
		C.int(oscr), C.int(nbuf))
	return &new_field, ncursesError(err)
}
示例#3
0
文件: form.go 项目: zozor/gocurse
func NewField(height int, width int, top int, left int, offscreen int, nbuf int) (*Field, error) {
	field := C.new_field(C.int(height), C.int(width), C.int(top), C.int(left), C.int(offscreen), C.int(nbuf))
	if field == nil {
		return nil, errors.New("NewField failed")
	}
	return &Field{field}, nil
}
示例#4
0
func NewField(h, w, tr, lc, oscr, nbuf int32) (*Field, error) {
	f, err := C.new_field(C.int(h), C.int(w), C.int(tr), C.int(lc),
		C.int(oscr), C.int(nbuf))
	return (*Field)(f), ncursesError(err)
}