ncurses (new curses) is a programming library for creating textual user interfaces (TUIs) that work across a wide variety of terminals. It is written in a way that attempts to optimize the commands that are sent to the terminal, to reduce the latency experienced when updating the displayed content.
Ncurses, short for “new curses “, is an evolution of the curses library by Ken Arnold as originally released in 1978 for BSD UNIX, where it saw use with a number of games like Rogue.
ncurses supports the features of SVr4 curses including keyboard mapping, color, form drawing with ACS characters, and automatic recognition of keypad and function keys.
In short, ncurses is a library that supports the creation of user interfaces on text terminals. Note that this tutorial covers almost everything you would ever want to know (or need) about ncurses and is designed for the C programming language.
This document is intended to be an "All in One" guide for programming with ncurses and its sister libraries. We graduate from a simple "Hello World" program to more complex form manipulation.
Ncurses is a programming library that provides an API for building text-based user interfaces in a terminal with C++, allowing developers to create visually appealing and interactive console applications.
DESCRIPTION top The ncurses library routines give the user a terminal-independent method of updating character screens with reasonable optimization. This implementation is “new curses” (ncurses) and is the approved replacement for 4.4BSD classic curses, which has been discontinued.
The curses package is a subroutine library for terminal-independent screen-painting and input-event handling which presents a high level screen model to the programmer, hiding differences between terminal types and doing automatic optimization of output to change one screen full of text into another.
Using ncurses, we can place text anywhere in the terminal, clear the screen, switch colors, and more. This is not a graphical mode, since we’re still just drawing characters, but we can use characters (including some special characters provided by ncurses) to create graphics-like output.