Expand description
This is a crate that allows one to easily use a basic form of curses. It is
based upon pancurses and so it’s cross
platform between windows and unix. It exposes a simplified view of curses
functionality where there’s just one Window and all of your actions are
called upon a single struct type, EasyCurses
. This ensures that curses
functions are only called while curses is initialized, and also that curses
is always cleaned up at the end (via Drop
).
The library can only perform proper automatic cleanup if Rust is allowed to
run the Drop
implementation. This happens during normal usage, and during
an unwinding panic, but if you ever abort the program (either because you
compiled with panic=abort
or because you panic during an unwind) you lose
the cleanup safety. That is why this library specifies panic="unwind"
for
all build modes, and you should too.
Modules§
- constants
- Special constants for things like drawing ascii art.
Macros§
- colorpair
- A handy macro to make describing color pairs read more like normal english.
Structs§
- Color
Pair - A color pair for a character cell on the screen.
- Easy
Curses - This is a handle to all your fun curses functionality.
Enums§
- Color
- The curses color constants.
- Cursor
Visibility - The three options you can pass to
EasyCurses::set_cursor_visibility
. - Input
- Input
Mode - The various input modes that you can set for the terminal.
- Timeout
Mode - The various timeouts that you can set for
get_input
to operate with.
Functions§
- preserve_
panic_ message - Wraps the use of curses with
catch_unwind
to preserve panic info.