summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aee3870)
raw | patch | inline | side by side (parent: aee3870)
author | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 19:08:17 +0000 (21:08 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 19:08:17 +0000 (21:08 +0200) |
14 files changed:
Makefile.am | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen.h | patch | blob | history | |
src/screen_artist.c | patch | blob | history | |
src/screen_file.c | patch | blob | history | |
src/screen_help.c | patch | blob | history | |
src/screen_interface.h | [new file with mode: 0644] | patch | blob |
src/screen_keydef.c | patch | blob | history | |
src/screen_list.c | patch | blob | history | |
src/screen_lyrics.c | patch | blob | history | |
src/screen_outputs.c | patch | blob | history | |
src/screen_play.c | patch | blob | history | |
src/screen_search.c | patch | blob | history | |
src/screen_song.c | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 8243a2f352f83d4738b3d411e2986ef96f425bbc..91c83b2961475c470a8b2f895684706315d9ac63 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
src/progress_bar.h \
src/status_bar.h \
src/screen.h \
+ src/screen_interface.h \
src/screen_list.h \
src/screen_play.h \
src/screen_utils.h \
diff --git a/src/screen.c b/src/screen.c
index 7295c47098c9975c4cdb4c0b9474a4265908f4dc..d9e7fdbe86ed0510a61ffd7d856e652b2e678a0b 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
*/
#include "screen.h"
+#include "screen_interface.h"
#include "screen_list.h"
#include "screen_utils.h"
#include "config.h"
diff --git a/src/screen.h b/src/screen.h
index 8923a7f57e2b87be0682f4be898008fc7d1667c8..b20a6c9449f1a18459ae95fd7e7573833398b6b1 100644 (file)
--- a/src/screen.h
+++ b/src/screen.h
extern const struct screen_functions screen_outputs;
#endif
-
-typedef struct screen_functions {
- void (*init)(WINDOW *w, int cols, int rows);
- void (*exit)(void);
- void (*open)(struct mpdclient *c);
- void (*close)(void);
- void (*resize)(int cols, int rows);
- void (*paint)(void);
- void (*update)(struct mpdclient *c);
- bool (*cmd)(struct mpdclient *c, command_t cmd);
- const char *(*get_title)(char *s, size_t size);
-} screen_functions_t;
-
void screen_init(struct mpdclient *c);
void screen_exit(void);
void screen_resize(struct mpdclient *c);
diff --git a/src/screen_artist.c b/src/screen_artist.c
index b331015e25b9d2599d76ecda14fb814cb15221f3..905566d4849d1368a4df97a63ff537df49e911ff 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
#include "utils.h"
#include "strfsong.h"
#include "command.h"
-#include "screen.h"
+#include "screen_interface.h"
#include "screen_utils.h"
#include "screen_browser.h"
#include "filelist.h"
diff --git a/src/screen_file.c b/src/screen_file.c
index 0295690aad7aa4614e3f7e9e2a049585e0bd6be3..3aaade12a03896d727d92e34cbc8062c40dc7f6f 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
*/
#include "screen_file.h"
+#include "screen_interface.h"
#include "config.h"
#include "i18n.h"
#include "options.h"
#include "mpdclient.h"
#include "filelist.h"
#include "command.h"
-#include "screen.h"
#include "screen_utils.h"
#include "screen_browser.h"
#include "screen_play.h"
diff --git a/src/screen_help.c b/src/screen_help.c
index 59ea8a230feba3fd0b3c8096ecedd4a2a3e81420..5aa579f9bac7dd2b1e1b7d9673da8e452f8bb5d1 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "screen_interface.h"
#include "config.h"
#include "i18n.h"
#include "mpdclient.h"
#include "command.h"
-#include "screen.h"
#include "screen_utils.h"
#include <stdlib.h>
diff --git a/src/screen_interface.h b/src/screen_interface.h
--- /dev/null
+++ b/src/screen_interface.h
@@ -0,0 +1,48 @@
+/* ncmpc (Ncurses MPD Client)
+ * (c) 2004-2009 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 NCMPC_SCREEN_INTERFACE_H
+#define NCMPC_SCREEN_INTERFACE_H
+
+#include "command.h"
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
+#include <ncurses.h>
+#endif
+
+struct mpdclient;
+
+typedef struct screen_functions {
+ void (*init)(WINDOW *w, int cols, int rows);
+ void (*exit)(void);
+ void (*open)(struct mpdclient *c);
+ void (*close)(void);
+ void (*resize)(int cols, int rows);
+ void (*paint)(void);
+ void (*update)(struct mpdclient *c);
+ bool (*cmd)(struct mpdclient *c, command_t cmd);
+ const char *(*get_title)(char *s, size_t size);
+} screen_functions_t;
+
+#endif
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index b92ebe39d584453f7fa6d61d3a3bdc6f96ad230c..5809cd278e46f49fe3313d0d91c5d8d7a16e4caf 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "screen_interface.h"
#include "i18n.h"
#include "mpdclient.h"
#include "options.h"
diff --git a/src/screen_list.c b/src/screen_list.c
index ae1acd5dcef2e7f3c09c049792ae54fb9415ddf5..49f6037800cf2812d62777929e11706bdc568f16 100644 (file)
--- a/src/screen_list.c
+++ b/src/screen_list.c
*/
#include "screen_list.h"
+#include "screen_interface.h"
#include "screen.h"
#include <string.h>
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 33a0c3a2659e4ec0176ceb043029f4b924f46a59..62d5b13c6d64c9ddda8a3c1958885c9604cd5904 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "screen_interface.h"
#include "screen_file.h"
#include "i18n.h"
#include "options.h"
diff --git a/src/screen_outputs.c b/src/screen_outputs.c
index 883e3c9a9a80886407747432aafe05863e504f98..7ecc353cb88476a0331b5966ee58ca81d382caff 100644 (file)
--- a/src/screen_outputs.c
+++ b/src/screen_outputs.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "screen_interface.h"
#include "i18n.h"
#include "screen.h"
#include "list_window.h"
diff --git a/src/screen_play.c b/src/screen_play.c
index 5cc3457592878492362a7ff04df9390b759922a9..3b50a12b852a14871ed13fc2087f21d42f492263 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
*/
#include "screen_file.h"
+#include "screen_interface.h"
#include "config.h"
#include "i18n.h"
#include "charset.h"
diff --git a/src/screen_search.c b/src/screen_search.c
index 3e533b624112090bb2e66447c098d048779b7e63..43f6ea9e23b1daa22e9b889cc1a856c13255bfed 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "screen_interface.h"
#include "i18n.h"
#include "options.h"
#include "charset.h"
#include "mpdclient.h"
#include "strfsong.h"
#include "command.h"
-#include "screen.h"
#include "utils.h"
#include "screen_utils.h"
#include "screen_browser.h"
diff --git a/src/screen_song.c b/src/screen_song.c
index c83cd45b3a247b24cafc21b527297681437642a7..7b6ec6fbd5f8ca90ccd9e9b896675398fb04633b 100644 (file)
--- a/src/screen_song.c
+++ b/src/screen_song.c
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "screen_interface.h"
#include "screen_file.h"
#include "i18n.h"
#include "screen.h"