Return the output speed of the terminal in bits per second.
On software terminal emulators it will have a fixed high value.
Included for historical reasons; in former times, it was used
to write output loops for time delays and occasionally to
change interfaces depending on the line speed.
Save the current terminal mode as the “program” mode, the mode when
the running program is using NCurses. (Its counterpart is the “shell”
mode, for when the program is not in NCurses.) Subsequent calls to
reset_prog_mode() will restore this mode.
Save the current terminal mode as the “shell” mode, the mode when
the running program is not using NCurses. (Its counterpart is the
“program” mode, when the program is using NCurses capabilities.)
Subsequent calls to reset_shell_mode() will restore this mode.
Permits an application to define keycodes with their corresponding
control strings, so that the NCurses library will interpret them
just as it would the predefined codes in the terminfo database.
Update the physical screen. The NCurses library keeps two data structures,
one representing the current physical screen contents and a virtual screen
representing the desired next state. The doupdate() ground updates the
physical screen to match the virtual screen.
Flash the screen. That is, change it to reverse-video and then change
it back in a short interval. Some people prefer such as ‘visible bell’
to the audible attention signal produced by beep().
Used for half-delay mode, which is similar to cbreak mode in that characters
typed by the user are immediately available to the program. However, after
blocking for tenths tenths of seconds, raise an exception if nothing has
been typed. The value of tenths must be a number between 1 and 255.
Use nocbreak() to leave half-delay mode.
Return true if the terminal has insert- and delete-character capabilities.
This function is included for historical reasons only, as all modern
software terminal emulators have such capabilities.
Return true if the terminal has insert- and delete-line capabilities,
or can simulate them using scrolling regions. This function is included
for historical reasons only, as all modern software terminal emulators
have such capabilities.
Return the name of the key binding c. The name of a key generating
printable ASCII character is the key’s character. The name of a
control-key combination is a two-byte bytes object consisting of a
caret (b’^‘) followed by the corresponding printable ASCII character.
The name of an alt-key combination (128–255) is a bytes object
consisting of the prefix b’M-’ followed by the name of the
corresponding ASCII character.
Permits an application to disable specific KeyBinding, rather than use
the keypad function to disable all keycodes. Keys that have been disabled
can be re-enabled.
Return the user’s current line kill character. Under Unix operating
systems this is a property of the controlling tty of the NCurses
program, and is not set by the NCurses library itself.
Return the user’s current line kill character as a wide character.
Under Unix operating systems this is a property of the controlling
tty of the NCurses program, and is not set by the NCurses library itself.
Return the terminfo long name field describing the current terminal.
The maximum length of a verbose description is 128 characters.
It is defined only after the call to initscr().
The mouseinterval() function sets the maximum time (in thousands of a second)
that can elapse between press and release events for them to be recognized as a
click. Use mouseinterval(Some(time::Duration::from_millis(0))) to disable click
resolution. This function returns the previous interval value.
Use mouseinterval(None) to obtain the interval without altering it.
The default is one sixth of a second.
Safely initialise NCurses, panic’s will be caught correctly and
passed back as NCurseswWinError::Panic.
NCurses should free (as best it can) memory etc correctly.
Backend function used by resizeterm(), performing most of the work; when
resizing the windows, resize_term() blank-fills the areas that are extended.
The calling application should fill in these areas with appropriate data.
The resize_term() function attempts to resize all windows. However, due to
the calling convention of pads, it is not possible to resize these without
additional interaction with the application.
Resize the standard and current windows to the specified dimensions, and
adjusts other bookkeeping data used by the NCurses library that record the
window dimensions (in particular the SIGWINCH handler).
Safely create an application entry point, unlike ncursesw_entry() this does
not initialise the NCurses library by calling initscr(). panic’s will be caught
correctly and passed back as NCurseswWinError::Panic. NCurses should free
(as best it can) memory etc correctly.
The scr_init() routine reads in the contents of path and uses them to
initialize the curses data structures about what the terminal currently has
on its screen. If the data is determined to be valid, curses bases its next
update of the screen on this information rather than clearing the screen
and starting from scratch.
The scr_restore() routine sets the virtual screen to the contents of the file
specificed by path, which must have been written using scr_dump(). The next call
to doupdate() restores the physical screen to the way it looked in the
dump file.
The scr_set() routine is a combination of scr_restore() and scr_init().
It tells the program that the information in path is what is currently
on the screen, and also what the program wants on the screen. This can be
thought of as a screen inheritance function.
For positive n, the scrl() routine scroll the window up n lines
(line i+n becomes i); otherwise scroll the window down n lines.
This involves moving the lines in the window character image structure.
The current cursor position is not changed.