Crate mortal [] [src]

Platform-independent terminal interface

Two distinct interfaces to operating system terminal devices are provided, each abstracting over the differences between Unix terminals and Windows console.

The Terminal interface treats the terminal as a line-by-line output device. Methods exist to add color and style attributes to text, and to make relative movements of the cursor.

The Screen interface treats the entire terminal window as a drawable buffer. Methods exist to set the cursor position and to write text with color and style attributes.

Concurrency

Each interface uses internal locking mechanisms to allow sharing of the terminal interface between threads while maintaining coherence of read/write operations.

See the documentation for Terminal and Screen for further details.

Re-exports

pub use screen::Screen;
pub use screen::ScreenReadGuard;
pub use screen::ScreenWriteGuard;
pub use sequence::FindResult;
pub use sequence::SequenceMap;
pub use signal::Signal;
pub use signal::SignalSet;
pub use terminal::Color;
pub use terminal::Cursor;
pub use terminal::CursorMode;
pub use terminal::Size;
pub use terminal::Style;
pub use terminal::Event;
pub use terminal::Key;
pub use terminal::MouseEvent;
pub use terminal::MouseInput;
pub use terminal::MouseButton;
pub use terminal::ModifierState;
pub use terminal::PrepareConfig;
pub use terminal::PrepareState;
pub use terminal::Terminal;
pub use terminal::TerminalReadGuard;
pub use terminal::TerminalWriteGuard;

Modules

screen

Provides a drawable buffer on terminal devices

sequence

Utilities for manipulating raw input sequences

signal

Contains types relating to operating system signals

terminal

Provides an interface to terminal devices

unix

Unix extension trait

util

Miscellaneous utility functions