aboutsummaryrefslogtreecommitdiffstats
path: root/src/list_window.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-22 10:04:46 +0200
committerMax Kellermann <max@duempel.org>2008-09-22 10:04:46 +0200
commite6d6231b4de336f60bc5b07331e2f1f01096c66c (patch)
treeca99bb77e967d794af8b88aebd3fdf9c50dc474b /src/list_window.h
parent07632841df4ff1d8fcfac33bd93e06ee43a4498e (diff)
downloadmpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.tar.gz
mpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.tar.xz
mpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.zip
screen: moved list_window mouse code to list_window.c
Move the portion of screen_get_mouse_event() which handles list_window clicks to list_window.c. The code contained a NULL pointer dereference, which is now fixed.
Diffstat (limited to '')
-rw-r--r--src/list_window.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/list_window.h b/src/list_window.h
index ca93971dd..78593948a 100644
--- a/src/list_window.h
+++ b/src/list_window.h
@@ -1,6 +1,7 @@
#ifndef LIST_WINDOW_H
#define LIST_WINDOW_H
+#include "../config.h"
#include "command.h"
#include <ncurses.h>
@@ -56,6 +57,16 @@ int list_window_cmd(struct list_window *lw, unsigned rows, command_t cmd);
int
list_window_scroll_cmd(struct list_window *lw, unsigned rows, command_t cmd);
+#ifdef HAVE_GETMOUSE
+/**
+ * The mouse was clicked. Check if the list should be scrolled
+ * Returns non-zero if the mouse event has been handled.
+ */
+int
+list_window_mouse(struct list_window *lw, unsigned rows,
+ unsigned long bstate, int y);
+#endif
+
void
list_window_center(struct list_window *lw, unsigned rows, unsigned n);