meli/meli/src
Manos Pitsidianakis 0e3a0c4b70
Add safe UI widget area drawing API
Make Screen generic over its display kind: Screen<Tty> and
Screen<Virtual>. The latter is for "cached" renderings we want to keep
and copy to the actual screen when the Component::draw() method is
called. Only Screen<Tty> can write to stdout and it needs an stdout
handle.

Add a generation integer field to Screen, that changes each time it is
resized. This way, we can track if "stale" areas are used and panic on
runtime (in debug mode).

Introduce a new type, Area, that keeps metadata about a subsection of a
Screen, and the generation it came from. New areas can only be created
from a Screen and by operating on an Area to create subsections of it.

This way, it's impossible to make an area refer to (x, y) cells outside
the screen generation of its provenance. If stabilised this API should
eliminate all out of bounds accesses in CellBuffers.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2023-12-02 17:20:37 +02:00
..
accounts Update thread cache on email flag modifications 2023-11-27 09:37:58 +02:00
command Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
conf listing.rs: add hide_sidebar_on_launch option 2023-09-07 12:33:51 +03:00
contacts Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
mail Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
plugins Normalize std::fmt::* imports 2023-08-11 13:16:47 +03:00
terminal Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
types types/File: return Results instead of panicking 2023-11-27 09:40:40 +02:00
utilities Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
accounts.rs types/File: return Results instead of panicking 2023-11-27 09:40:40 +02:00
args.rs Add install-man cli subcommand to install manpages on your system 2023-09-09 12:31:34 +03:00
command.rs command/parser: unify toggle_* parsers 2023-09-07 15:47:54 +03:00
components.rs clippy: fix new 1.72 default clippy lints 2023-08-25 19:49:26 +03:00
conf.rs Add install-man cli subcommand to install manpages on your system 2023-09-09 12:31:34 +03:00
jobs.rs mail/view: cancel previous jobs on MailView drop/update 2023-08-21 10:19:14 +03:00
jobs_view.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
lib.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
mail.rs meli: Move components/mail -> mail 2023-08-11 13:01:32 +03:00
mailbox_management.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
mailcap.rs types/File: return Results instead of panicking 2023-11-27 09:40:40 +02:00
main.rs Add install-man cli subcommand to install manpages on your system 2023-09-09 12:31:34 +03:00
notifications.rs melib/error: impl From<io::ErrorKind> for ErrorKind 2023-08-19 09:11:59 +03:00
plugins.rs Move src to meli/src 2023-07-08 13:58:32 +03:00
sqlite3.rs melib: move Sort{Order,Field} to utils mod 2023-08-21 12:41:50 +03:00
state.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
subcommands.rs Fix clippy lints 2023-11-22 14:05:59 +02:00
svg.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
terminal.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00
types.rs mail/view: handle dialog Esc in the parent component 2023-09-02 21:29:35 +03:00
utilities.rs Add safe UI widget area drawing API 2023-12-02 17:20:37 +02:00