コード例 #1
0
ファイル: window.go プロジェクト: trotha01/goncurses
// 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)
}
コード例 #2
0
ファイル: curses.go プロジェクト: akrennmair/gocurse
func (w *Window) Mvaddstr(y, x int, str string) {
	C.mvwaddstr((*C.WINDOW)(w), C.int(y), C.int(x), C.CString(str))
}
コード例 #3
0
ファイル: ncurses.go プロジェクト: Olreich/ncurses
/* 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()
}
コード例 #4
0
ファイル: curses.go プロジェクト: tncardoso/gocurses
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)
}
コード例 #5
0
ファイル: ncurses.go プロジェクト: Olreich/ncurses
/* 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))
}