summaryrefslogtreecommitdiff
path: root/packages/extra/ncurses/testn.pp
blob: b60c41e4bd7b3ac16d139c99e91d5c87364c1604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{

  Simple ncurses test
}
program testn;
uses
  ncurses;

var
  win : pWINDOW;
begin
  if initscr=Nil then halt(1);
  start_color;
  win:= newwin (10,60,10,10);
  if win=nil then
   begin
     endwin;
     halt(1);
   end;
  init_pair(1,COLOR_WHITE,COLOR_BLUE);
  wbkgd(win, COLOR_PAIR(1));
  erase;
  refresh;
  box(win, ACS_VLINE, ACS_HLINE);
  wrefresh(win);
  mvwaddstr(win,1,1,'Press any key to continue !');
  wrefresh(win);
  raw;
  wgetch(win);
  endwin;
end.