LXV. Ncurses terminal screen control functions

ncurses (new curses) is a free software emulation of curses in System V Rel 4.0 (and above). It uses terminfo format, supports pads, colors, multiple highlights, form characters and function key mapping.

To get these functions to work, you have to compile the CGI version of PHP with --with-ncurses. That requires the ncurses library to be installed. Download the latest version from ftp://ftp.gnu.org/pub/gnu/ncurses/, compile and install it.

Table of Contents
ncurses_can_change_color -- Check if we can change terminals colors
ncurses_cbreak -- Switch of input buffering
ncurses_clear -- Clear screen
ncurses_clrtobot -- Clear screen from current position to bottom
ncurses_clrtoeol -- Clear screen from current position to end of line
ncurses_def_prog_mode -- Saves terminals (program) mode
ncurses_def_shell_mode -- Saves terminals (shell) mode
ncurses_delch -- Delete character at current position, move rest of line left
ncurses_deleteln -- Delete line at current position, move rest of screen up
ncurses_doupdate -- Write all prepared refreshes to terminal
ncurses_echo -- Activate keyboard input echo
ncurses_erase -- Erase terminal screen
ncurses_erasechar -- Returns current erase character
ncurses_flash -- Flash terminal screen (visual bell)
ncurses_flushinp -- Flush keyboard input buffer
ncurses_has_colors -- Check if terminal has colors
ncurses_has_ic -- Check for insert- and delete-capabilities
ncurses_has_il -- Check for line insert- and delete-capabilities
ncurses_inch -- Get character and attribute at current position
ncurses_insertln -- Insert a line, move rest of screen down
ncurses_isendwin -- Ncurses is in endwin mode, normal screen output may be performed
ncurses_killchar -- Returns current line kill character
ncurses_nl -- Translate newline and carriage return / line feed
ncurses_nocbreak -- Switch terminal to cooked mode
ncurses_noecho -- Switch off keyboard input echo
ncurses_nonl -- Do not translate newline and carriage return / line feed
ncurses_noraw -- Switch terminal out of raw mode
ncurses_raw -- Switch terminal into raw mode
ncurses_resetty -- Restores saved terminal state
ncurses_savetty -- Saves terminal state
ncurses_slk_init -- Initializes soft label key functions
ncurses_slk_attr -- Returns current soft label key attribute
ncurses_slk_clear -- Clears soft labels from screen
ncurses_slk_noutrefresh -- Copies soft label keys to virtual screen
ncurses_slk_refresh -- Copies soft label keys to screen
ncurses_slk_restore -- Restores soft label keys
ncurses_slk_touch -- Fources output when ncurses_slk_noutrefresh is performed
ncurses_termattrs -- Returns a logical OR of all attribute flags supported by terminal
ncurses_use_default_colors -- Assign terminal default colors to color id -1
ncurses_addch -- Add character at current position and advance cursor
ncurses_addchnstr -- Add attributed string with specified length at current position
ncurses_addchstr -- Add attributed string at current position
ncurses_addnstr -- Add string with specified length at current position
ncurses_addstr -- Output text at current position
ncurses_assume_default_colors -- Define default colors for color 0
ncurses_attroff -- Turn off the given attributes
ncurses_attron -- Turn on the given attributes
ncurses_attrset -- Set given attributes
ncurses_baudrate -- Returns baudrate of terminal
ncurses_beep -- Let the terminal beep
ncurses_bkgd -- Set background property for terminal screen
ncurses_border -- Draw a border around the screen using attributed characters
ncurses_color_set -- Set fore- and background color
ncurses_curs_set -- Set cursor state
ncurses_define_key -- Define a keycode
ncurses_delay_output -- Delay output on terminal using padding characters
ncurses_delwin -- Delete a ncurses window
ncurses_echochar -- Single character output including refresh
ncurses_end -- Stop using ncurses, clean up the screen
ncurses_filter -- 
ncurses_getch -- Read a character from keyboard
ncurses_halfdelay -- Put terminal into halfdelay mode
ncurses_has_key -- Check for presence of a function key on terminal keyboard
ncurses_hline -- Draw a horizontal line at current position using an attributed character and max. n characters long
ncurses_init -- Initialize ncurses
ncurses_init_color -- Set new RGB value for color
ncurses_init_pair -- Allocate a color pair
ncurses_insch -- Insert character moving rest of line including character at current position
ncurses_insdelln -- Insert lines before current line scrolling down (negative numbers delete and scroll up)
ncurses_insstr -- Insert string at current position, moving rest of line right
ncurses_instr -- Reads string from terminal screen
ncurses_keyok -- Enable or disable a keycode
ncurses_mouseinterval -- Set timeout for mouse button clicks
ncurses_move -- Move output position
ncurses_mvaddch -- Move current position and add character
ncurses_mvaddchnstr -- Move position and add attrributed string with specified length
ncurses_mvaddchstr -- Move position and add attributed string
ncurses_mvaddnstr -- Move position and add string with specified length
ncurses_mvaddstr -- Move position and add string
ncurses_mvcur -- Move cursor immediately
ncurses_mvdelch -- Move position and delete character, shift rest of line left
ncurses_mvgetch -- Move position and get character at new position
ncurses_mvhline -- Set new position and draw a horizontal line using an attributed character and max. n characters long
ncurses_mvinch -- Move position and get attributed character at new position
ncurses_mvvline -- Set new position and draw a vertical line using an attributed character and max. n characters long
ncurses_mvwaddstr -- Add string at new position in window
ncurses_napms -- Sleep
ncurses_newwin -- Create a new window
ncurses_noqiflush -- Do not flush on signal characters
ncurses_putp -- 
ncurses_qiflush -- Flush on signal characters
ncurses_refresh -- Refresh screen
ncurses_scr_dump -- Dump screen content to file
ncurses_scr_init -- Initialize screen from file dump
ncurses_scr_restore -- Restore screen from file dump
ncurses_scr_set -- Inherit screen from file dump
ncurses_scrl -- Scroll window content up or down without changing current position
ncurses_slk_attroff -- 
ncurses_slk_attron -- 
ncurses_slk_attrset -- 
ncurses_slk_color -- 
ncurses_standend -- Stop using 'standout' attribute
ncurses_standout -- Start using 'standout' attribute
ncurses_start_color -- Start using colors
ncurses_typeahead -- Specify different filedescriptor for typeahead checking
ncurses_ungetch -- Put a character back into the input stream
ncurses_use_extended_names -- Control use of extended names in terminfo descriptions
ncurses_vidattr -- 
ncurses_vline -- Draw a vertical line at current position using an attributed character and max. n characters long
ncurses_wrefresh -- Refresh window on terminal screen
ncurses_bkgdset -- Control screen background
ncurses_timeout -- Set timeout for special key sequences
ncurses_use_env -- Control use of environment information about terminal size
ncurses_termname -- Returns terminals (short)-name
ncurses_longname -- Returns terminals description
ncurses_mousemask -- Sets mouse options
ncurses_getmouse -- Reads mouse event
ncurses_ungetmouse -- Pushes mouse event to queue