diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-05-13 18:43:02 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-05-18 11:02:32 +0200 |
commit | 7184da0fa364049424f626f55f7c2bc0a7d22929 (patch) | |
tree | 728419c8fd482a789d996b4a29f9cbff58974999 /src/calcurse.h | |
parent | ca83e6569617aa19679844986ecb929d38fc7786 (diff) | |
download | calcurse-7184da0fa364049424f626f55f7c2bc0a7d22929.zip |
Rework scroll window implementation
This complete rewrite of the scroll window implementation decouples
scroll windows from every other window abstraction layer we use. Note
that this leads to some code duplication. The long-term purpose of this
rewrite, however, is to eventually make every panel use scroll windows.
This makes for a huge cleanup of the UI code.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 5da79e2..53610c4 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -504,10 +504,14 @@ struct window { /* Generic scrolling window structure. */ struct scrollwin { - struct window win; - struct window pad; - unsigned first_visible_line; - unsigned total_lines; + WINDOW *win; + WINDOW *inner; + int y; + int x; + int h; + int w; + unsigned line_off; + unsigned line_num; const char *label; }; @@ -1047,11 +1051,15 @@ enum win wins_slctd(void); void wins_slctd_set(enum win); void wins_slctd_next(void); void wins_init(void); -void wins_scrollwin_init(struct scrollwin *); +void wins_scrollwin_init(struct scrollwin *, int, int, int, int, const char *); +void wins_scrollwin_resize(struct scrollwin *, int, int, int, int); +void wins_scrollwin_set_linecount(struct scrollwin *, unsigned); void wins_scrollwin_delete(struct scrollwin *); +void wins_scrollwin_draw_deco(struct scrollwin *); void wins_scrollwin_display(struct scrollwin *); void wins_scrollwin_up(struct scrollwin *, int); void wins_scrollwin_down(struct scrollwin *, int); +void wins_scrollwin_ensure_visible(struct scrollwin *, unsigned); void wins_reinit(void); void wins_reinit_panels(void); void wins_show(WINDOW *, const char *); |