X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flist_window.h;h=10e79edd5e022ba5f39ec5db4f9be9177cacc091;hb=d2487a92eec248d647bdfd1b2d11c202122762b4;hp=d60b6696a8aa7952fe552a3ab46a9680aa2dc6e2;hpb=39ceb9f3ed508c3036ce752309075ed631516c32;p=ncmpc.git diff --git a/src/list_window.h b/src/list_window.h index d60b669..10e79ed 100644 --- a/src/list_window.h +++ b/src/list_window.h @@ -1,21 +1,21 @@ /* ncmpc (Ncurses MPD Client) * (c) 2004-2010 The Music Player Daemon Project * Project homepage: http://musicpd.org - + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ + */ #ifndef LIST_WINDOW_H #define LIST_WINDOW_H @@ -23,16 +23,11 @@ #include "config.h" #include "command.h" #include "colors.h" +#include "ncmpc_curses.h" #include #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#else -#include -#endif - typedef const char * (*list_window_callback_fn_t)(unsigned i, void *data); @@ -121,9 +116,19 @@ bool list_window_mouse(struct list_window *lw, unsigned long bstate, int y); #endif +/** + * Centers the visible range around item n on the list. + */ void list_window_center(struct list_window *lw, unsigned n); +/** + * Scrolls the view to item n, as if the cursor would have been moved + * to the position. + */ +void +list_window_scroll_to(struct list_window *lw, unsigned n); + /** * Sets the position of the cursor. Disables range selection. */