summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY3
-rw-r--r--Makefile7
-rw-r--r--channelepg.c17
-rw-r--r--channelepg.h12
-rw-r--r--channelgroups.c10
-rw-r--r--channelgroups.h6
-rw-r--r--channeljump.c4
-rw-r--r--channeljump.h6
-rw-r--r--detailview.c2
-rw-r--r--detailview.h16
-rw-r--r--epggrid.c12
-rw-r--r--epggrid.h18
-rw-r--r--gridelement.h8
-rw-r--r--helpers.c4
-rw-r--r--helpers.h2
-rw-r--r--libskindesigner/osdelements.c203
-rw-r--r--libskindesigner/osdelements.h91
-rw-r--r--libskindesigner/services.h131
-rw-r--r--libskindesigner/skindesignerosdbase.c209
-rw-r--r--libskindesigner/skindesignerosdbase.h84
-rw-r--r--recmenu.c3
-rw-r--r--recmenu.h12
-rw-r--r--recmenuitem.c45
-rw-r--r--recmenuitem.h48
-rw-r--r--recmenus.c6
-rw-r--r--recmenuview.c2
-rw-r--r--recmenuview.h10
-rw-r--r--timeline.c4
-rw-r--r--timeline.h10
-rw-r--r--timerconflict.c4
-rw-r--r--tvguideng.c75
-rw-r--r--tvguidengosd.c16
-rw-r--r--tvguidengosd.h6
33 files changed, 180 insertions, 906 deletions
diff --git a/HISTORY b/HISTORY
index 3a4bc05..8c41767 100644
--- a/HISTORY
+++ b/HISTORY
@@ -18,3 +18,6 @@ Version 0.0.2
- completed tokens for time viewelement in detailed view
Version 0.0.3
+
+- introduced libskindesignerapi
+
diff --git a/Makefile b/Makefile
index 128e041..65c60e1 100644
--- a/Makefile
+++ b/Makefile
@@ -47,15 +47,14 @@ SOFILE = libvdr-$(PLUGIN).so
### Includes and Defines (add further entries here):
-INCLUDES +=
+INCLUDES += $(shell pkg-config --cflags libskindesignerapi)
+LIBS += $(shell pkg-config --libs libskindesignerapi)
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
### The object files (add further files here):
OBJS = $(PLUGIN).o \
- libskindesigner/skindesignerosdbase.o \
- libskindesigner/osdelements.o \
helpers.o \
config.o \
setup.o \
@@ -126,7 +125,7 @@ install-i18n: $(I18Nmsgs)
### Targets:
$(SOFILE): $(OBJS)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
install-lib: $(SOFILE)
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
diff --git a/channelepg.c b/channelepg.c
index 82eca62..d3d7986 100644
--- a/channelepg.c
+++ b/channelepg.c
@@ -193,7 +193,7 @@ void cChannelEpg::AddNewGridsAtStart(void) {
if (firstGrid->EndTime() >= timeManager->GetEnd())
firstGrid->SetEndTime(timeManager->GetEnd());
} else {
- cGridElement *grid = AddDummyGrid(timeManager->GetStart(), firstGrid->StartTime(), firstGrid);
+ AddDummyGrid(timeManager->GetStart(), firstGrid->StartTime(), firstGrid);
}
}
}
@@ -225,7 +225,7 @@ void cChannelEpg::AddNewGridsAtEnd(void) {
if (event->StartTime() > timeManager->GetEnd()) {
break;
}
- cGridElement *grid = AddEpgGrid(event);
+ AddEpgGrid(event);
if (event->EndTime() > timeManager->GetEnd()) {
dummyNeeded = false;
break;
@@ -238,7 +238,7 @@ void cChannelEpg::AddNewGridsAtEnd(void) {
if (lastGrid->StartTime() <= timeManager->GetStart())
lastGrid->SetStartTime(timeManager->GetStart());
} else {
- cGridElement *grid = AddDummyGrid(lastGrid->EndTime(), timeManager->GetEnd());
+ AddDummyGrid(lastGrid->EndTime(), timeManager->GetEnd());
}
}
}
@@ -311,7 +311,7 @@ void cChannelEpg::SetTimers(void) {
}
}
-void cChannelEpg::DrawHeader(cViewGrid *channelsGrid) {
+void cChannelEpg::DrawHeader(skindesignerapi::cViewGrid *channelsGrid) {
double x, y, width, height;
@@ -343,7 +343,7 @@ void cChannelEpg::DrawHeader(cViewGrid *channelsGrid) {
}
}
-void cChannelEpg::DrawGrids(cViewGrid *epgGrid) {
+void cChannelEpg::DrawGrids(skindesignerapi::cViewGrid *epgGrid) {
int displaySeconds = timeManager->GetDisplaySeconds();
double x, y, width, height;
if (config.displayMode == eHorizontal) {
@@ -405,13 +405,13 @@ void cChannelEpg::DrawGrids(cViewGrid *epgGrid) {
}
}
-void cChannelEpg::DeleteOutdated(cViewGrid *epgGrid) {
+void cChannelEpg::DeleteOutdated(skindesignerapi::cViewGrid *epgGrid) {
for (set<long>::iterator it = deletedElements.begin(); it != deletedElements.end(); it++) {
epgGrid->Delete(*it);
}
}
-void cChannelEpg::DeleteGridViews(cViewGrid *epgGrid) {
+void cChannelEpg::DeleteGridViews(skindesignerapi::cViewGrid *epgGrid) {
for (cGridElement *ge = grids.First(); ge; ge = grids.Next(ge)) {
epgGrid->Delete(ge->Id());
}
@@ -426,13 +426,12 @@ cGridElement *cChannelEpg::AddEpgGrid(const cEvent *event, cGridElement *after)
return grid;
}
-cGridElement *cChannelEpg::AddDummyGrid(time_t start, time_t end, cGridElement *after) {
+void cChannelEpg::AddDummyGrid(time_t start, time_t end, cGridElement *after) {
cGridElement *dummy = new cDummyElement(start, end, this);
if (!after)
grids.Add(dummy);
else
grids.Ins(dummy, after);
- return dummy;
}
void cChannelEpg::Debug(void) {
diff --git a/channelepg.h b/channelepg.h
index 2a575ce..9785799 100644
--- a/channelepg.h
+++ b/channelepg.h
@@ -3,7 +3,7 @@
#include <set>
#include <vdr/tools.h>
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "config.h"
#include "gridelement.h"
#include "epgelement.h"
@@ -27,7 +27,7 @@ private:
bool hasTimer;
bool hasSwitchTimer;
cGridElement *AddEpgGrid(const cEvent *event, cGridElement *after = NULL);
- cGridElement *AddDummyGrid(time_t start, time_t end, cGridElement *after = NULL);
+ void AddDummyGrid(time_t start, time_t end, cGridElement *after = NULL);
public:
cChannelEpg(int position, const cChannel *channel, cTimeManager *timeManager);
virtual ~cChannelEpg(void);
@@ -51,10 +51,10 @@ public:
void SetSwitchTimer() {hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);};
bool HasSwitchTimer() { return hasSwitchTimer; };
void ClearGrids(void);
- void DrawHeader(cViewGrid *channelsGrid);
- void DrawGrids(cViewGrid *epgGrid);
- void DeleteOutdated(cViewGrid *epgGrid);
- void DeleteGridViews(cViewGrid *epgGrid);
+ void DrawHeader(skindesignerapi::cViewGrid *channelsGrid);
+ void DrawGrids(skindesignerapi::cViewGrid *epgGrid);
+ void DeleteOutdated(skindesignerapi::cViewGrid *epgGrid);
+ void DeleteGridViews(skindesignerapi::cViewGrid *epgGrid);
void Debug(void);
};
diff --git a/channelgroups.c b/channelgroups.c
index 70cecf1..5069795 100644
--- a/channelgroups.c
+++ b/channelgroups.c
@@ -19,7 +19,7 @@ void cChannelGroup::Debug(void) {
// --- cChannelgroups -------------------------------------------------------------
-cChannelgroups::cChannelgroups(cViewGrid *channelgroupGrid) {
+cChannelgroups::cChannelgroups(skindesignerapi::cViewGrid *channelgroupGrid) {
this->channelgroupGrid = channelgroupGrid;
}
@@ -144,25 +144,25 @@ int cChannelgroups::GetGroup(const cChannel *channel) {
}
string cChannelgroups::GetPrevGroupName(int group) {
- if (group <= 0 || group > channelGroups.size())
+ if (group <= 0 || group > (int)channelGroups.size())
return "";
return channelGroups[group-1].GetName();
}
string cChannelgroups::GetNextGroupName(int group) {
- if (group < 0 || group >= channelGroups.size() - 1)
+ if (group < 0 || group >= (int)channelGroups.size() - 1)
return "";
return channelGroups[group+1].GetName();
}
int cChannelgroups::GetPrevGroupFirstChannel(int group) {
- if (group <= 0 || group > channelGroups.size())
+ if (group <= 0 || group > (int)channelGroups.size())
return -1;
return channelGroups[group-1].StartChannel();
}
int cChannelgroups::GetNextGroupFirstChannel(int group) {
- if (group < 0 || group >= channelGroups.size())
+ if (group < 0 || group >= (int)channelGroups.size())
return -1;
return channelGroups[group+1].StartChannel();
}
diff --git a/channelgroups.h b/channelgroups.h
index 8742ab4..e53d5b1 100644
--- a/channelgroups.h
+++ b/channelgroups.h
@@ -3,7 +3,7 @@
#include <set>
#include <vdr/tools.h>
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "config.h"
// --- cChannelGroup -------------------------------------------------------------
@@ -31,11 +31,11 @@ public:
class cChannelgroups {
private:
- cViewGrid *channelgroupGrid;
+ skindesignerapi::cViewGrid *channelgroupGrid;
vector<cChannelGroup> channelGroups;
double SetGroup(int groupId, int fields, double offset);
public:
- cChannelgroups(cViewGrid *channelgroupGrid);
+ cChannelgroups(skindesignerapi::cViewGrid *channelgroupGrid);
virtual ~cChannelgroups(void);
void Init(void);
void Clear(void);
diff --git a/channeljump.c b/channeljump.c
index aeb5d40..4dcd20c 100644
--- a/channeljump.c
+++ b/channeljump.c
@@ -1,7 +1,7 @@
#include <vdr/channels.h>
#include "channeljump.h"
-cChannelJump::cChannelJump(cViewElement *channelJump, int lastValidChannel) {
+cChannelJump::cChannelJump(skindesignerapi::cViewElement *channelJump, int lastValidChannel) {
this->channelJump = channelJump;
channel = 0;
maxChannels = lastValidChannel;
@@ -41,7 +41,7 @@ cString cChannelJump::BuildChannelString(void) {
}
bool cChannelJump::TimeOut(void) {
- if ((cTimeMs::Now() - startTime) > timeout)
+ if ((int)(cTimeMs::Now() - startTime) > timeout)
return true;
return false;
} \ No newline at end of file
diff --git a/channeljump.h b/channeljump.h
index 54e05c2..beca9d8 100644
--- a/channeljump.h
+++ b/channeljump.h
@@ -1,20 +1,20 @@
#ifndef __TVGUIDE_CHANNELJUMP_H
#define __TVGUIDE_CHANNELJUMP_H
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
// --- cChannelJump -------------------------------------------------------------
class cChannelJump {
private:
- cViewElement *channelJump;
+ skindesignerapi::cViewElement *channelJump;
int channel;
int maxChannels;
int startTime;
int timeout;
cString BuildChannelString(void);
public:
- cChannelJump(cViewElement *channelJump, int lastValidChannel);
+ cChannelJump(skindesignerapi::cViewElement *channelJump, int lastValidChannel);
virtual ~cChannelJump(void);
void Set(int key);
bool TimeOut(void);
diff --git a/detailview.c b/detailview.c
index 2853641..8095a42 100644
--- a/detailview.c
+++ b/detailview.c
@@ -4,7 +4,7 @@
#include "services/scraper2vdr.h"
#include "services/epgsearch.h"
-cDetailView::cDetailView(cOsdView *detailView, const cEvent *event) {
+cDetailView::cDetailView(skindesignerapi::cOsdView *detailView, const cEvent *event) {
init = true;
lastSecond = -1;
this->detailView = detailView;
diff --git a/detailview.h b/detailview.h
index cb3cd3f..3697a25 100644
--- a/detailview.h
+++ b/detailview.h
@@ -2,19 +2,19 @@
#define __TVGUIDE_DETAILVIEW_H
#include "config.h"
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
class cDetailView {
private:
bool init;
int lastSecond;
- cOsdView *detailView;
+ skindesignerapi::cOsdView *detailView;
const cEvent *event;
- cViewElement *back;
- cViewElement *header;
- cViewElement *footer;
- cViewElement *watch;
- cViewTab *tabs;
+ skindesignerapi::cViewElement *back;
+ skindesignerapi::cViewElement *header;
+ skindesignerapi::cViewElement *footer;
+ skindesignerapi::cViewElement *watch;
+ skindesignerapi::cViewTab *tabs;
void DrawBackground(void);
void DrawHeader(void);
void DrawFooter(void);
@@ -23,7 +23,7 @@ private:
void SetScraperTokens(void);
void SetEpgPictures(int eventId);
public:
- cDetailView(cOsdView *detailView, const cEvent *event);
+ cDetailView(skindesignerapi::cOsdView *detailView, const cEvent *event);
virtual ~cDetailView(void);
void Draw(void);
void Left(void);
diff --git a/epggrid.c b/epggrid.c
index 7951eeb..bd5df2b 100644
--- a/epggrid.c
+++ b/epggrid.c
@@ -3,7 +3,7 @@
#include "helpers.h"
#include "services/scraper2vdr.h"
-cEpgGrid::cEpgGrid(cOsdView *rootView, cTimeManager *timeManager) {
+cEpgGrid::cEpgGrid(skindesignerapi::cOsdView *rootView, cTimeManager *timeManager) {
lastSecond = -1;
channelGroupLast = -1;
active = NULL;
@@ -24,12 +24,12 @@ cEpgGrid::cEpgGrid(cOsdView *rootView, cTimeManager *timeManager) {
channelsGrid = rootView->GetViewGrid(config.displayMode == eHorizontal ? vgChannelsHor : vgChannelsVer);
epgGrid = rootView->GetViewGrid(config.displayMode == eHorizontal ? vgSchedulesHor : vgSchedulesVer);
- cViewElement *timelineDate = rootView->GetViewElement(config.displayMode == eHorizontal ? verDateTimelineHor : verDateTimelineVer);
- cViewElement *timeIndicator = rootView->GetViewElement(config.displayMode == eHorizontal ? verTimeIndicatorHor : verTimeIndicatorVer);
- cViewGrid *timelineGrid = rootView->GetViewGrid(config.displayMode == eHorizontal ? vgTimelineHor : vgTimelineVer);
+ skindesignerapi::cViewElement *timelineDate = rootView->GetViewElement(config.displayMode == eHorizontal ? verDateTimelineHor : verDateTimelineVer);
+ skindesignerapi::cViewElement *timeIndicator = rootView->GetViewElement(config.displayMode == eHorizontal ? verTimeIndicatorHor : verTimeIndicatorVer);
+ skindesignerapi::cViewGrid *timelineGrid = rootView->GetViewGrid(config.displayMode == eHorizontal ? vgTimelineHor : vgTimelineVer);
timeline = new cTimeline(timelineGrid, timelineDate, timeIndicator, timeManager);
- cViewGrid *channelgroupsGrid = rootView->GetViewGrid(config.displayMode == eHorizontal ? vgChannelGroupsHor : vgChannelGroupsVer);
+ skindesignerapi::cViewGrid *channelgroupsGrid = rootView->GetViewGrid(config.displayMode == eHorizontal ? vgChannelGroupsHor : vgChannelGroupsVer);
channelGroups = new cChannelgroups(channelgroupsGrid);
channelGroups->Init();
}
@@ -681,7 +681,7 @@ bool cEpgGrid::DrawTime(void) {
}
cChannelJump *cEpgGrid::GetChannelJumper(void) {
- cViewElement *channelJump = rootView->GetViewElement(verChannelJump);
+ skindesignerapi::cViewElement *channelJump = rootView->GetViewElement(verChannelJump);
int lastValidChannel = GetLastValidChannel();
return new cChannelJump(channelJump, lastValidChannel);
}
diff --git a/epggrid.h b/epggrid.h
index 4514f5b..5922f38 100644
--- a/epggrid.h
+++ b/epggrid.h
@@ -6,7 +6,7 @@
#include "timeline.h"
#include "channelgroups.h"
#include "channeljump.h"
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
class cEpgGrid {
private:
@@ -14,14 +14,14 @@ private:
int channelsPerPage;
int channelGroupLast;
long oldActiveGridId;
- cOsdView *rootView;
+ skindesignerapi::cOsdView *rootView;
cTimeManager *timeManager;
- cViewElement *back;
- cViewElement *header;
- cViewElement *watch;
- cViewElement *footer;
- cViewGrid *channelsGrid;
- cViewGrid *epgGrid;
+ skindesignerapi::cViewElement *back;
+ skindesignerapi::cViewElement *header;
+ skindesignerapi::cViewElement *watch;
+ skindesignerapi::cViewElement *footer;
+ skindesignerapi::cViewGrid *channelsGrid;
+ skindesignerapi::cViewGrid *epgGrid;
cTimeline *timeline;
cChannelgroups *channelGroups;
cList<cChannelEpg> channels;
@@ -34,7 +34,7 @@ private:
const cChannel *SeekChannelBack(int num);
void ClearOutdatedChannelHeaders(void);
public:
- cEpgGrid(cOsdView *rootView, cTimeManager *timeManager);
+ cEpgGrid(skindesignerapi::cOsdView *rootView, cTimeManager *timeManager);
virtual ~cEpgGrid(void);
void Deactivate(bool hide) { lastSecond = -1; rootView->Deactivate(hide); };
void Activate(void) { DrawTime(); rootView->Activate(); };
diff --git a/gridelement.h b/gridelement.h
index 1183047..4bd6d08 100644
--- a/gridelement.h
+++ b/gridelement.h
@@ -16,7 +16,7 @@ protected:
bool hasSwitchTimer;
cChannelEpg *owner;
bool Intersects(cGridElement *neighbor);
- virtual time_t Duration(void) {};
+ virtual time_t Duration(void) { return 0; };
bool dummy;
public:
cGridElement(cChannelEpg *owner);
@@ -27,8 +27,8 @@ public:
void SetActive(void) {active = true;};
void SetInActive(void) {active = false;};
bool Match(time_t t);
- virtual time_t StartTime(void) {};
- virtual time_t EndTime(void) {};
+ virtual time_t StartTime(void) { return 0; };
+ virtual time_t EndTime(void) { return 0; };
virtual void SetStartTime(time_t start) {};
virtual void SetEndTime(time_t end) {};
int CalcOverlap(cGridElement *neighbor);
@@ -41,7 +41,7 @@ public:
bool IsFirst(void);
bool IsDummy(void) { return dummy; };
const cChannel *Channel(void);
- virtual const char *Title(void) {};
+ virtual const char *Title(void) { return ""; };
virtual const char *ShortText(void) { return ""; };
virtual const cEvent *Event(void) { return NULL; };
cChannelEpg *Owner(void);
diff --git a/helpers.c b/helpers.c
index 1a2ef4a..db39511 100644
--- a/helpers.c
+++ b/helpers.c
@@ -176,7 +176,7 @@ std::vector<std::string>& splitstring::split(char delim, int rep) {
std::string work = data();
std::string buf = "";
int i = 0;
- while (i < work.length()) {
+ while (i < (int)work.length()) {
if (work[i] != delim)
buf += work[i];
else if (rep == 1) {
@@ -495,7 +495,7 @@ int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy)
return 0;
}
-static int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy)
+int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy)
{
register Uint FilterR = 0;
register Uint FilterR1;
diff --git a/helpers.h b/helpers.h
index 5f16be6..6d21756 100644
--- a/helpers.h
+++ b/helpers.h
@@ -81,7 +81,7 @@ typedef struct
void afuzzy_init(const char *p, int kerr, int UseFilter, AFUZZY *fuzzy);
void afuzzy_free(AFUZZY *fuzzy);
int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy);
-static int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy);
+int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy);
#endif
#endif // __TVGUIDE_HELPERS_H
diff --git a/libskindesigner/osdelements.c b/libskindesigner/osdelements.c
deleted file mode 100644
index 11915a8..0000000
--- a/libskindesigner/osdelements.c
+++ /dev/null
@@ -1,203 +0,0 @@
-#include "osdelements.h"
-
-/**********************************************************************
-* cOsdElement
-**********************************************************************/
-cOsdElement::cOsdElement(cSkinDisplayPlugin *view) {
- this->view = view;
-}
-
-cOsdElement::~cOsdElement() {
-}
-
-void cOsdElement::ClearTokens(void) {
- stringTokens.clear();
- intTokens.clear();
- loopTokens.clear();
-}
-
-void cOsdElement::AddStringToken(string key, string value) {
- stringTokens.insert(pair<string,string>(key, value));
-}
-
-void cOsdElement::AddIntToken(string key, int value) {
- intTokens.insert(pair<string,int>(key, value));
-}
-
-void cOsdElement::AddLoopToken(string loopName, map<string, string> &tokens) {
- map<string, vector<map<string, string> > >::iterator hitLoop = loopTokens.find(loopName);
- if (hitLoop == loopTokens.end()) {
- vector<map<string, string> > tokenVector;
- tokenVector.push_back(tokens);
- loopTokens.insert(pair<string, vector<map<string, string> > >(loopName, tokenVector));
- } else {
- vector<map<string, string> > *tokenVector = &hitLoop->second;
- tokenVector->push_back(tokens);
- }
-}
-
-bool cOsdElement::ChannelLogoExists(string channelId) {
- return view->ChannelLogoExists(channelId);
-}
-
-string cOsdElement::GetEpgImagePath(void) {
- return view->GetEpgImagePath();
-}
-
-
-/**********************************************************************
-* cViewElement
-**********************************************************************/
-cViewElement::cViewElement(cSkinDisplayPlugin *view, int viewElementID) : cOsdElement(view) {
- this->viewElementID = viewElementID;
-}
-
-cViewElement::~cViewElement() {
-}
-
-void cViewElement::Clear(void) {
- if (!view)
- return;
- view->ClearViewElement(viewElementID);
-}
-
-void cViewElement::Display(void) {
- if (!view)
- return;
- view->SetViewElementIntTokens(&intTokens);
- view->SetViewElementStringTokens(&stringTokens);
- view->SetViewElementLoopTokens(&loopTokens);
- view->DisplayViewElement(viewElementID);
-}
-
-/**********************************************************************
-* cViewGrid
-**********************************************************************/
-cViewGrid::cViewGrid(cSkinDisplayPlugin *view, int viewGridID) : cOsdElement(view) {
- this->viewGridID = viewGridID;
-}
-
-cViewGrid::~cViewGrid() {
-}
-
-void cViewGrid::SetGrid(long gridID, double x, double y, double width, double height) {
- if (!view)
- return;
- view->SetGrid(viewGridID, gridID, x, y, width, height, &intTokens, &stringTokens);
-}
-
-void cViewGrid::SetCurrent(long gridID, bool current) {
- if (!view)
- return;
- view->SetGridCurrent(viewGridID, gridID, current);
-}
-
-void cViewGrid::MoveGrid(long gridID, double x, double y, double width, double height) {
- if (!view)
- return;
- view->SetGrid(viewGridID, gridID, x, y, width, height, NULL, NULL);
-}
-
-void cViewGrid::Delete(long gridID) {
- if (!view)
- return;
- view->DeleteGrid(viewGridID, gridID);
-}
-
-void cViewGrid::Clear(void) {
- if (!view)
- return;
- view->ClearGrids(viewGridID);
-}
-
-void cViewGrid::Display(void) {
- if (!view)
- return;
- view->DisplayGrids(viewGridID);
-}
-
-/**********************************************************************
-* cViewTab
-**********************************************************************/
-cViewTab::cViewTab(cSkinDisplayPlugin *view) : cOsdElement(view) {
-}
-
-cViewTab::~cViewTab() {
-}
-
-void cViewTab::Init(void) {
- view->SetTabIntTokens(&intTokens);
- view->SetTabStringTokens(&stringTokens);
- view->SetTabLoopTokens(&loopTokens);
- view->SetTabs();
-}
-
-void cViewTab::Left(void) {
- view->TabLeft();
-}
-
-void cViewTab::Right(void) {
- view->TabRight();
-}
-
-void cViewTab::Up(void) {
- view->TabUp();
-}
-
-void cViewTab::Down(void) {
- view->TabDown();
-}
-
-void cViewTab::Display(void) {
- if (!view)
- return;
- view->DisplayTabs();
-}
-
-/**********************************************************************
-* cOsdView
-**********************************************************************/
-cOsdView::cOsdView(cSkinDisplayPlugin *displayPlugin) {
- this->displayPlugin = displayPlugin;
-}
-
-cOsdView::~cOsdView() {
- delete displayPlugin;
-}
-
-void cOsdView::Deactivate(bool hide) {
- if (!displayPlugin)
- return;
- displayPlugin->Deactivate(hide);
-}
-
-void cOsdView::Activate(void) {
- if (!displayPlugin)
- return;
- displayPlugin->Activate();
-}
-
-cViewElement *cOsdView::GetViewElement(int viewElementID) {
- if (!displayPlugin)
- return NULL;
- return new cViewElement(displayPlugin, viewElementID);
-}
-
-cViewGrid *cOsdView::GetViewGrid(int viewGridID) {
- if (!displayPlugin)
- return NULL;
- displayPlugin->InitGrids(viewGridID);
- return new cViewGrid(displayPlugin, viewGridID);
-}
-
-cViewTab *cOsdView::GetViewTabs(void) {
- if (!displayPlugin)
- return NULL;
- return new cViewTab(displayPlugin);
-}
-
-void cOsdView::Display(void) {
- if (!displayPlugin)
- return;
- displayPlugin->Flush();
-}
diff --git a/libskindesigner/osdelements.h b/libskindesigner/osdelements.h
deleted file mode 100644
index 057a1fd..0000000
--- a/libskindesigner/osdelements.h
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef __OSDELEMENTS_H
-#define __OSDELEMENTS_H
-
-#include <vdr/plugin.h>
-#include "services.h"
-
-/**********************************************************************
-* cOsdElement
-**********************************************************************/
-
-class cOsdElement {
-protected:
- cSkinDisplayPlugin *view;
- map < string, string > stringTokens;
- map < string, int > intTokens;
- map < string, vector< map< string, string > > > loopTokens;
-public:
- cOsdElement(cSkinDisplayPlugin *view);
- virtual ~cOsdElement();
- void AddLoopToken(string loopName, map<string, string> &tokens);
- void AddStringToken(string key, string value);
- void AddIntToken(string key, int value);
- void ClearTokens(void);
- bool ChannelLogoExists(string channelId);
- string GetEpgImagePath(void);
-};
-
-/**********************************************************************
-* cViewElement
-**********************************************************************/
-class cViewElement : public cOsdElement {
-private:
- int viewElementID;
-public:
- cViewElement(cSkinDisplayPlugin *view, int viewElementID);
- virtual ~cViewElement();
- void Clear(void);
- void Display(void);
-};
-
-/**********************************************************************
-* cViewGrid
-**********************************************************************/
-class cViewGrid : public cOsdElement {
-private:
- int viewGridID;
-public:
- cViewGrid(cSkinDisplayPlugin *view, int viewGridID);
- virtual ~cViewGrid();
- void SetGrid(long gridID, double x, double y, double width, double height);
- void SetCurrent(long gridID, bool current);
- void MoveGrid(long gridID, double x, double y, double width, double height);
- void Delete(long gridID);
- void Clear(void);
- void Display(void);
-};
-
-/**********************************************************************
-* cViewTab
-**********************************************************************/
-class cViewTab : public cOsdElement {
-private:
-public:
- cViewTab(cSkinDisplayPlugin *view);
- virtual ~cViewTab();
- void Init(void);
- void Left(void);
- void Right(void);
- void Up(void);
- void Down(void);
- void Display(void);
-};
-
-/**********************************************************************
-* cOsdView
-**********************************************************************/
-class cOsdView {
-private:
- cSkinDisplayPlugin *displayPlugin;
-public:
- cOsdView(cSkinDisplayPlugin *displayPlugin);
- virtual ~cOsdView();
- void Deactivate(bool hide);
- void Activate(void);
- cViewElement *GetViewElement(int viewElementID);
- cViewGrid *GetViewGrid(int viewGridID);
- cViewTab *GetViewTabs(void);
- void Display(void);
-};
-
-#endif // __OSDELEMENTS_H \ No newline at end of file
diff --git a/libskindesigner/services.h b/libskindesigner/services.h
deleted file mode 100644
index 8fa9c69..0000000
--- a/libskindesigner/services.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef __SKINDESIGNERSERVICES_H
-#define __SKINDESIGNERSERVICES_H
-
-using namespace std;
-
-#include <string>
-#include <vector>
-#include <map>
-
-enum eMenuType {
- mtList,
- mtText
-};
-
-class cSDDisplayMenu : public cSkinDisplayMenu {
-public:
- virtual void SetTitle(const char *Title);
- virtual void SetPluginMenu(string name, int menu, int type, bool init);
- virtual bool SetItemPlugin(map<string,string> *stringTokens, map<string,int> *intTokens, map<string,vector<map<string,string> > > *loopTokens, int Index, bool Current, bool Selectable);
- virtual bool SetPluginText(map<string,string> *stringTokens, map<string,int> *intTokens, map<string,vector<map<string,string> > > *loopTokens);
-};
-
-class cSkinDisplayPlugin {
-public:
- cSkinDisplayPlugin(void);
- virtual ~cSkinDisplayPlugin(void);
- virtual void Deactivate(bool hide);
- virtual void Activate(void);
- virtual void ClearViewElement(int id);
- virtual void DisplayViewElement(int id);
- virtual void SetViewElementIntTokens(map<string,int> *intTokens);
- virtual void SetViewElementStringTokens(map<string,string> *stringTokens);
- virtual void SetViewElementLoopTokens(map<string,vector<map<string,string> > > *loopTokens);
- virtual void InitGrids(int viewGridID);
- virtual void SetGrid(int viewGridID, long gridID, double x, double y, double width, double height, map<string,int> *intTokens, map<string,string> *stringTokens);
- virtual void SetGridCurrent(int viewGridID, long gridID, bool current);
- virtual void DeleteGrid(int viewGridID, long gridID);
- virtual void DisplayGrids(int viewGridID);
- virtual void ClearGrids(int viewGridID);
- virtual void SetTabIntTokens(map<string,int> *intTokens);
- virtual void SetTabStringTokens(map<string,string> *stringTokens);
- virtual void SetTabLoopTokens(map<string,vector<map<string,string> > > *loopTokens);
- virtual void SetTabs(void);
- virtual void TabLeft(void);
- virtual void TabRight(void);
- virtual void TabUp(void);
- virtual void TabDown(void);
- virtual void DisplayTabs(void);
- virtual void Flush(void);
- virtual bool ChannelLogoExists(string channelId);
- virtual string GetEpgImagePath(void);
-};
-
-/*********************************************************************
-* Data Structures for Service Calls
-*********************************************************************/
-
-// Data structure for service "RegisterPlugin"
-class RegisterPlugin {
-public:
- RegisterPlugin(void) {
- name = "";
- };
- void SetMenu(int key, string templateName) {
- menus.insert(pair<int, string>(key, templateName));
- }
- void SetView(int key, string templateName) {
- views.insert(pair<int, string>(key, templateName));
- }
- void SetSubView(int view, int subView, string templateName) {
- pair<int, string> sub = make_pair(subView, templateName);
- subViews.insert(pair<int, pair<int, string> >(view, sub));
- }
- void SetViewElement(int view, int viewElement, string name) {
- map< int, map<int, string> >::iterator hit = viewElements.find(view);
- if (hit == viewElements.end()) {
- map<int, string> vE;
- vE.insert(pair<int, string >(viewElement, name));
- viewElements.insert(pair<int, map < int, string > >(view, vE));
- } else {
- (hit->second).insert(pair<int, string >(viewElement, name));
- }
- }
- void SetViewGrid(int view, int viewGrid, string name) {
- map< int, map<int, string> >::iterator hit = viewGrids.find(view);
- if (hit == viewGrids.end()) {
- map<int, string> vG;
- vG.insert(pair<int, string >(viewGrid, name));
- viewGrids.insert(pair<int, map < int, string > >(view, vG));
- } else {
- (hit->second).insert(pair<int, string >(viewGrid, name));
- }
- }
-// in
- string name; //name of plugin
- map< int, string > menus; //menus as key -> templatename hashmap
- map< int, string> views; //standalone views as key -> templatename hashmap
- multimap< int, pair <int, string> > subViews; //subviews of standalone views as view -> (subview, templatename) multimap
- map< int, map <int, string> > viewElements; //viewelements as key -> (viewelement, viewelementname) hashmap
- map< int, map <int, string> > viewGrids; //viewgrids as key -> (viewgrid, viewgridname) hashmap
-//out
-};
-
-// Data structure for service "GetDisplayMenu"
-class GetDisplayMenu {
-public:
- GetDisplayMenu(void) {
- displayMenu = NULL;
- };
-// in
-//out
- cSDDisplayMenu *displayMenu;
-};
-
-// Data structure for service "GetDisplayPlugin"
-class GetDisplayPlugin {
-public:
- GetDisplayPlugin(void) {
- pluginName = "";
- viewID = -1;
- subViewID = -1;
- displayPlugin = NULL;
- };
-// in
- string pluginName;
- int viewID;
- int subViewID;
-//out
- cSkinDisplayPlugin *displayPlugin;
-};
-#endif //__SKINDESIGNERSERVICES_H
diff --git a/libskindesigner/skindesignerosdbase.c b/libskindesigner/skindesignerosdbase.c
deleted file mode 100644
index 4d40615..0000000
--- a/libskindesigner/skindesignerosdbase.c
+++ /dev/null
@@ -1,209 +0,0 @@
-#include "skindesignerosdbase.h"
-#include "osdelements.h"
-
-/**********************************************************************
-* cSkindesignerOsdObject
-**********************************************************************/
-
-cSkindesignerOsdObject::cSkindesignerOsdObject(void) {
- pSkinDesigner = NULL;
- pluginName = "";
-}
-
-cSkindesignerOsdObject::~cSkindesignerOsdObject() {
-}
-
-bool cSkindesignerOsdObject::InitSkindesignerInterface(string pluginName) {
- this->pluginName = pluginName;
- pSkinDesigner = cPluginManager::GetPlugin("skindesigner");
- if (!pSkinDesigner) {
- return false;
- }
- return true;
-}
-
-cOsdView *cSkindesignerOsdObject::GetOsdView(int viewID, int subViewID) {
- cSkinDisplayPlugin *displayPlugin = NULL;
- cOsdView *view = NULL;
- GetDisplayPlugin call;
- call.pluginName = pluginName;
- call.viewID = viewID;
- call.subViewID = subViewID;
- bool ok = pSkinDesigner->Service("GetDisplayPlugin", &call);
- if (ok) {
- displayPlugin = call.displayPlugin;
- view = new cOsdView(displayPlugin);
- }
- return view;
-}
-
-/**********************************************************************
-* cSkindesignerOsdItem
-**********************************************************************/
-cSkindesignerOsdItem::cSkindesignerOsdItem(eOSState State) : cOsdItem(State) {
- sdDisplayMenu = NULL;
-}
-
-cSkindesignerOsdItem::cSkindesignerOsdItem(const char *Text, eOSState State, bool Selectable) : cOsdItem(Text, State, Selectable) {
- sdDisplayMenu = NULL;
-}
-
-cSkindesignerOsdItem::~cSkindesignerOsdItem() {
-
-}
-
-void cSkindesignerOsdItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable) {
- if (sdDisplayMenu) {
- if (!sdDisplayMenu->SetItemPlugin(&stringTokens, &intTokens, &loopTokens, Index, Current, Selectable)) {
- DisplayMenu->SetItem(Text(), Index, Current, Selectable);
- }
- } else {
- DisplayMenu->SetItem(Text(), Index, Current, Selectable);
- }
-}
-
-void cSkindesignerOsdItem::AddStringToken(string key, string value) {
- stringTokens.insert(pair<string,string>(key, value));
-}
-
-void cSkindesignerOsdItem::AddIntToken(string key, int value) {
- intTokens.insert(pair<string,int>(key, value));
-}
-
-void cSkindesignerOsdItem::AddLoopToken(string loopName, map<string, string> &tokens) {
- map<string, vector<map<string, string> > >::iterator hitLoop = loopTokens.find(loopName);
- if (hitLoop == loopTokens.end()) {
- vector<map<string, string> > tokenVector;
- tokenVector.push_back(tokens);
- loopTokens.insert(pair<string, vector<map<string, string> > >(loopName, tokenVector));
- } else {
- vector<map<string, string> > *tokenVector = &hitLoop->second;
- tokenVector->push_back(tokens);
- }
-}
-
-
-/**********************************************************************
-* cSkindesignerOsdMenu
-**********************************************************************/
-cSkindesignerOsdMenu::cSkindesignerOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4) : cOsdMenu(Title, c0, c1, c2, c3, c4) {
- init = true;
- displayText = false;
- sdDisplayMenu = NULL;
- pluginName = "";
- SetMenuCategory(mcPlugin);
- SetSkinDesignerDisplayMenu();
-}
-
-cSkindesignerOsdMenu::~cSkindesignerOsdMenu() {
-
-}
-
-void cSkindesignerOsdMenu::SetPluginMenu(int menu, eMenuType type) {
- if (type == mtList)
- displayText = false;
- else if (type == mtText)
- displayText = true;
-
- if (sdDisplayMenu) {
- sdDisplayMenu->SetPluginMenu(pluginName, menu, type, init);
- }
- init = false;
-}
-
-bool cSkindesignerOsdMenu::SetSkinDesignerDisplayMenu(void) {
- static cPlugin *pSkinDesigner = cPluginManager::GetPlugin("skindesigner");
- if (!pSkinDesigner) {
- return false;
- }
- GetDisplayMenu call;
- bool ok = pSkinDesigner->Service("GetDisplayMenu", &call);
- if (ok && call.displayMenu) {
- sdDisplayMenu = call.displayMenu;
- return true;
- }
- return false;
-}
-
-void cSkindesignerOsdMenu::ClearTokens(void) {
- text = "";
- stringTokens.clear();
- intTokens.clear();
- loopTokens.clear();
-}
-
-void cSkindesignerOsdMenu::AddStringToken(string key, string value) {
- stringTokens.insert(pair<string,string>(key, value));
-}
-
-void cSkindesignerOsdMenu::AddIntToken(string key, int value) {
- intTokens.insert(pair<string,int>(key, value));
-}
-
-void cSkindesignerOsdMenu::AddLoopToken(string loopName, map<string, string> &tokens) {
- map<string, vector<map<string, string> > >::iterator hitLoop = loopTokens.find(loopName);
- if (hitLoop == loopTokens.end()) {
- vector<map<string, string> > tokenVector;
- tokenVector.push_back(tokens);
- loopTokens.insert(pair<string, vector<map<string, string> > >(loopName, tokenVector));
- } else {
- vector<map<string, string> > *tokenVector = &hitLoop->second;
- tokenVector->push_back(tokens);
- }
-}
-
-void cSkindesignerOsdMenu::TextKeyLeft(void) {
- if (!displayText)
- return;
- DisplayMenu()->Scroll(true, true);
-}
-
-void cSkindesignerOsdMenu::TextKeyRight(void) {
- if (!displayText)
- return;
- DisplayMenu()->Scroll(false, true);
-}
-
-void cSkindesignerOsdMenu::TextKeyUp(void) {
- if (!displayText)
- return;
- DisplayMenu()->Scroll(true, false);
-}
-
-void cSkindesignerOsdMenu::TextKeyDown(void) {
- if (!displayText)
- return;
- DisplayMenu()->Scroll(false, false);
-}
-
-void cSkindesignerOsdMenu::Display(void) {
- if (displayText) {
- if (sdDisplayMenu) {
- sdDisplayMenu->SetTitle(Title());
- if (sdDisplayMenu->SetPluginText(&stringTokens, &intTokens, &loopTokens)) {
- sdDisplayMenu->Flush();
- } else {
- DisplayMenu()->Clear();
- DisplayMenu()->SetTitle(Title());
- DisplayMenu()->SetText(text.c_str(), false);
- DisplayMenu()->Flush();
- }
- } else {
- DisplayMenu()->Clear();
- DisplayMenu()->SetTitle(Title());
- DisplayMenu()->SetText(text.c_str(), false);
- DisplayMenu()->Flush();
- }
- return;
- }
- if (sdDisplayMenu) {
- sdDisplayMenu->SetTitle(Title());
- for (cOsdItem *item = First(); item; item = Next(item)) {
- cSkindesignerOsdItem *sdItem = dynamic_cast<cSkindesignerOsdItem*>(item);
- if (sdItem) {
- sdItem->SetDisplayMenu(sdDisplayMenu);
- }
- }
- }
- cOsdMenu::Display();
-}
diff --git a/libskindesigner/skindesignerosdbase.h b/libskindesigner/skindesignerosdbase.h
deleted file mode 100644
index 060ec11..0000000
--- a/libskindesigner/skindesignerosdbase.h
+++ /dev/null
@@ -1,84 +0,0 @@
-#ifndef __SKINDESIGNEROSDBASE_H
-#define __SKINDESIGNEROSDBASE_H
-
-#include <string>
-#include <vector>
-#include <map>
-#include <set>
-#include <sstream>
-#include <vdr/osdbase.h>
-#include <vdr/plugin.h>
-#include "services.h"
-
-class cOsdView;
-
-/**********************************************************************
-* cSkindesignerOsdObject
-**********************************************************************/
-class cSkindesignerOsdObject : public cOsdObject {
-protected:
- string pluginName;
- cPlugin *pSkinDesigner;
- bool InitSkindesignerInterface(string pluginName);
- cOsdView *GetOsdView(int viewID, int subViewID = -1);
-public:
- cSkindesignerOsdObject(void);
- virtual ~cSkindesignerOsdObject();
- virtual void Show(void) {};
-};
-
-/**********************************************************************
-* cSkindesignerOsdItem
-**********************************************************************/
-class cSkindesignerOsdItem : public cOsdItem {
-private:
- cSDDisplayMenu *sdDisplayMenu;
- map < string, string > stringTokens;
- map < string, int > intTokens;
- map < string, vector< map< string, string > > > loopTokens;
-protected:
-public:
- cSkindesignerOsdItem(eOSState State = osUnknown);
- cSkindesignerOsdItem(const char *Text, eOSState State = osUnknown, bool Selectable = true);
- virtual ~cSkindesignerOsdItem();
- virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
- void SetDisplayMenu(cSDDisplayMenu *sdDisplayMenu) { this->sdDisplayMenu = sdDisplayMenu; };
- void AddStringToken(string key, string value);
- void AddIntToken(string key, int value);
- void AddLoopToken(string loopName, map<string, string> &tokens);
-};
-
-/**********************************************************************
-* cSkindesignerOsdMenu
-**********************************************************************/
-class cSkindesignerOsdMenu : public cOsdMenu {
-private:
- bool init;
- bool displayText;
- string pluginName;
- cSDDisplayMenu *sdDisplayMenu;
- string text;
- map < string, string > stringTokens;
- map < string, int > intTokens;
- map < string, vector< map< string, string > > > loopTokens;
- bool SetSkinDesignerDisplayMenu(void);
-protected:
- void ClearTokens(void);
- void SetPluginName(string name) {pluginName = name; };
- void SetPluginMenu(int menu, eMenuType type);
- void SetText(string text) { this->text = text; };
- void AddStringToken(string key, string value);
- void AddIntToken(string key, int value);
- void AddLoopToken(string loopName, map<string, string> &tokens);
- void TextKeyLeft(void);
- void TextKeyRight(void);
- void TextKeyUp(void);
- void TextKeyDown(void);
-public:
- cSkindesignerOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
- virtual ~cSkindesignerOsdMenu();
- virtual void Display(void);
-};
-
-#endif // __SKINDESIGNEROSDBASE_H
-
diff --git a/recmenu.c b/recmenu.c
index 29832e2..3bba818 100644
--- a/recmenu.c
+++ b/recmenu.c
@@ -45,7 +45,7 @@ cRecMenu::~cRecMenu(void) {
* Public Functions
********************************************************************/
-void cRecMenu::Init(cOsdView *osdView) {
+void cRecMenu::Init(skindesignerapi::cOsdView *osdView) {
this->osdView = osdView;
recMenuGrid = osdView->GetViewGrid(vgRecordingMenu);
scrollBar = osdView->GetViewElement(vemScrollbar);
@@ -153,6 +153,7 @@ int cRecMenu::GetNumActive(void) {
return num;
num++;
}
+ return 0;
}
bool cRecMenu::ScrollUp(bool retry) {
diff --git a/recmenu.h b/recmenu.h
index ef7f8b2..0ec317e 100644
--- a/recmenu.h
+++ b/recmenu.h
@@ -2,7 +2,7 @@
#define __TVGUIDE_RECMENU_H
#include <list>
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "recmenuitem.h"
// --- cRecMenu -------------------------------------------------------------
@@ -13,10 +13,10 @@ private:
int menuWidth;
int menuHeight;
int maxMenuHeight;
- cOsdView *osdView;
- cViewElement *back;
- cViewElement *scrollBar;
- cViewGrid *recMenuGrid;
+ skindesignerapi::cOsdView *osdView;
+ skindesignerapi::cViewElement *back;
+ skindesignerapi::cViewElement *scrollBar;
+ skindesignerapi::cViewGrid *recMenuGrid;
cList<cRecMenuItem> menuItems;
cRecMenuItem *start;
cRecMenuItem *stop;
@@ -49,7 +49,7 @@ protected:
public:
cRecMenu(void);
virtual ~cRecMenu(void);
- void Init(cOsdView *osdView);
+ void Init(skindesignerapi::cOsdView *osdView);
void DrawBackground(void);
void Draw(void);
void Hide(void) { hidden = true; osdView->Deactivate(true); };
diff --git a/recmenuitem.c b/recmenuitem.c
index 566de82..1533218 100644
--- a/recmenuitem.c
+++ b/recmenuitem.c
@@ -55,7 +55,7 @@ cRecMenuItemInfo::cRecMenuItemInfo(string line1, int numLines, string line2, str
cRecMenuItemInfo::~cRecMenuItemInfo(void) {
}
-void cRecMenuItemInfo::SetTokens(cViewGrid *menu) {
+void cRecMenuItemInfo::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("info", 1);
menu->AddIntToken("lines", numLines);
@@ -78,7 +78,7 @@ cRecMenuItemButton::cRecMenuItemButton(string text, eRecMenuState action, bool a
cRecMenuItemButton::~cRecMenuItemButton(void) {
}
-void cRecMenuItemButton::SetTokens(cViewGrid *menu) {
+void cRecMenuItemButton::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("button", 1);
menu->AddStringToken("buttontext", text);
@@ -114,7 +114,7 @@ cRecMenuItemButtonYesNo::cRecMenuItemButtonYesNo(string textYes,
cRecMenuItemButtonYesNo::~cRecMenuItemButtonYesNo(void) {
}
-void cRecMenuItemButtonYesNo::SetTokens(cViewGrid *menu) {
+void cRecMenuItemButtonYesNo::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("buttonyesno", 1);
menu->AddIntToken("yes", yesActive);
@@ -174,7 +174,7 @@ cRecMenuItemInt::cRecMenuItemInt(string text,
cRecMenuItemInt::~cRecMenuItemInt(void) {
}
-void cRecMenuItemInt::SetTokens(cViewGrid *menu) {
+void cRecMenuItemInt::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("intselector", 1);
menu->AddIntToken("value", currentVal);
@@ -240,7 +240,7 @@ cRecMenuItemBool::cRecMenuItemBool(string text,
cRecMenuItemBool::~cRecMenuItemBool(void) {
}
-void cRecMenuItemBool::SetTokens(cViewGrid *menu) {
+void cRecMenuItemBool::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("boolselector", 1);
menu->AddIntToken("value", yes);
@@ -288,7 +288,7 @@ cRecMenuItemSelect::cRecMenuItemSelect(string text,
cRecMenuItemSelect::~cRecMenuItemSelect(void) {
}
-void cRecMenuItemSelect::SetTokens(cViewGrid *menu) {
+void cRecMenuItemSelect::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("stringselector", 1);
menu->AddStringToken("text", text);
@@ -296,7 +296,6 @@ void cRecMenuItemSelect::SetTokens(cViewGrid *menu) {
}
eRecMenuState cRecMenuItemSelect::ProcessKey(eKeys Key) {
- int oldValue = currentVal;
switch (Key & ~k_Repeat) {
case kLeft:
currentVal--;
@@ -501,7 +500,7 @@ void cRecMenuItemText::SetText(void) {
}
}
-void cRecMenuItemText::SetTokens(cViewGrid *menu) {
+void cRecMenuItemText::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("textinput", 1);
menu->AddIntToken("editmode", InEditMode());
@@ -712,7 +711,7 @@ cRecMenuItemTime::cRecMenuItemTime(string text,
cRecMenuItemTime::~cRecMenuItemTime(void) {
}
-void cRecMenuItemTime::SetTokens(cViewGrid *menu) {
+void cRecMenuItemTime::SetTokens(skindesignerapi::cViewGrid *menu) {
char buf[10];
switch (pos) {
case 1: snprintf(buf, sizeof(buf), "%01d-:--", hh / 10); break;
@@ -821,7 +820,7 @@ cRecMenuItemDay::cRecMenuItemDay(string text,
cRecMenuItemDay::~cRecMenuItemDay(void) {
}
-void cRecMenuItemDay::SetTokens(cViewGrid *menu) {
+void cRecMenuItemDay::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("dayselector", 1);
menu->AddStringToken("text", text);
@@ -875,7 +874,7 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(string text,
cRecMenuItemChannelChooser::~cRecMenuItemChannelChooser(void) {
}
-void cRecMenuItemChannelChooser::SetTokens(cViewGrid *menu) {
+void cRecMenuItemChannelChooser::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("channelselector", 1);
menu->AddStringToken("text", text);
@@ -986,7 +985,7 @@ cRecMenuItemDayChooser::cRecMenuItemDayChooser(string text,
cRecMenuItemDayChooser::~cRecMenuItemDayChooser(void) {
}
-void cRecMenuItemDayChooser::SetTokens(cViewGrid *menu) {
+void cRecMenuItemDayChooser::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("weekdayselector", 1);
menu->AddStringToken("text", text);
@@ -1066,7 +1065,7 @@ cRecMenuItemSelectDirectory::cRecMenuItemSelectDirectory(string text,
this->currentVal = GetInitial();
}
-void cRecMenuItemSelectDirectory::SetTokens(cViewGrid *menu) {
+void cRecMenuItemSelectDirectory::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("directoryselector", 1);
menu->AddStringToken("text", text);
@@ -1074,7 +1073,6 @@ void cRecMenuItemSelectDirectory::SetTokens(cViewGrid *menu) {
}
eRecMenuState cRecMenuItemSelectDirectory::ProcessKey(eKeys Key) {
- int oldValue = currentVal;
switch (Key & ~k_Repeat) {
case kLeft:
currentVal--;
@@ -1135,7 +1133,7 @@ cRecMenuItemTimerConflictHeader::cRecMenuItemTimerConflictHeader(time_t conflict
cRecMenuItemTimerConflictHeader::~cRecMenuItemTimerConflictHeader(void) {
}
-void cRecMenuItemTimerConflictHeader::SetTokens(cViewGrid *menu) {
+void cRecMenuItemTimerConflictHeader::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("timerconflictheader", 1);
menu->AddStringToken("text", tr("Timer Conflict"));
@@ -1179,7 +1177,7 @@ cRecMenuItemTimer::cRecMenuItemTimer(const cTimer *timer,
cRecMenuItemTimer::~cRecMenuItemTimer(void) {
}
-void cRecMenuItemTimer::SetTokens(cViewGrid *menu) {
+void cRecMenuItemTimer::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("timerconflict", 1);
@@ -1273,7 +1271,7 @@ cRecMenuItemEvent::cRecMenuItemEvent(const cEvent *event,
cRecMenuItemEvent::~cRecMenuItemEvent(void) {
}
-void cRecMenuItemEvent::SetTokens(cViewGrid *menu) {
+void cRecMenuItemEvent::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("event", 1);
@@ -1299,7 +1297,6 @@ void cRecMenuItemEvent::SetTokens(cViewGrid *menu) {
}
eRecMenuState cRecMenuItemEvent::ProcessKey(eKeys Key) {
- bool consumed = false;
switch (Key & ~k_Repeat) {
case kOk:
return action;
@@ -1322,7 +1319,7 @@ cRecMenuItemRecording::cRecMenuItemRecording(cRecording *recording, bool active)
this->active = active;
}
-void cRecMenuItemRecording::SetTokens(cViewGrid *menu) {
+void cRecMenuItemRecording::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("recording", 1);
if (!recording)
@@ -1372,7 +1369,7 @@ cRecMenuItemSearchTimer::cRecMenuItemSearchTimer(cTVGuideSearchTimer timer,
cRecMenuItemSearchTimer::~cRecMenuItemSearchTimer(void) {
}
-void cRecMenuItemSearchTimer::SetTokens(cViewGrid *menu) {
+void cRecMenuItemSearchTimer::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("searchtimer", 1);
menu->AddIntToken("timeractive", timer.Active());
@@ -1426,7 +1423,7 @@ cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day) {
cRecMenuItemTimelineHeader::~cRecMenuItemTimelineHeader(void) {
}
-void cRecMenuItemTimelineHeader::SetTokens(cViewGrid *menu) {
+void cRecMenuItemTimelineHeader::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("timelineheader", 1);
string daydate = *DateString(day);
@@ -1487,7 +1484,7 @@ cRecMenuItemTimelineTimer::cRecMenuItemTimelineTimer(cTimer *timer, time_t start
cRecMenuItemTimelineTimer::~cRecMenuItemTimelineTimer(void) {
}
-void cRecMenuItemTimelineTimer::SetTokens(cViewGrid *menu) {
+void cRecMenuItemTimelineTimer::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("timelinetimer", 1);
@@ -1530,7 +1527,7 @@ cRecMenuItemFavorite::cRecMenuItemFavorite(cTVGuideSearchTimer favorite,
this->active = active;
}
-void cRecMenuItemFavorite::SetTokens(cViewGrid *menu) {
+void cRecMenuItemFavorite::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("favorite", 1);
menu->AddStringToken("favdesc", favorite.SearchString());
@@ -1555,7 +1552,7 @@ cRecMenuItemFavoriteStatic::cRecMenuItemFavoriteStatic(string text, eRecMenuStat
this->active = active;
}
-void cRecMenuItemFavoriteStatic::SetTokens(cViewGrid *menu) {
+void cRecMenuItemFavoriteStatic::SetTokens(skindesignerapi::cViewGrid *menu) {
menu->ClearTokens();
menu->AddIntToken("favorite", 1);
menu->AddStringToken("favdesc", text);
diff --git a/recmenuitem.h b/recmenuitem.h
index 9ea6d19..f1f7e69 100644
--- a/recmenuitem.h
+++ b/recmenuitem.h
@@ -9,7 +9,7 @@ using namespace std;
#include <sstream>
#include <vdr/plugin.h>
#include <vdr/tools.h>
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "searchtimer.h"
enum eRecMenuState {
@@ -104,11 +104,11 @@ public:
long Id(void) { return id; };
bool Selectable(void) { return selectable; }
bool IsNew(void);
- bool SetNew(void) { init = true; };
+ void SetNew(void) { init = true; };
bool Active(void) { return active; }
int GetHeight(void) { return height; };
string GetText(void) { return text; };
- virtual void SetTokens(cViewGrid *menu) {};
+ virtual void SetTokens(skindesignerapi::cViewGrid *menu) {};
virtual eRecMenuState ProcessKey(eKeys Key) { return rmsNotConsumed; };
};
@@ -124,7 +124,7 @@ public:
cRecMenuItemInfo(string line1, int numLines = 1, string line2 = "", string line3 = "", string line4 = "");
virtual ~cRecMenuItemInfo(void);
string GetText(void) { return text; };
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
};
// --- cRecMenuItemButton -------------------------------------------------------
@@ -135,7 +135,7 @@ public:
cRecMenuItemButton(string text, eRecMenuState action, bool active);
virtual ~cRecMenuItemButton(void);
string GetText(void) { return text; };
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -153,7 +153,7 @@ public:
eRecMenuState actionNo,
bool active);
virtual ~cRecMenuItemButtonYesNo(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -174,7 +174,7 @@ public:
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
virtual ~cRecMenuItemInt(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -190,7 +190,7 @@ public:
bool *callback = NULL,
eRecMenuState action = rmsNotConsumed);
virtual ~cRecMenuItemBool(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -209,7 +209,7 @@ public:
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
virtual ~cRecMenuItemSelect(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -247,7 +247,7 @@ public:
bool active = false,
char *callback = NULL);
virtual ~cRecMenuItemText(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -267,7 +267,7 @@ public:
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
virtual ~cRecMenuItemTime(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -283,7 +283,7 @@ public:
time_t *callback = NULL,
eRecMenuState action = rmsNotConsumed);
virtual ~cRecMenuItemDay(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -302,7 +302,7 @@ public:
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
virtual ~cRecMenuItemChannelChooser(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -320,7 +320,7 @@ public:
bool active = false,
int *callback = NULL);
virtual ~cRecMenuItemDayChooser(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -343,7 +343,7 @@ public:
eRecMenuState action = rmsNotConsumed,
bool isSearchTimer = false);
virtual ~cRecMenuItemSelectDirectory(void) {};
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -359,7 +359,7 @@ public:
time_t conflictStop,
time_t overlapStart,
time_t overlapStop);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
virtual ~cRecMenuItemTimerConflictHeader(void);
};
@@ -387,7 +387,7 @@ public:
time_t overlapStop,
bool active);
virtual ~cRecMenuItemTimer(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -403,7 +403,7 @@ public:
eRecMenuState action2,
bool active);
virtual ~cRecMenuItemEvent(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
const cEvent *GetEvent(void) { return event; };
};
@@ -415,7 +415,7 @@ private:
public:
cRecMenuItemRecording(cRecording *recording, bool active);
virtual ~cRecMenuItemRecording(void) {};
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
};
// --- cRecMenuItemSearchTimer -------------------------------------------------------
@@ -434,7 +434,7 @@ public:
bool active);
virtual ~cRecMenuItemSearchTimer(void);
cTVGuideSearchTimer GetTimer(void) { return timer; };
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -446,7 +446,7 @@ private:
public:
cRecMenuItemTimelineHeader(time_t day);
virtual ~cRecMenuItemTimelineHeader(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
void SetDay(time_t day) { this->day = day; };
void SetCurrentTimer(cTimer *timer) { this->timer = timer; };
void UnsetCurrentTimer(void) { timer = NULL; };
@@ -461,7 +461,7 @@ private:
public:
cRecMenuItemTimelineTimer(cTimer *timer, time_t start, time_t stop, bool active);
virtual ~cRecMenuItemTimelineTimer(void);
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
cTimer *GetTimer(void);
eRecMenuState ProcessKey(eKeys Key);
};
@@ -476,7 +476,7 @@ public:
eRecMenuState action1,
bool active);
virtual ~cRecMenuItemFavorite(void) {};
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
cTVGuideSearchTimer GetFavorite(void) { return favorite; };
eRecMenuState ProcessKey(eKeys Key);
};
@@ -488,7 +488,7 @@ private:
public:
cRecMenuItemFavoriteStatic(string text, eRecMenuState action, bool active);
virtual ~cRecMenuItemFavoriteStatic(void) {};
- void SetTokens(cViewGrid *menu);
+ void SetTokens(skindesignerapi::cViewGrid *menu);
eRecMenuState ProcessKey(eKeys Key);
};
diff --git a/recmenus.c b/recmenus.c
index d20250a..0216b71 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -100,7 +100,7 @@ cRecMenuAskFolder::cRecMenuAskFolder(const cEvent *event, eRecMenuState nextActi
string cRecMenuAskFolder::GetFolder(void) {
std::string folder = "";
int folderActive = GetNumActive();
- if (folderActive > 0 && folderActive < folders.size() + 1)
+ if (folderActive > 0 && folderActive < (int)folders.size() + 1)
folder = folders[folderActive - 1];
return folder;
}
@@ -460,7 +460,7 @@ cRecMenuSearchTimerTemplates::cRecMenuSearchTimerTemplates(cTVGuideSearchTimer s
TVGuideEPGSearchTemplate cRecMenuSearchTimerTemplates::GetTemplate(void) {
TVGuideEPGSearchTemplate templ;
int tmplActive = GetNumActive() - 1;
- if (tmplActive >= 0 && tmplActive < templates.size())
+ if (tmplActive >= 0 && tmplActive < (int)templates.size())
templ = templates[tmplActive];
return templ;
}
@@ -698,7 +698,7 @@ cRecMenuSearchTimerResults::cRecMenuSearchTimerResults(string searchString, cons
string line3 = *cString::sprintf("%s \"%s\"", message3.c_str(), templateName.c_str());
infoItem = new cRecMenuItemInfo(line1, 3, line2, line3);
} else {
- string line1 = *cString::sprintf("%d %s:", numResults, (numResults>1)?(message1.c_str()):(message2.c_str()), searchString.c_str());
+ string line1 = *cString::sprintf("%d %s:", numResults, (numResults>1)?(message1.c_str()):(message2.c_str()));
string line2 = *cString::sprintf("\"%s\"", searchString.c_str());
infoItem = new cRecMenuItemInfo(line1, 2, line2);
}
diff --git a/recmenuview.c b/recmenuview.c
index bf34ca0..30522b5 100644
--- a/recmenuview.c
+++ b/recmenuview.c
@@ -31,7 +31,7 @@ cRecMenuView::~cRecMenuView() {
delete recMenuViewBuffer2;
}
-void cRecMenuView::Init(cOsdView *recMenuView, cOsdView *recMenuViewBuffer, cOsdView *recMenuViewBuffer2) {
+void cRecMenuView::Init(skindesignerapi::cOsdView *recMenuView, skindesignerapi::cOsdView *recMenuViewBuffer, skindesignerapi::cOsdView *recMenuViewBuffer2) {
active = true;
this->recMenuView = recMenuView;
this->recMenuViewBuffer = recMenuViewBuffer;
diff --git a/recmenuview.h b/recmenuview.h
index 3cfb1d7..81cd543 100644
--- a/recmenuview.h
+++ b/recmenuview.h
@@ -2,16 +2,16 @@
#define __TVGUIDE_RECMENUVIEW_H
#include "config.h"
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "recmanager.h"
#include "recmenus.h"
class cRecMenuView {
private:
bool active;
- cOsdView *recMenuView;
- cOsdView *recMenuViewBuffer;
- cOsdView *recMenuViewBuffer2;
+ skindesignerapi::cOsdView *recMenuView;
+ skindesignerapi::cOsdView *recMenuViewBuffer;
+ skindesignerapi::cOsdView *recMenuViewBuffer2;
const cEvent *event;
const cEvent *displayEvent;
cRecManager *recManager;
@@ -29,7 +29,7 @@ private:
public:
cRecMenuView(void);
virtual ~cRecMenuView(void);
- void Init(cOsdView *recMenuView, cOsdView *recMenuViewBuffer, cOsdView *recMenuViewBuffer2);
+ void Init(skindesignerapi::cOsdView *recMenuView, skindesignerapi::cOsdView *recMenuViewBuffer, skindesignerapi::cOsdView *recMenuViewBuffer2);
void DisplayRecMenu(const cEvent *event);
void DisplayFavorites(void);
void Close(void);
diff --git a/timeline.c b/timeline.c
index 143a6a6..d48cb4b 100644
--- a/timeline.c
+++ b/timeline.c
@@ -27,7 +27,7 @@ bool cTimelineElement::IsFullHour(void) {
// --- cTimeline -------------------------------------------------------------
-cTimeline::cTimeline(cViewGrid *timelineGrid, cViewElement *timelineDate, cViewElement *timeIndicator, cTimeManager *timeManager) {
+cTimeline::cTimeline(skindesignerapi::cViewGrid *timelineGrid, skindesignerapi::cViewElement *timelineDate, skindesignerapi::cViewElement *timeIndicator, cTimeManager *timeManager) {
this->timelineGrid = timelineGrid;
this->timelineDate = timelineDate;
this->timeIndicator = timeIndicator;
@@ -76,8 +76,6 @@ void cTimeline::ScrollForward(int stepMinutes) {
}
void cTimeline::ScrollBack(int stepMinutes) {
- time_t startTime = timeManager->GetStart();
- time_t endTime = timeManager->GetEnd();
int numSteps = stepMinutes / 30;
for (int i=0; i<numSteps; i++) {
cTimelineElement *e = grids.Last();
diff --git a/timeline.h b/timeline.h
index c6914d2..7675a6a 100644
--- a/timeline.h
+++ b/timeline.h
@@ -3,7 +3,7 @@
#include <set>
#include <vdr/tools.h>
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "config.h"
#include "timemanager.h"
@@ -26,9 +26,9 @@ public:
class cTimeline {
private:
- cViewGrid *timelineGrid;
- cViewElement *timelineDate;
- cViewElement *timeIndicator;
+ skindesignerapi::cViewGrid *timelineGrid;
+ skindesignerapi::cViewElement *timelineDate;
+ skindesignerapi::cViewElement *timeIndicator;
cTimeManager *timeManager;
cList<cTimelineElement> grids;
int steps;
@@ -38,7 +38,7 @@ private:
void DrawDate(void);
void DrawTimeIndicator(void);
public:
- cTimeline(cViewGrid *timelineGrid, cViewElement *timelineDate, cViewElement *timeIndicator, cTimeManager *timeManager);
+ cTimeline(skindesignerapi::cViewGrid *timelineGrid, skindesignerapi::cViewElement *timelineDate, skindesignerapi::cViewElement *timeIndicator, cTimeManager *timeManager);
virtual ~cTimeline(void);
void Init(void);
void Clear(void);
diff --git a/timerconflict.c b/timerconflict.c
index 9f01427..a89dc2c 100644
--- a/timerconflict.c
+++ b/timerconflict.c
@@ -71,7 +71,7 @@ void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) {
splitstring s3(flds2[2].c_str());
std::vector<std::string> flds3 = s3.split('#');
std::vector<int> timerIDs;
- for (int k = 0; k < flds3.size(); k++) {
+ for (int k = 0; k < (int)flds3.size(); k++) {
timerIDs.push_back(atoi(flds3[k].c_str()) - 1);
}
conflict->timerIDs = timerIDs;
@@ -80,8 +80,6 @@ void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) {
void cTVGuideTimerConflicts::CalculateConflicts(void) {
numConflicts = conflicts.size();
- time_t startTime = 0;
- time_t endTime = 0;
for (int i=0; i < numConflicts; i++) {
cTimeInterval *unionSet = NULL;
int numTimers = conflicts[i]->timerIDs.size();
diff --git a/tvguideng.c b/tvguideng.c
index 3d03fec..933d196 100644
--- a/tvguideng.c
+++ b/tvguideng.c
@@ -7,7 +7,7 @@
*/
#include <vdr/plugin.h>
-#include "libskindesigner/services.h"
+#include <libskindesignerapi/skindesignerapi.h>
#define DEFINE_CONFIG 1
#include "config.h"
#include "setup.h"
@@ -62,48 +62,45 @@ bool cPluginTvguideng::Initialize(void) {
}
bool cPluginTvguideng::Start(void) {
- RegisterPlugin reg;
- reg.name = "tvguideng";
- reg.SetView(viRootView, "root.xml");
- reg.SetViewElement(viRootView, verBackgroundHor, "background_hor");
- reg.SetViewElement(viRootView, verBackgroundVer, "background_ver");
- reg.SetViewElement(viRootView, verHeaderHor, "header_hor");
- reg.SetViewElement(viRootView, verHeaderVer, "header_ver");
- reg.SetViewElement(viRootView, verTimeHor, "time_hor");
- reg.SetViewElement(viRootView, verTimeVer, "time_ver");
- reg.SetViewElement(viRootView, verFooterHor, "footer_hor");
- reg.SetViewElement(viRootView, verFooterVer, "footer_ver");
- reg.SetViewElement(viRootView, verDateTimelineHor, "datetimeline_hor");
- reg.SetViewElement(viRootView, verDateTimelineVer, "datetimeline_ver");
- reg.SetViewElement(viRootView, verTimeIndicatorHor, "timeindicator_hor");
- reg.SetViewElement(viRootView, verTimeIndicatorVer, "timeindicator_ver");
- reg.SetViewElement(viRootView, verChannelJump, "channeljump");
- reg.SetViewGrid(viRootView, vgChannelsHor, "channels_hor");
- reg.SetViewGrid(viRootView, vgChannelsVer, "channels_ver");
- reg.SetViewGrid(viRootView, vgSchedulesHor, "schedules_hor");
- reg.SetViewGrid(viRootView, vgSchedulesVer, "schedules_ver");
- reg.SetViewGrid(viRootView, vgTimelineHor, "timeline_hor");
- reg.SetViewGrid(viRootView, vgTimelineVer, "timeline_ver");
- reg.SetViewGrid(viRootView, vgChannelGroupsHor, "channelgroups_hor");
- reg.SetViewGrid(viRootView, vgChannelGroupsVer, "channelgroups_ver");
+ skindesignerapi::cPluginStructure plugStruct;
+ plugStruct.name = "tvguideng";
+ plugStruct.SetView(viRootView, "root.xml");
+ plugStruct.SetViewElement(viRootView, verBackgroundHor, "background_hor");
+ plugStruct.SetViewElement(viRootView, verBackgroundVer, "background_ver");
+ plugStruct.SetViewElement(viRootView, verHeaderHor, "header_hor");
+ plugStruct.SetViewElement(viRootView, verHeaderVer, "header_ver");
+ plugStruct.SetViewElement(viRootView, verTimeHor, "time_hor");
+ plugStruct.SetViewElement(viRootView, verTimeVer, "time_ver");
+ plugStruct.SetViewElement(viRootView, verFooterHor, "footer_hor");
+ plugStruct.SetViewElement(viRootView, verFooterVer, "footer_ver");
+ plugStruct.SetViewElement(viRootView, verDateTimelineHor, "datetimeline_hor");
+ plugStruct.SetViewElement(viRootView, verDateTimelineVer, "datetimeline_ver");
+ plugStruct.SetViewElement(viRootView, verTimeIndicatorHor, "timeindicator_hor");
+ plugStruct.SetViewElement(viRootView, verTimeIndicatorVer, "timeindicator_ver");
+ plugStruct.SetViewElement(viRootView, verChannelJump, "channeljump");
+ plugStruct.SetViewGrid(viRootView, vgChannelsHor, "channels_hor");
+ plugStruct.SetViewGrid(viRootView, vgChannelsVer, "channels_ver");
+ plugStruct.SetViewGrid(viRootView, vgSchedulesHor, "schedules_hor");
+ plugStruct.SetViewGrid(viRootView, vgSchedulesVer, "schedules_ver");
+ plugStruct.SetViewGrid(viRootView, vgTimelineHor, "timeline_hor");
+ plugStruct.SetViewGrid(viRootView, vgTimelineVer, "timeline_ver");
+ plugStruct.SetViewGrid(viRootView, vgChannelGroupsHor, "channelgroups_hor");
+ plugStruct.SetViewGrid(viRootView, vgChannelGroupsVer, "channelgroups_ver");
//Detail View
- reg.SetSubView(viRootView, viDetailView, "detail.xml");
- reg.SetViewElement(viDetailView, vedBackground, "background");
- reg.SetViewElement(viDetailView, vedHeader, "header");
- reg.SetViewElement(viDetailView, vedFooter, "footer");
- reg.SetViewElement(viDetailView, vedTime, "time");
+ plugStruct.SetSubView(viRootView, viDetailView, "detail.xml");
+ plugStruct.SetViewElement(viDetailView, vedBackground, "background");
+ plugStruct.SetViewElement(viDetailView, vedHeader, "header");
+ plugStruct.SetViewElement(viDetailView, vedFooter, "footer");
+ plugStruct.SetViewElement(viDetailView, vedTime, "time");
//Search & Recording Menus
- reg.SetSubView(viRootView, viRecMenu, "recmenu.xml");
- reg.SetViewElement(viRecMenu, vemBackground, "background");
- reg.SetViewElement(viRecMenu, vemScrollbar, "scrollbar");
- reg.SetViewGrid(viRecMenu, vgRecordingMenu, "recmenu");
- static cPlugin *pSkinDesigner = cPluginManager::GetPlugin("skindesigner");
- if (pSkinDesigner) {
- pSkinDesigner->Service("RegisterPlugin", &reg);
- } else {
+ plugStruct.SetSubView(viRootView, viRecMenu, "recmenu.xml");
+ plugStruct.SetViewElement(viRecMenu, vemBackground, "background");
+ plugStruct.SetViewElement(viRecMenu, vemScrollbar, "scrollbar");
+ plugStruct.SetViewGrid(viRecMenu, vgRecordingMenu, "recmenu");
+
+ if (!skindesignerapi::SkindesignerAPI::RegisterPlugin(&plugStruct)) {
esyslog("tvguideng: skindesigner not available");
}
-
return true;
}
diff --git a/tvguidengosd.c b/tvguidengosd.c
index 36a738e..da5c8b4 100644
--- a/tvguidengosd.c
+++ b/tvguidengosd.c
@@ -31,7 +31,7 @@ void cTVGuideOSD::Show(void) {
esyslog("tvguideng: skindesigner not available");
}
- cOsdView *rootView = GetOsdView(viRootView);
+ skindesignerapi::cOsdView *rootView = GetOsdView(viRootView);
if (!rootView) {
esyslog("tvguideng: used skindesigner skin does not support tvguideng");
return;
@@ -432,7 +432,7 @@ void cTVGuideOSD::DetailView(const cEvent *e) {
epgGrid->Deactivate(true);
if (recMenuView->Active())
recMenuView->Hide(true);
- cOsdView *dV = GetOsdView(viRootView, viDetailView);
+ skindesignerapi::cOsdView *dV = GetOsdView(viRootView, viDetailView);
detailView = new cDetailView(dV, e);
detailView->Draw();
detailView->DrawTime();
@@ -455,9 +455,9 @@ void cTVGuideOSD::KeyRed(void) {
if (!e)
return;
epgGrid->Deactivate(false);
- cOsdView *recView = GetOsdView(viRootView, viRecMenu);
- cOsdView *recViewBuffer = GetOsdView(viRootView, viRecMenu);
- cOsdView *recViewBuffer2 = GetOsdView(viRootView, viRecMenu);
+ skindesignerapi::cOsdView *recView = GetOsdView(viRootView, viRecMenu);
+ skindesignerapi::cOsdView *recViewBuffer = GetOsdView(viRootView, viRecMenu);
+ skindesignerapi::cOsdView *recViewBuffer2 = GetOsdView(viRootView, viRecMenu);
recMenuView->Init(recView, recViewBuffer, recViewBuffer2);
recMenuView->DisplayRecMenu(e);
recMenuView->Flush();
@@ -465,9 +465,9 @@ void cTVGuideOSD::KeyRed(void) {
void cTVGuideOSD::Favorites(void) {
epgGrid->Deactivate(false);
- cOsdView *recView = GetOsdView(viRootView, viRecMenu);
- cOsdView *recViewBuffer = GetOsdView(viRootView, viRecMenu);
- cOsdView *recViewBuffer2 = GetOsdView(viRootView, viRecMenu);
+ skindesignerapi::cOsdView *recView = GetOsdView(viRootView, viRecMenu);
+ skindesignerapi::cOsdView *recViewBuffer = GetOsdView(viRootView, viRecMenu);
+ skindesignerapi::cOsdView *recViewBuffer2 = GetOsdView(viRootView, viRecMenu);
recMenuView->Init(recView, recViewBuffer, recViewBuffer2);
recMenuView->DisplayFavorites();
recMenuView->Flush();
diff --git a/tvguidengosd.h b/tvguidengosd.h
index aaf6082..af6fb1d 100644
--- a/tvguidengosd.h
+++ b/tvguidengosd.h
@@ -3,8 +3,8 @@
#include <vdr/osdbase.h>
#include <vdr/plugin.h>
-#include "libskindesigner/skindesignerosdbase.h"
-#include "libskindesigner/osdelements.h"
+#include <libskindesignerapi/skindesignerapi.h>
+#include <libskindesignerapi/skindesignerosdbase.h>
#include "config.h"
#include "timemanager.h"
#include "epggrid.h"
@@ -58,7 +58,7 @@ enum eViewElementsRecMenu {
vemScrollbar
};
-class cTVGuideOSD : public cSkindesignerOsdObject {
+class cTVGuideOSD : public skindesignerapi::cSkindesignerOsdObject {
private:
cTimeManager *timeManager;
cEpgGrid *epgGrid;