// GetWinSize returns WinSize object to represent width and height of terminal.
493303
func (t *PosixParser) GetWinSize() *WinSize {
	ws := &ioctlWinsize{}
	retCode, _, errno := syscall.Syscall(
		syscall.SYS_IOCTL,
		uintptr(t.fd),
		uintptr(syscall.TIOCGWINSZ),
		uintptr(unsafe.Pointer(ws)))

	if int(retCode) == -1 {
		panic(errno)
	}
	return &WinSize{
		Row: ws.Row,
		Col: ws.Col,
	}
}
1114087
func (surface *XlibSurface) GetWidth() int {
	ret := int(C.cairo_xlib_surface_get_width(surface.Ptr))
	if err := surface.status(); err != nil {
		panic(err)
	}
	return ret
}
1054663
func (c *Label) GetWidth() int {
	if c.width == -1 {
		if c.bordered {
			return len(c.value) + 2
		}
		return len(c.value)
	}
	return c.width
}
72919
func (document *Document) GetSize() (int, int) {
	width := C.long(0)
	heigth := C.long(0)
	C.get_document_size(document.handle, &width, &heigth)
	return int(width), int(heigth)
}
38321
func (r *Render) UpdateWinSize(ws *WinSize) {
	r.row = ws.Row
	r.col = ws.Col
	return
}
1283489
func (t TTY) GetSize() *remotecommand.TerminalSize {
	outFd, isTerminal := term.GetFdInfo(t.Out)
	if !isTerminal {
		return nil
	}
	return GetSize(outFd)
}
585736
func (p *JSONProgress) width() int {
	if p.winSize != 0 {
		return p.winSize
	}
	ws, err := term.GetWinsize(p.terminalFd)
	if err == nil {
		return int(ws.Width)
	}
	return 200
}
664531
func (t *TreeEntry) GetSize() int {
	if t == nil || t.Size == nil {
		return 0
	}
	return *t.Size
}
742446
func (d *Datastore) GetSize(key ds.Key) (size int, err error) {
	return d.child.GetSize(d.ConvertKey(key))
}
1190244
func (w *Window) GetSize() (width, height int) {
	var wi, h C.int
	C.glfwGetWindowSize(w.data, &wi, &h)
	return int(wi), int(h)
}
307761
func GetSize(imagePath string) (int, int) {
	file, err := os.Open(imagePath)
	defer file.Close()
	if err != nil {
		log.Println(err)
	}

	img, _, err := image.DecodeConfig(file)
	if err != nil {
		log.Println(imagePath, err)
	}

	w := img.Width / 2
	h := img.Height / 2

	return w, h
}
261358
func (r *RepositoryLicense) GetSize() int {
	if r == nil || r.Size == nil {
		return 0
	}
	return *r.Size
}
1011137
func StartWithSize(c *exec.Cmd, sz *Winsize) (pty *os.File, err error) {
	pty, tty, err := Open()
	if err != nil {
		return nil, err
	}
	defer tty.Close()
	if sz != nil {
		err = Setsize(pty, sz)
		if err != nil {
			pty.Close()
			return nil, err
		}
	}
	if c.Stdout == nil {
		c.Stdout = tty
	}
	if c.Stderr == nil {
		c.Stderr = tty
	}
	if c.Stdin == nil {
		c.Stdin = tty
	}
	if c.SysProcAttr == nil {
		c.SysProcAttr = &syscall.SysProcAttr{}
	}
	c.SysProcAttr.Setctty = true
	c.SysProcAttr.Setsid = true
	c.SysProcAttr.Ctty = int(tty.Fd())
	err = c.Start()
	if err != nil {
		pty.Close()
		return nil, err
	}
	return pty, err
}
1055837
func (_class PVSCacheStorageClass) GetSize(sessionID SessionRef, self PVSCacheStorageRef) (_retval int, _err error) {
	_method := "PVS_cache_storage.get_size"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertPVSCacheStorageRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertIntToGo(_method + " -> ", _result.Value)
	return
}
681529
func (window *Window) GetMinimumSize() (w, h int32) {
	var _w, _h C.int
	C.SDL_GetWindowMinimumSize(window.cptr(), &_w, &_h)
	return int32(_w), int32(_h)
}
581023
func (writer *ConsoleWriter) RotateSize() int64 {
	writer.lock.RLock()
	defer writer.lock.RUnlock()

	return 0
}
777152
func GetScreenSize() (int, int) {
	size := C.get_screen_size()
	// fmt.Println("...", size, size.width)
	return int(size.width), int(size.height)
}