They do include the "canvas" level, too. For example, save the following as example.c,
Originally Posted by PedroTuga
then compile and run it using e.g.
static const char msg = "Press Q to Quit";
/* Start curses. Also sets LINES and COLS. */
/* Pass every character immediately, not buffered. */
/* Clear the screen. */
/* Print "X" at the center of the screen, */
mvaddch(LINES/2, COLS/2, 'X');
/* and msg centered at the bottom. */
mvaddstr(LINES-1, (COLS-strlen(msg))/2, msg);
/* Move the cursor to the center of the screen too. */
/* Refresh the screen. */
/* Wait for a keypress. */
c = getch();
} while (c != 'Q' && c != 'q');
/* Done. Return the terminal back to its normal state. */
It is pretty much the lowest level you should bother.
cc example.c -lcurses -o example
If you resize the terminal window -- mine are practically never exactly 80 columns wide, nowadays --, it is seen as a keypress by the above program. Since it is not Q, it will redraw the screen. However, that screen update "keypress" also updates LINES and COLS, which means that the next iteration of the loop will redraw everything correctly, as per the resized terminal window. It's quite nifty, and pretty much exactly what I want from such a "terminal canvas".
As a programmer, all you need to remember is that COLS is not always 80, and LINES is not always 25 or 43 or 50, and both may change at any point if the user resizes the terminal window.
In Windows, you can use pdcurses, but I have no idea about the installation or compilation details since I don't use Windows at all. Maybe someone else can point out those details?