Next: Mouse handling, Previous: Getting a string of characters from the screen, Up: The basic curses library [Contents][Index]
The following routines give low-level access to various curses capabilities. Theses routines typically are used inside library routines.
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.
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.
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.
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.
The procedure is used to sleep for ms milliseconds.
The return value is unspecified.
Next: Mouse handling, Previous: Getting a string of characters from the screen, Up: The basic curses library [Contents][Index]