Exemple #1
0
// Refresh will calculate how to update the physical screen in the most
// efficient manor and update it. See Window.Refresh for more details.
// The coordinates py, px specify the location on the pad from which the
// characters we want to display are located. sy and sx specify the location
// on the screen where this data should be displayed. h and w are the height
// and width of the rectangle to be displayed. The coodinates and the size
// of the rectangle must be contained within both the Pad's and Window's
// respective areas
func (p *Pad) Refresh(py, px, sy, sx, h, w int) error {
	if C.prefresh(p.win, C.int(py), C.int(px), C.int(sy), C.int(sx),
		C.int(h), C.int(w)) != C.OK {
		return errors.New("Failed to refresh pad")
	}
	return nil
}
Exemple #2
0
// Refresh given window, for pads.
func (window *Window) PRefresh(pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol int) {
	C.prefresh(window.cwin, C.int(pminrow), C.int(pmincol), C.int(sminrow), C.int(smincol), C.int(smaxrow), C.int(smaxcol))
}