From f07580d31d1148c4a1811c36b09ca0ad50d9576b Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 20 Dec 2021 16:25:43 +0100 Subject: Restructured repository and added automatic make dependency generation --- src/listnav.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/listnav.h (limited to 'src/listnav.h') diff --git a/src/listnav.h b/src/listnav.h new file mode 100644 index 0000000..688172c --- /dev/null +++ b/src/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); + -- cgit v1.2.3-71-gd317