blob: 76c8ed0eaa66558f47945f002b07d2ee5296da50 (
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
|
#include <vdr/osd.h>
#include <vdr/menu.h>
#include "nopacity.h"
#include "config.h"
#include "displaychannel.h"
#include "displaymenuview.h"
#include "displaymenu.h"
#include "displayreplay.h"
#include "displayvolume.h"
#include "displaytracks.h"
#include "displaymessage.h"
cNopacity::cNopacity(void) : cSkin("nOpacity", &::Theme) {
geoManager = new cGeometryManager();
fontManager = NULL;
imgCache = NULL;
}
cNopacity::~cNopacity() {
delete imgCache;
delete geoManager;
delete fontManager;
}
const char *cNopacity::Description(void) {
return "nOpacity";
}
cSkinDisplayChannel *cNopacity::DisplayChannel(bool WithInfo) {
ReloadCaches();
return new cNopacityDisplayChannel(WithInfo);
}
cSkinDisplayMenu *cNopacity::DisplayMenu(void) {
ReloadCaches();
return new cNopacityDisplayMenu();
}
cSkinDisplayReplay *cNopacity::DisplayReplay(bool ModeOnly) {
ReloadCaches();
return new cNopacityDisplayReplay(ModeOnly);
}
cSkinDisplayVolume *cNopacity::DisplayVolume(void) {
ReloadCaches();
return new cNopacityDisplayVolume();
}
cSkinDisplayTracks *cNopacity::DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) {
ReloadCaches();
return new cNopacityDisplayTracks(Title, NumTracks, Tracks);
}
cSkinDisplayMessage *cNopacity::DisplayMessage(void) {
ReloadCaches();
return new cNopacityDisplayMessage();
}
void cNopacity::ReloadCaches(void) {
if (geoManager->SetOSDSize() || !imgCache || imgCache->ThemeChanged()) {
int start = cTimeMs::Now();
config.Init();
geoManager->SetGeometry();
delete fontManager;
fontManager = new cFontManager();
delete imgCache;
imgCache = new cImageCache();
dsyslog("nopacity: Cache reloaded in %d ms", int(cTimeMs::Now()-start));
}
}
|