diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-12-16 13:48:13 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-12-20 15:31:29 +0100 |
| commit | 15a8fe2cf2b16af8739a7ec2b64b5c5f184161b8 (patch) | |
| tree | 62a7b404ac2fda90d0df628922f182afacd0d510 /listnav.h | |
| parent | 1bd07952245e3fc8ed95af0c1eff45938098b40b (diff) | |
| download | tmus-15a8fe2cf2b16af8739a7ec2b64b5c5f184161b8.tar.gz tmus-15a8fe2cf2b16af8739a7ec2b64b5c5f184161b8.zip | |
Implemented list navigation and other fixes
Diffstat (limited to 'listnav.h')
| -rw-r--r-- | listnav.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/listnav.h b/listnav.h new file mode 100644 index 0000000..688172c --- /dev/null +++ b/listnav.h @@ -0,0 +1,18 @@ +#pragma once + +struct listnav { + /* current window */ + int wmin, wmax, wlen; + + /* selected item moving inside of window */ + int sel; + + /* bounds of actual list */ + int min, max; +}; + +void listnav_init(struct listnav *nav); +void listnav_update_bounds(struct listnav *nav, int min, int max); +void listnav_update_wlen(struct listnav *nav, int wlen); +void listnav_update_sel(struct listnav *nav, int sel); + |
