Crate easycurses [−] [src]
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
You should never make a second
EasyCurses value without having ensured
that the first one is already dropped. Initialization and shutdown of curses
will get out of balance and your terminal will probably be left in a very
Similarly, the library can only perform proper automatic cleanup if Rust is
allowed to run the
Drop implementation. This happens normally, and during
an unwinding pancic, but if you ever abort the program (either because you
panic=abort or because you panic during an unwind) you lose
the cleanup safety. So, don't do that.
A color pair for a character cell on the screen.
This is a handle to all your fun curses functionality.
The curses color constants.
The three options you can pass to
The input modes allowed.
Wraps the use of curses with