//go:build !windows
// +build !windows

package pty

import (
	
	
	
)

// Winsize describes the terminal size.
type Winsize struct {
	Rows uint16 // ws_row: Number of rows (in cells).
	Cols uint16 // ws_col: Number of columns (in cells).
	X    uint16 // ws_xpixel: Width in pixels.
	Y    uint16 // ws_ypixel: Height in pixels.
}

// Setsize resizes t to s.
func ( *os.File,  *Winsize) error {
	//nolint:gosec // Expected unsafe pointer for Syscall call.
	return ioctl(, syscall.TIOCSWINSZ, uintptr(unsafe.Pointer()))
}

// GetsizeFull returns the full terminal size description.
func ( *os.File) ( *Winsize,  error) {
	var  Winsize

	//nolint:gosec // Expected unsafe pointer for Syscall call.
	if  := ioctl(, syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&)));  != nil {
		return nil, 
	}
	return &, nil
}