Code

screen_browser: added hotkey for adding song
[ncmpc.git] / src / screen_browser.h
1 /*
2  * $Id$
3  *
4  * (c) 2004 by Kalle Wallin <kaw@linux.se>
5  * Copyright (C) 2008 Max Kellermann <max@duempel.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
22 #ifndef SCREEN_BROWSER_H
23 #define SCREEN_BROWSER_H
25 #include "screen.h"
26 #include "mpdclient.h"
27 #include "config.h"
29 struct list_window;
30 struct list_window_state;
32 struct screen_browser {
33         struct list_window *lw;
34         struct list_window_state *lw_state;
36         mpdclient_filelist_t *filelist;
37 };
39 void
40 sync_highlights(mpdclient_t *c, mpdclient_filelist_t *fl);
42 void
43 browser_playlist_changed(struct screen_browser *browser, mpdclient_t *c,
44                          int event, gpointer data);
46 const char *browser_lw_callback(unsigned index, int *highlight, void *filelist);
48 int
49 browser_handle_select(struct screen_browser *browser, mpdclient_t *c);
51 int
52 browser_handle_add(struct screen_browser *browser, mpdclient_t *c);
54 void
55 browser_handle_select_all(struct screen_browser *browser, mpdclient_t *c);
57 int
58 browser_change_directory(struct screen_browser *browser, mpdclient_t *c,
59                          filelist_entry_t *entry, const char *new_path);
61 int
62 browser_handle_enter(struct screen_browser *browser, mpdclient_t *c);
64 #ifdef HAVE_GETMOUSE
65 int browser_handle_mouse_event(struct screen_browser *browser, mpdclient_t *c);
66 #else
67 #define browser_handle_mouse_event(browser, c) (0)
68 #endif
70 #endif