]> granicus.if.org Git - neomutt/commit
Add window structures to use for screen layout.
authorKevin McCarthy <kevin@8t8.us>
Thu, 28 Apr 2016 00:56:49 +0000 (17:56 -0700)
committerKevin McCarthy <kevin@8t8.us>
Thu, 28 Apr 2016 00:56:49 +0000 (17:56 -0700)
commit28f097ee11681a20c2a0ffeddd47feb31f46a7e0
tree92157bc5233aa49cb18616aea8e8adeed67e604a
parent7d266881de05eeb7166dc0728441fcf125ca7499
Add window structures to use for screen layout.

This is a series of 11 patches, centralizing Mutt screen drawing
inside windows (mutt_window_t structures).

Currently, the screen drawing and cursor positioning logic is
distributed all over the code, resulting in many files having the same
logic of where the help, status, message windows are.  Additionally,
the code directly uses move and mvadd*/mvprint* functions, which means
if the layouts are changed, the row/column computation logic needs to
be changed all over the place.

The patch creates a (very simple) mutt_window_t structure and
functions for moving, addch/str/printw, along with clearing the line.
The windows keep track of where they are on the screen, allowing the
Mutt code to simply position elements relative to the window.

During curses initalization, and when the window is resized, the
window sizes and positions and recomputed.  Also, a new option flags,
R_REFLOW is added for options that need to force a reflow when they are changed.

Thanks to Richard Russon for pointing out the slang compilation issue.
curs_lib.c
init.c
init.h
main.c
mutt_curses.h
resize.c