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 }
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) }
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 }
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) }