Crate ncurseswwin

Source

Modules§

extend
Extended color’s, color pairs and attributes module.
features
Compiled in ncursesw features
form
Form module
menu
Menu module
normal
Normal color’s, color pairs and attributes module.

Structs§

BoxDrawing
Custom box drawing graphics.
ChtypeChar
Ascii character and rendition.
ChtypeString
Ascii string and rendition.
ComplexChar
Complex character (wide character and rendition).
ComplexString
Complex character string (wide characters and renditions).
Mouse
A mouse pointer device.
MouseButtonEventIter
An iterator over the variants of Self
MouseButtonIter
An iterator over the variants of Self
MouseButtonState
A mouse button’s state.
MouseEvents
The mouse event that occurred.
MouseOrigin
The type of origin as reported by a mouse.
Origin
Origin using y and x axis
OriginResult
Pad
A pad canvas.
Panel
A moveable panel that is a container for a Window.
Region
RipoffLine
A ripoff line.
RipoffWindow
A ripoff line window canvas.
Screen
Size
Size using lines and columns
WideChar
Wide character (UTF-8 character).
WideCharAndAttributes
WideString
Wide character string (UTF-8).
Window
A moveable window canvas.

Enums§

AttributesColorPairSet
Normal and extended attributes and color pair returned by ncurses functions.
BoxDrawingGraphic
The box drawing graphic characters.
BoxDrawingType
Box drawing type.
BoxDrawingTypeDetail
Box drawing type detail.
Changed
Make a line look like it’s been touched since last wrefresh, used by wtouchln.
CharacterResult
Return a GetCharacterType from the getch() and get_wch() families of functions.
CursorType
Cursor type.
HorizontalGraphic
Horizontal box drawing graphic type.
InputMode
The various input modes that you can set for the terminal.
Justification
Justification.
KeyBinding
Keys returned by NCurses getch() and get_wch() families of functions.
Legacy
Override locale-encoding checks.
MouseButton
A mouse button.
MouseButtonEvent
A type of mouse button event.
MouseMask
The type of events the mouse will report.
NCursesColorType
The color type that ncursesw is running under. by default it will be ColorType::Normal until a ColorPair structure is generated.
NCurseswError
NCursesw Errors/Events.
NCurseswFormError
NCursesw form errors.
NCurseswMenuError
NCursesw menu errors.
NCurseswMouseError
NCursesw mouse errors.
NCurseswPanelsError
NCursesw panels errors.
NCurseswWinError
NCurseswWin Errors.
Orientation
The screen region (top or bottom) to rip a line off.
Position
Position to insert/delete line see insdelln() and winsdelln().
SoftLabelType
The soft-label layout type
VerticalGraphic
Vertical box drawing graphic type.

Traits§

AttributesType
Attributes.
BaseCanvas
Does the window canvas type have ncursesw add functions.
CanSubWindow
Is the window canvas type capable of creating a sub-window.
ColorAttributeTypes
Color attribute type in the NCurses library.
ColorPairColors
Color pair’s colors.
ColorPairType
Color pair.
ColorType
Color.
ColorsType
Background and foreground colors.
Derivable
Is the window canvas type capable of creating a derived window.
HasAddFunctions
Does the window canvas type have ncursesw add functions.
HasAttributes
Does the window canvas type have ncursesw attribute type functions.
HasBackground
Does the window canvas type have ncursesw background functions.
HasDelFunctions
Does the window canvas type have ncursesw delete functions.
HasGetFunctions
Does the window canvas type have ncursesw get functions.
HasGraphicFunctions
Does the window canvas type have ncursesw graphics functions.
HasInFunctions
Does the window canvas type have ncursesw in functions.
HasInsFunctions
Does the window canvas type have ncursesw insert functions.
HasMvAddFunctions
Does the window canvas type have ncursesw origin add functions.
HasMvAttributes
Does the window canvas type have ncursesw attribute origin functions.
HasMvDelFunctions
Does the window canvas type have ncursesw delete origin functions.
HasMvGetFunctions
Does the window canvas type have ncursesw get origin functions.
HasMvInFunctions
Does the window canvas type have ncursesw in origin functions.
HasMvInsFunctions
Does the window canvas type have ncursesw insert origin functions.
HasNonBlocking
Does the window canvas type support non-blocking functions.
HasXAxis
Does the window canvas have an x-axis.
HasYAxis
Does the window canvas have an y-axis.
HasYXAxis
Does the window canvas have an x and y axis.
IsPad
is the window canvas type a pad.
IsWindow
is the window canvas type a window.
Mouseable
Does the window canvas type have ncursesw mouse functions.
Moveable
Is the window canvas type moveable.
NCurseswWindow
Is the window canvas a ncursesw window type.
Scrollable
Is the window canvas type scrollable.

Functions§

COLORS
Return the number of colors available.
COLOR_PAIRS
Return the number of color pairs available.
COLS
Return the maximum number of columns.
ESCDELAY
Return the delay used to interpret termianl keyboard escape sequences.
LINES
Return the maximum number of lines.
TABSIZE
Return the number of columns a tab represents on the terminal.
assume_default_colors
Use the specialifed colors (foreground and background) as the default colors for defining color pair 0.
baudrate
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.
beep
Emit a short attention sound.
can_change_color
Return true or false, depending on whether the programmer can change the colors displayed by the terminal.
ceiling_panel
Returns the topmost panel. Helper function and equivilant of panel_below(None).
chtype_box_graphic
Obtain the box drawing graphic of ChtypeChar type.
complex_box_graphic
Obtain the box drawing graphic of ComplexChar type.
curs_setDeprecated
curscr
Return the current screen.
curses_version
Return the version number, including patch level of the underlying library, e.g., 6.1.20180127.
cursor_set
Set the cursor type to display.
def_prog_mode
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.
def_shell_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.
define_key
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.
delay_output
Insert an ms millisecond pause in output.
doupdate
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
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().
get_escdelay
Returns the escape delay.
getcchar
Get a widecharacter string and rendition from a complex character.
ground_panel
Returns the lowest panel. Helper function and equivilant of panel_above(None).
halfdelay
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.
has_colors
Return true if the terminal can display colors; otherwise, return false.
has_ic
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.
has_il
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.
has_key
Take a key value ch, and return true if the current terminal type recognizes a key with that value.
has_mouse
The has_mouse() function returns true if the mouse driver has been successfully initialized.
has_mouse_interface
Returns wether a mouse interface is available.
intrflush
is_term_resized
Return true if resize_term() would modify the window structure, false otherwise.
key_defined
Permits an application to determine if a string represented as individual bytes is currently bound to any KeyBindind.
key_name
Returns a string corresponding to a given KeyBinding.
keybound
Permits an application to determine the string which is defined in the terminfo for specific keycodes.
keyname
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.
keyok
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.
killchar
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.
killwchar
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.
longname
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().
mcprint
Ship binary data to printer. Returns the number of characters actually sent to the printer.
mouse_trafo
mouse_version
Return the NCurses mouse version.
mouseinterval
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.
ncurses_colortype
Returns the color type that ncursesw is running under. by default it will be ColorType::Normal until a ColorPair structure is generated.
ncurses_colortype_set
Has the crates color type been set.
ncurses_version
Return the semantic version of the NCurses library.
ncursesw_entry
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.
ncursesw_initDeprecated
Safely initialise NCurses, panic will be caught correctly and NCurses free (as best it can) correctly.
new_prescr
newscr
Return the new screen.
newterm
panel_above
Returns the panel above the specified panel.
panel_below
Returns the panel just below the specified panel.
reset_prog_mode
Restore the terminal to “program” mode, as previously saved by def_prog_mode().
reset_shell_mode
Restore the terminal to “shell” mode, as previously saved by def_shell_mode().
resetty
Restore the state of the terminal modes to what it was at the last call to savetty().
resize_term
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.
resizeterm
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).
safe_entry
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.
savetty
Save the current state of the terminal modes in a buffer, usable by resetty().
scr_dump
The scr_dump() routine dumps the current contents of the virtual screen to the file specificed by path.
scr_init
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.
scr_restore
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.
scr_set
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.
scrl
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.
set_echo
Set echo on or off within NCurses.
set_escdelay
Sets the escape delay delay.
set_input_mode
Set the input mode to use within NCurses.
set_newline
Control whether the NCurses translates the return key into newline on input,
set_tabsize
Sets the tab size.
set_term
setcchar
Sets a complex character from a character and rendition.
start_color
Initialise NCurses internal color system.
stdscr
Return the standard screen.
terminal_bottom_right_origin
The terminal/screen size as an Origin i.e. y and x axis using 0,0 as top left.
terminal_size
The terminal/screen Size i.e. lines and columns using 0,0 as top left.
typeahead
Specify that the file descriptor file be used for typeahead checking. If file is None, then no typeahead checking is done.
update_panels
Refreshes the virtual screen to reflect the relations between the panels in the stack.
use_default_colors
Use the default terminal colors for color pair 0.
use_legacy_coding
Override locale-encoding checks.
wide_box_graphic
Obtain the box drawing graphic of WideChar type.

Type Aliases§

NonBlockingResult
Non-Blocking get function return type, None is a timeout.
Timeout
Timeout type, None represents blocking mode.