summaryrefslogtreecommitdiffstats
path: root/src/listnav.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/listnav.h')
-rw-r--r--src/listnav.h18
1 files changed, 18 insertions, 0 deletions
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);
+