1 #ifndef CURSES_HELPER_HPP 
    2 #define CURSES_HELPER_HPP 
    4 #include <ncursesw/ncurses.h> 
   20     printf(
"\033[?1003l\n");
 
   25     int W = getmaxx(stdscr);
 
   26     int H = getmaxy(stdscr);
 
   27     mvprintw(H-1, W-1-6, 
"SIGINT");
 
   40     init_color(COLOR_BLACK, 0, 0, 0);
 
   42     short step = 
static_cast<short>(1000 / num_grays); 
 
   45     for(
short i=0; i < num_grays; i++)
 
   51         init_pair(pair_id, color_id, COLOR_BLACK);
 
   63     attron(COLOR_PAIR(color_pair_id));
 
   64     mvprintw(y, x, 
"%lc", sign);
 
   65     attroff(COLOR_PAIR(color_pair_id));
 
   73     short gray_short = 
static_cast<short>(gray * 
static_cast<float>(
CURSES_NUM_GRAYS) );
 
   79     int W = getmaxx(stdscr);
 
   80     int H = getmaxy(stdscr);
 
   82     for(
int y=0; y<H; y++)
 
   84         for(
int x=0; x<W; x++)
 
   86             wchar_t sign = L
'\u2800';
 
   95     mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, 
NULL);
 
   96     printf(
"\033[?1003h\n");
 
  106     keypad(stdscr, 
TRUE);
 
  110     nodelay(stdscr, 
TRUE);
 
  124     std::locale::global(std::locale(
"en_US.utf8"));
 
  125     std::wcout.imbue(std::locale());
 
  131     return getmaxx(stdscr);
 
  136     return getmaxy(stdscr);
 
  140 #endif // CURSES_HELPER_HPP