// Info retrieves the height, width, y, x, offset and buffer size of the // given field. Pass the memory addess of the variable to store the data // in or nil. func (f *Field) Info(h, w, y, x, off, nbuf *int) error { err := C.field_info((*C.FIELD)(f), (*C.int)(unsafe.Pointer(h)), (*C.int)(unsafe.Pointer(w)), (*C.int)(unsafe.Pointer(y)), (*C.int)(unsafe.Pointer(x)), (*C.int)(unsafe.Pointer(off)), (*C.int)(unsafe.Pointer(nbuf))) return ncursesError(syscall.Errno(err)) }
func (field *Field) Info() (int, int, int, int, int, int, error) { var ( height C.int width C.int top C.int left C.int offscreen C.int nbuf C.int ) if C.field_info((*C.FIELD)(field), &height, &width, &top, &left, &offscreen, &nbuf) != C.OK { return 0, 0, 0, 0, 0, 0, FormsError{"Field.Info failed"} } return int(height), int(width), int(top), int(left), int(offscreen), int(nbuf), nil }
func (f *Field) Info() (int, int, int, int, int, int, error) { var ( height C.int width C.int top C.int left C.int offscreen C.int nbuf C.int ) if C.field_info(f.field, &height, &width, &top, &left, &offscreen, &nbuf) == ERR { return 0, 0, 0, 0, 0, 0, errors.New("Field.Info failed") } return int(height), int(width), int(top), int(left), int(offscreen), int(nbuf), nil }