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


5.2.26 Low-level routines

The following routines give low-level access to various curses capabilities. Theses routines typically are used inside library routines.

Procedure: def-prog-mode
Procedure: def-shell-mode

The def-prog-mode and def-shell-mode routines save the current terminal modes as the "program" (in curses) or "shell" (not in curses) state for use by the reset-prog-mode and reset-shell-mode routines. This is done automatically by initscr. There is one such save area for each screen context allocated by newterm.

They return #t on success and #f on failure.

Procedure: reset-prog-mode
Procedure: reset-shell-mode

The reset-prog-mode and reset-shell-mode routines restore the terminal to "program" (in curses) or "shell" (out of curses) state. These are done automatically by endwin and, after an endwin, by doupdate, so they normally are not called.

Returns #t on success or #f on failure. Failure could indicate that this terminal was created with newterm and thus doesn’t have a previous state.

Procedure: resetty
Procedure: savetty

The resetty and savetty routines save and restore the state of the terminal modes. savetty saves the current state in a buffer and resetty restores the state to what it was at the last call to savetty.

Returns #t on success or #f on failure. Failure could indicate that this terminal was created with newterm and thus doesn’t have a previous state.

Procedure: curs-set visibility

The curs-set routine changes the visibility of the cursor. If visibility is 0, the cursor is set to invisible. For 1, the cursor is visible. For 2, the cursor is very visible. If the terminal supports the visibility requested, the previous cursor state is returned; otherwise, #f is returned.

Procedure: napms ms

The procedure is used to sleep for ms milliseconds.

The return value is unspecified.


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