vdr-plugin-skindesigner/config.h

84 lines
2.2 KiB
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#ifndef __DESIGNER_CONFIG_H
#define __DESIGNER_CONFIG_H
#include <string>
#include <vector>
#include <map>
#include <vdr/tools.h>
#include <vdr/skins.h>
#include <vdr/plugin.h>
#include "libcore/fontmanager.h"
#include "libcore/imagecache.h"
#include "libcore/recfolderinfo.h"
2014-09-27 09:25:14 +02:00
class cDesignerConfig {
private:
2014-11-15 09:47:22 +01:00
cString CheckSlashAtEnd(string path);
2014-09-27 09:25:14 +02:00
bool epgImagePathSet;
bool skinPathSet;
bool logoPathSet;
cRect osdSize;
string osdSkin;
string osdTheme;
string fontFix;
string fontOsd;
string fontSml;
2014-11-15 09:47:22 +01:00
map < string, map < int, string > > plugins;
map < string, map < int, string > >::iterator plugIt;
2014-09-27 09:25:14 +02:00
public:
cDesignerConfig();
~cDesignerConfig();
bool SetupParse(const char *Name, const char *Value);
void SetPathes(void);
2014-09-27 09:25:14 +02:00
void SetSkinPath(cString path);
void SetLogoPath(cString path);
2014-09-27 09:25:14 +02:00
void SetEpgImagePath(cString path);
void ReadSkins(void);
void InitSkinIterator(void) { skinIterator = skins.begin(); };
bool GetSkin(string &skin);
2014-09-27 09:25:14 +02:00
void CheckDecimalPoint(void);
void SetSkin(void);
bool SkinChanged(void);
void SetOSDSize(void);
bool OsdSizeChanged(void);
void SetOSDFonts(void);
bool OsdFontsChanged(void);
cString GetSkinRessourcePath(void);
2014-11-15 09:47:22 +01:00
void AddPlugin(string name, map < int, string > &menus);
void InitPluginIterator(void);
map <int,string> *GetPluginTemplates(string &name);
2014-09-27 09:25:14 +02:00
cString skinPath;
cString logoPath;
2014-09-27 09:25:14 +02:00
cString epgImagePath;
int numLogosPerSizeInitial;
int limitLogoCache;
int numLogosMax;
int debugImageLoading;
bool replaceDecPoint;
char decPoint;
vector<string> skins;
vector<string>::iterator skinIterator;
int rerunAmount;
int rerunDistance;
int rerunMaxChannel;
int blockFlush;
2014-09-27 09:25:14 +02:00
};
2014-09-27 09:25:14 +02:00
#ifdef DEFINE_CONFIG
bool firstDisplay = true;
cDesignerConfig config;
cFontManager *fontManager = NULL;
cImageCache *imgCache = NULL;
2014-09-27 09:25:14 +02:00
cTheme Theme;
cRecordingsFolderInfo recFolderInfo(Recordings);
2014-09-27 09:25:14 +02:00
#else
extern bool firstDisplay;
extern cDesignerConfig config;
extern cFontManager *fontManager;
extern cImageCache *imgCache;
extern cTheme Theme;
extern cRecordingsFolderInfo recFolderInfo;
2014-09-27 09:25:14 +02:00
#endif
#endif //__DESIGNER_CONFIG_H