uniformize ways to convert strings into screen type

This commit is contained in:
Andrzej Rybczak
2014-08-27 08:54:02 +02:00
parent e3e6aa09cc
commit 7fdace835b
9 changed files with 155 additions and 168 deletions

View File

@@ -22,15 +22,25 @@
#define NCMPCPP_SCREEN_TYPE_H
#include <string>
#include "config.h"
// forward declaration
struct BaseScreen;
enum class ScreenType {
Browser,
# ifdef ENABLE_CLOCK
Clock,
# endif // ENABLE_CLOCK
Help,
# ifdef HAVE_CURL_CURL_H
Lastfm,
# endif // HAVE_CURL_CURL_H
Lyrics,
MediaLibrary,
# ifdef ENABLE_OUTPUTS
Outputs,
# endif // ENABLE_OUTPUTS
Playlist,
PlaylistEditor,
SearchEngine,
@@ -38,13 +48,19 @@ enum class ScreenType {
ServerInfo,
SongInfo,
SortPlaylistDialog,
# ifdef HAVE_TAGLIB_H
TagEditor,
TinyTagEditor,
# endif // HAVE_TAGLIB_H
Unknown,
# ifdef ENABLE_VISUALIZER
Visualizer,
# endif // ENABLE_VISUALIZER
};
ScreenType stringtoStarterScreenType(const std::string &s);
ScreenType stringtoStartupScreenType(const std::string &s);
ScreenType stringToScreenType(const std::string &s);
BaseScreen *toScreen(ScreenType st);
#endif // NCMPCPP_SCREEN_TYPE_H