Next: , Previous: Refresh routines, Up: The basic curses library   [Contents][Index]


5.2.38 Miscellaneous utilities

Procedure: unctrl ch

The unctrl routine returns a character string which is a printable representation of the character ch, ignoring attributes. Control characters are displayed in the ^X notation. Printing characters are displayed as is.

Procedure: keyname ch

The keyname routine returns a character string corresponding to the key ch. Control characters are displayed in the ^X notation. Values above 128 are either meta characters, shown in the M-X notation, or the names of function keys, or null.

Procedure: use-env f

The use-env routine, if used, is called before initscr or newterm are called. When called with #f as an argument, the values of lines and columns specified in the terminfo database will be used, even if environment variables LINES and COLUMNS (used by default) are set, or if curses is running in a window (in which case default behavior would be to use the window size if LINES and COLUMNS are not set). Note that setting LINES or COLUMNS overrides the corresponding size which may be obtained from the operating system.

Procedure: putwin win file

The putwin routine writes all data associated with window win into the #<file> file. This information can be later retrieved using the getwin function.

Procedure: getwin file

The getwin routine reads window related data stored in the file by putwin. The routine then creates and initializes a new window using that data. It returns a new #<window>

Procedure: delay-output ms

The delay-output routine inserts an ms millisecond pause in output. This routine should not be used extensively because padding characters are used rather than a CPU pause.

The return value is unspecified.

Procedure: flushinp

The flushinp routine throws away any typeahead that has been typed by the user and has not yet been read by the program.

The return value is unspecified.

Procedure: curses-version

Returns a string that indicates the version of ncurses being used, for example “ncurses 5.9”.

Procedure: %filter

This procedure, when called before initscr, restricts the activity of curses to a single line, instead of the to the entire screen.


Next: , Previous: Refresh routines, Up: The basic curses library   [Contents][Index]