summaryrefslogtreecommitdiff
path: root/config.h
blob: c95d3c6b39c8b9a522c75f69df7408c5f43552b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#ifndef __TVGUIDE_CONFIG_H
#define __TVGUIDE_CONFIG_H

#include <vdr/themes.h>
#include <vdr/plugin.h>
#include "osdmanager.h"
#include "geometrymanager.h"
#include "fontmanager.h"
#include "imagecache.h"

enum {
    e12Hours,
    e24Hours
};

enum {
    eVertical,
    eHorizontal
};

enum {
    eNumJump,
    eGroupJump
};

enum {
    eStyleGraphical,
    eStyleBlendingMagick,
    eStyleBlendingDefault,
    eStyleFlat
};


enum eBlueKeyMode {
    eBlueKeySwitch = 0,
    eBlueKeyEPG,
    eBlueKeyFavorites
};


class cTvguideConfig {
    private:
    public:
        cTvguideConfig();
        ~cTvguideConfig();
        int debugImageLoading;
        int showMainMenuEntry;
        int replaceOriginalSchedule;
        int displayMode;
        int showTimeInGrid;
        int channelCols;
        int channelRows;
        int numGrids;
        int displayTime;
        int displayStatusHeader;
        int displayChannelGroups;
        int displayTimeBase;
        int headerHeightPercent;
        int channelGroupsPercent;
        int epgViewBorder;
        int scaleVideo;
        int decorateVideo;
        int timeLineWidthPercent;
        int timeLineHeightPercent;
        int displayChannelName;
        int channelHeaderWidthPercent;
        int channelHeaderHeightPercent;
        int footerHeightPercent;
        int stepMinutes;
        int bigStepHours;
        int hugeStepHours;
        int channelJumpMode;
        int jumpChannels;
        int blueKeyMode;
        int closeOnSwitch;
        int numkeyMode;
        int useRemoteTimers;
        int hideLastGroup;
        int hideChannelLogos;
        int logoWidthRatio;
        int logoHeightRatio;
        cString logoPath;
        int logoExtension;
        int hideEpgImages;
        int epgImageWidth;
        int epgImageHeight;
        int numAdditionalEPGPictures;
        int epgImageWidthLarge;
        int epgImageHeightLarge;
        cString epgImagePath;
        cString iconPath;
        int recMenuAskFolder;
        int fontIndex;
        const char *fontNameDefault;
        int FontButtonDelta;
        int FontDetailViewDelta;
        int FontDetailViewSmallDelta;
        int FontDetailHeaderDelta;
        int FontMessageBoxDelta;
        int FontMessageBoxLargeDelta;
        int FontStatusHeaderDelta;
        int FontStatusHeaderLargeDelta;
        int FontChannelHeaderDelta;
        int FontChannelGroupsDelta;
        int FontGridDelta;
        int FontGridSmallDelta;
        int FontTimeLineWeekdayDelta;
        int FontTimeLineDateDelta;
        int FontTimeLineTimeDelta;
        int FontChannelHeaderHorizontalDelta;
        int FontChannelGroupsHorizontalDelta;
        int FontGridHorizontalDelta;
        int FontGridHorizontalSmallDelta;
        int FontTimeLineDateHorizontalDelta;
        int FontTimeLineTimeHorizontalDelta;
        int FontRecMenuItemDelta;
        int FontRecMenuItemSmallDelta;
        int FontRecMenuItemLargeDelta;
        int timeFormat;
        int useNopacityTheme;
        int themeIndex;
        int themeIndexCurrent;
        cString themeName;
        std::string nOpacityTheme;
        int style;
        int roundedCorners;
        int displayRerunsDetailEPGView;
        int numReruns;
        int useSubtitleRerun;
        int numLogosInitial;
        int numLogosMax;
        int limitLogoCache;
        bool logoPathSet;
        bool imagesPathSet;
        bool iconsPathSet;
        bool LoadTheme();
        void SetStyle(void);
        void setDynamicValues(void);
        void SetLogoPath(cString path);
        void SetImagesPath(cString path);
        void SetIconsPath(cString path);
        void SetDefaultPathes(void);
        bool SetupParse(const char *Name, const char *Value);
};

#ifdef DEFINE_CONFIG
    cTvguideConfig tvguideConfig;
    cOsdManager osdManager;
    cGeometryManager geoManager;
    cFontManager fontManager;
    cImageCache imgCache;
    cTheme theme;
    cPlugin* pRemoteTimers = NULL;
#else
    extern cTvguideConfig tvguideConfig;
    extern cOsdManager osdManager;
    extern cGeometryManager geoManager;
    extern cFontManager fontManager;
    extern cImageCache imgCache;
    extern cTheme theme;
    extern cPlugin* pRemoteTimers;
#endif


// --- Theme -------------------------------------------------------------
//Style SETUP
#define CLR_STYLE_BLENDING_MAGICK   0xFFFFFFFF
#define CLR_STYLE_BLENDING_DEFAULT  0xAAAAAAAA
#define CLR_STYLE_GRAPHICAL         0x66666666
#define CLR_STYLE_FLAT              0x00000000

THEME_CLR(theme, clrStyle, CLR_STYLE_BLENDING_DEFAULT);
THEME_CLR(theme, clrBackgroundOSD, 0xB012273f);
THEME_CLR(theme, clrBackground, 0xFF12273f);
THEME_CLR(theme, clrGrid1, 0x00000000);
THEME_CLR(theme, clrGrid1Blending, 0x00000000);
THEME_CLR(theme, clrGrid2, 0x00000000);
THEME_CLR(theme, clrGrid2Blending, 0x00000000);
THEME_CLR(theme, clrHighlight, 0xAA3A3A55);
THEME_CLR(theme, clrHighlightBlending, 0xDD000000);
THEME_CLR(theme, clrFont, clrWhite);
THEME_CLR(theme, clrFontActive, 0xFF363636);
THEME_CLR(theme, clrFontHeader, 0xFF363636);
THEME_CLR(theme, clrFontButtons, clrWhite);
THEME_CLR(theme, clrStatusHeader, 0x00000000);
THEME_CLR(theme, clrStatusHeaderBlending, 0x00000000);
THEME_CLR(theme, clrHeader, 0x00000000);
THEME_CLR(theme, clrHeaderBlending, 0x00000000);
THEME_CLR(theme, clrBorder, 0x00000000);
THEME_CLR(theme, clrTimeline1, clrWhite);
THEME_CLR(theme, clrTimeline1Blending, 0xFF828282);
THEME_CLR(theme, clrTimeline2, clrBlack);
THEME_CLR(theme, clrTimeline2Blending, 0xFF3F3F3F);
THEME_CLR(theme, clrTimeBase, 0xA0FF0000);
THEME_CLR(theme, clrButtonRed, 0x00000000);
THEME_CLR(theme, clrButtonRedBorder, 0x00000000);
THEME_CLR(theme, clrButtonGreen, 0x00000000);
THEME_CLR(theme, clrButtonGreenBorder, 0x00000000);
THEME_CLR(theme, clrButtonYellow, 0x00000000);
THEME_CLR(theme, clrButtonYellowBorder, 0x00000000);
THEME_CLR(theme, clrButtonBlue, 0x00000000);
THEME_CLR(theme, clrButtonBlueBorder, 0x00000000);
THEME_CLR(theme, clrButtonBlend, 0xDD000000);
THEME_CLR(theme, clrRecMenuBackground, 0xAA000000);
THEME_CLR(theme, clrRecMenuTimerConflictBackground, 0xFFCCCCCC);
THEME_CLR(theme, clrRecMenuTimerConflictBar, 0xFF222222);
THEME_CLR(theme, clrRecMenuTimerConflictOverlap, 0xAAFF0000);
THEME_CLR(theme, clrRecMenuDayActive, 0xFF00FF00);
THEME_CLR(theme, clrRecMenuDayInactive, 0xFFFF0000);
THEME_CLR(theme, clrRecMenuDayHighlight, 0x44FFFFFF);
THEME_CLR(theme, clrRecMenuTextBack, 0xFF000000);
THEME_CLR(theme, clrRecMenuTextActiveBack, 0xFF939376);
THEME_CLR(theme, clrRecMenuKeyboardBack, 0xFF000000);
THEME_CLR(theme, clrRecMenuKeyboardBorder, clrWhite);
THEME_CLR(theme, clrRecMenuKeyboardHigh, 0x40BB0000);
THEME_CLR(theme, clrButtonRedKeyboard, 0xFFBB0000);
THEME_CLR(theme, clrButtonGreenKeyboard, 0xFF00BB00);
THEME_CLR(theme, clrButtonYellowKeyboard, 0xFFBBBB00);
THEME_CLR(theme, clrRecMenuTimelineTimer, 0xB012273f);
THEME_CLR(theme, clrRecMenuTimelineBack, 0xFF828282);
THEME_CLR(theme, clrRecMenuTimelineActive, 0xFF3F3F3F);
THEME_CLR(theme, clrRecMenuTimelineConflict, 0x30FF0000);
THEME_CLR(theme, clrRecMenuTimelineConflictOverlap, 0x90FF0000);
#endif //__TVGUIDE_CONFIG_H