aboutsummaryrefslogtreecommitdiffstats
path: root/screen_utils.h
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-03-19 13:26:18 +0000
committerKalle Wallin <kaw@linux.se>2004-03-19 13:26:18 +0000
commita0592c8cc08b802f86061c88dc6862352b6c3e94 (patch)
treefeda87ba55a404023e62b8d744e2667dccebdc95 /screen_utils.h
downloadmpd-a0592c8cc08b802f86061c88dc6862352b6c3e94.tar.gz
mpd-a0592c8cc08b802f86061c88dc6862352b6c3e94.tar.xz
mpd-a0592c8cc08b802f86061c88dc6862352b6c3e94.zip
Imported ncmpc (mpc-ncures).
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@292 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'screen_utils.h')
-rw-r--r--screen_utils.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/screen_utils.h b/screen_utils.h
new file mode 100644
index 000000000..7143832bf
--- /dev/null
+++ b/screen_utils.h
@@ -0,0 +1,42 @@
+
+typedef char * (*list_window_callback_fn_t) (int index,
+ int *highlight,
+ void *data);
+
+
+
+typedef struct
+{
+ WINDOW *w;
+ int rows, cols;
+
+ int start;
+ int selected;
+ int clear;
+ int repaint;
+
+} list_window_t;
+
+
+
+list_window_t *list_window_init(WINDOW *w, int width, int height);
+list_window_t *list_window_free(list_window_t *lw);
+
+
+void list_window_reset(list_window_t *lw);
+void list_window_set_selected(list_window_t *lw, int n);
+
+void list_window_paint(list_window_t *lw,
+ list_window_callback_fn_t callback,
+ void *callback_data);
+
+
+
+
+void list_window_previous(list_window_t *lw);
+void list_window_next(list_window_t *lw, int length);
+void list_window_first(list_window_t *lw);
+void list_window_last(list_window_t *lw, int length);
+void list_window_previous_page(list_window_t *lw);
+void list_window_next_page(list_window_t *lw, int length);
+