aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-03 14:31:00 +0200
committerMax Kellermann <max@duempel.org>2008-10-03 14:31:00 +0200
commitef040e296e46fcc7620edaf89ffac05e065ec3e3 (patch)
tree8836cbeb47208a2f949d6f44a093f795f03f37cb /src/screen.h
parent0b2eee9489a8acef3cdee6f6fa0df6d167c53b8d (diff)
downloadmpd-ef040e296e46fcc7620edaf89ffac05e065ec3e3.tar.gz
mpd-ef040e296e46fcc7620edaf89ffac05e065ec3e3.tar.xz
mpd-ef040e296e46fcc7620edaf89ffac05e065ec3e3.zip
screen: export the global variable "screen"
screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
Diffstat (limited to 'src/screen.h')
-rw-r--r--src/screen.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/screen.h b/src/screen.h
index 976c75c90..ef7940a31 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -19,7 +19,7 @@ struct window {
unsigned rows, cols;
};
-typedef struct screen {
+struct screen {
struct window top_window;
struct window main_window;
struct window progress_window;
@@ -38,7 +38,9 @@ typedef struct screen {
char *findbuf;
GList *find_history;
-} screen_t;
+};
+
+extern struct screen screen;
extern const struct screen_functions screen_playlist;
extern const struct screen_functions screen_browse;
@@ -59,12 +61,12 @@ extern const struct screen_functions screen_lyrics;
typedef struct screen_functions {
void (*init)(WINDOW *w, int cols, int rows);
void (*exit)(void);
- void (*open)(struct screen *screen, mpdclient_t *c);
+ void (*open)(mpdclient_t *c);
void (*close)(void);
void (*resize)(int cols, int rows);
void (*paint)(void);
void (*update)(mpdclient_t *c);
- int (*cmd)(struct screen *scr, mpdclient_t *c, command_t cmd);
+ int (*cmd)(mpdclient_t *c, command_t cmd);
const char *(*get_title)(char *s, size_t size);
} screen_functions_t;