|
box 会话窗口边框,函数原型为:
int box(WINDOW *win, chtype verch, chtype horch);
测试代码:
#include <curses.h>
#include <stdlib.h>
int main()
{
WINDOW *win_ptr;
int scroll_line;
initscr();
win_ptr = newwin(10, 10, 10, 10);
box(win_ptr, '|', '-');
mvwprintw(win_ptr, 5, 5, "%s", "test");
wrefresh(win_ptr);
sleep(3);
scrollok(win_ptr, 1);
for( scroll_line = 0; scroll_line < 5; scroll_line++) {
scroll(win_ptr);
//touchwin(win_ptr);
wrefresh(win_ptr);
sleep(1);
}
delwin(win_ptr); /*删除窗口*/
endwin();
exit(EXIT_SUCCESS);
}
|
|