aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-02 15:20:18 +0200
committerMax Kellermann <max@duempel.org>2008-10-02 15:20:18 +0200
commita220d744b2c2ba89c9037caae055247953b72ac9 (patch)
treea0f4f7cd6df23ae4544f172b6ce31deb7744a951 /src/screen.c
parent3b61108fb88d032c168497d193f8cedc28b97df3 (diff)
downloadmpd-a220d744b2c2ba89c9037caae055247953b72ac9.tar.gz
mpd-a220d744b2c2ba89c9037caae055247953b72ac9.tar.xz
mpd-a220d744b2c2ba89c9037caae055247953b72ac9.zip
screen: export function screen_switch()
Provide an API for switching the currently displayed screen. Rename switch_screen_mode() to screen_switch().
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/screen.c b/src/screen.c
index 526f091dd..3cfc813d9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -53,8 +53,8 @@ screen_is_visible(const struct screen_functions *sf)
return sf == mode_fn;
}
-static void
-switch_screen_mode(const struct screen_functions *sf, mpdclient_t *c)
+void
+screen_switch(const struct screen_functions *sf, struct mpdclient *c)
{
assert(sf != NULL);
@@ -104,7 +104,7 @@ screen_next_mode(mpdclient_t *c, int offset)
D("current mode: %d:%d next:%d\n", current, max, next);
sf = screen_lookup_name(options.screen_list[next]);
if (sf != NULL)
- switch_screen_mode(sf, c);
+ screen_switch(sf, c);
}
static void
@@ -789,32 +789,32 @@ screen_cmd(mpdclient_t *c, command_t cmd)
screen_next_mode(c, 1);
break;
case CMD_SCREEN_PLAY:
- switch_screen_mode(&screen_playlist, c);
+ screen_switch(&screen_playlist, c);
break;
case CMD_SCREEN_FILE:
- switch_screen_mode(&screen_browse, c);
+ screen_switch(&screen_browse, c);
break;
case CMD_SCREEN_HELP:
- switch_screen_mode(&screen_help, c);
+ screen_switch(&screen_help, c);
break;
#ifdef ENABLE_SEARCH_SCREEN
case CMD_SCREEN_SEARCH:
- switch_screen_mode(&screen_search, c);
+ screen_switch(&screen_search, c);
break;
#endif
#ifdef ENABLE_ARTIST_SCREEN
case CMD_SCREEN_ARTIST:
- switch_screen_mode(&screen_artist, c);
+ screen_switch(&screen_artist, c);
break;
#endif
#ifdef ENABLE_KEYDEF_SCREEN
case CMD_SCREEN_KEYDEF:
- switch_screen_mode(&screen_keydef, c);
+ screen_switch(&screen_keydef, c);
break;
#endif
#ifdef ENABLE_LYRICS_SCREEN
case CMD_SCREEN_LYRICS:
- switch_screen_mode(&screen_lyrics, c);
+ screen_switch(&screen_lyrics, c);
break;
#endif
default: