Exemplo n.º 1
0
// MovePrintf moves the cursor to coordinates and prints the message using
// the specified format. See Printf and MovePrint for more information.
func (w *Window) MovePrintf(y, x int, format string, args ...interface{}) {
	cstr := C.CString(fmt.Sprintf(format, args...))
	defer C.free(unsafe.Pointer(cstr))

	C.mvwaddstr(w.win, C.int(y), C.int(x), cstr)
}
Exemplo n.º 2
0
func (w *Window) Mvaddstr(y, x int, str string) {
	C.mvwaddstr((*C.WINDOW)(w), C.int(y), C.int(x), C.CString(str))
}
Exemplo n.º 3
0
/* Like MovePrint, but clears the remainder of the line as well */
func (w *Window) MovePrintLine(x, y int, s string) {
	C.mvwaddstr((*C.WINDOW)(w), C.int(y), C.int(x), C.CString(s))
	w.ClearToEOL()
}
Exemplo n.º 4
0
func (window *Window) Mvaddstr(y, x int, str ...interface{}) {
	res := (*C.char)(C.CString(fmt.Sprint(str...)))
	defer C.free(unsafe.Pointer(res))
	C.mvwaddstr(window.cwin, C.int(y), C.int(x), res)
}
Exemplo n.º 5
0
/* Moves cursor to coordinates (x, y) and then prints string s */
func (w *Window) MovePrint(x, y int, s string) {
	C.mvwaddstr((*C.WINDOW)(w), C.int(y), C.int(x), C.CString(s))
}