Code

screen: moved code to screen_list.c
[ncmpc.git] / src / screen_list.h
1 /*
2  * (c) 2004 by Kalle Wallin <kaw@linux.se>
3  * Copyright (C) 2008 Max Kellermann <max@duempel.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  */
20 #ifndef SCREEN_LIST_H
21 #define SCREEN_LIST_H
23 #include "ncmpc.h"
25 #include <ncurses.h>
27 #define SCREEN_PLAYLIST_ID 0
28 #define SCREEN_BROWSE_ID 1
29 #define SCREEN_ARTIST_ID 2
30 #define SCREEN_HELP_ID 100
31 #define SCREEN_KEYDEF_ID 101
32 #define SCREEN_SEARCH_ID 103
33 #define SCREEN_LYRICS_ID 104
35 extern const struct screen_functions screen_playlist;
36 extern const struct screen_functions screen_browse;
37 #ifdef ENABLE_ARTIST_SCREEN
38 extern const struct screen_functions screen_artist;
39 #endif
40 extern const struct screen_functions screen_help;
41 #ifdef ENABLE_SEARCH_SCREEN
42 extern const struct screen_functions screen_search;
43 #endif
44 #ifdef ENABLE_KEYDEF_SCREEN
45 extern const struct screen_functions screen_keydef;
46 #endif
47 #ifdef ENABLE_LYRICS_SCREEN
48 extern const struct screen_functions screen_lyrics;
49 #endif
51 void
52 screen_list_init(WINDOW *w, unsigned cols, unsigned rows);
54 void
55 screen_list_exit(void);
57 void
58 screen_list_resize(unsigned cols, unsigned rows);
60 int
61 screen_get_id_by_index(unsigned i);
63 const char *
64 screen_get_name(unsigned i);
66 int
67 screen_get_id(const char *name);
69 const struct screen_functions *
70 screen_get_functions(unsigned i);
72 int
73 lookup_mode(int id);
75 #endif