diff --git a/HISTORY b/HISTORY index fe62c28..e4b78ca 100644 --- a/HISTORY +++ b/HISTORY @@ -202,4 +202,9 @@ Version 0.2.2 - added replay onpause view in blackhole skin - implemented SetTitle() in displayreplay - fixed header icon for plugin menus +- added function "drawtextvertical" +- implemented advanced plugin interface +- added tvguideng templates for all skins + +Version 0.3.0 diff --git a/Makefile b/Makefile index 686a2d5..2533983 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,7 @@ OBJS = $(PLUGIN).o \ displaytracks.o \ displayvolume.o \ displayplugin.o \ + libcore/cairoimage.o \ libcore/pixmapcontainer.o \ libcore/fontmanager.o \ libcore/imagecache.o \ diff --git a/config.c b/config.c index b667876..0797991 100644 --- a/config.c +++ b/config.c @@ -293,10 +293,12 @@ void cDesignerConfig::AddPluginMenus(string name, map< int, string > menus) { } void cDesignerConfig::AddPluginViews(string name, - map< int, string > views, + map< int, string > views, + multimap< int, pair > subViews, map< int, map > viewElements, map< int, map > viewGrids) { pluginViews.insert(pair< string, map < int, string > >(name, views)); + pluginSubViews.insert(pair< string, multimap< int, pair > >(name, subViews)); pluginViewElements.insert(pair< string, map< int, map > >(name, viewElements)); pluginViewGrids.insert(pair< string, map< int, map > >(name, viewGrids)); } @@ -327,6 +329,25 @@ map *cDesignerConfig::GetPluginViews(string &name) { return views; } +map cDesignerConfig::GetPluginSubViews(string name, int viewID) { + map subViews; + + map < string, multimap< int, pair > >::iterator hit = pluginSubViews.find(name); + if (hit == pluginSubViews.end()) + return subViews; + + multimap< int, pair > subs = hit->second; + + pair < multimap< int, pair >::iterator, multimap< int, pair >::iterator> viewSubViews; + viewSubViews = subs.equal_range(viewID); + + for (multimap< int, pair >::iterator it=viewSubViews.first; it!=viewSubViews.second; ++it) { + pair subViewFound = it->second; + subViews.insert(pair(subViewFound.first, subViewFound.second)); + } + return subViews; +} + int cDesignerConfig::GetPluginViewElementID(string pluginName, string viewElementName, int viewID) { map < string, map< int, map > >::iterator hit = pluginViewElements.find(pluginName); if (hit == pluginViewElements.end()) diff --git a/config.h b/config.h index a3613f3..41f900e 100644 --- a/config.h +++ b/config.h @@ -32,6 +32,7 @@ private: map < string, map < int, string > >::iterator plugMenuIt; map < string, map < int, string > > pluginViews; map < string, map < int, string > >::iterator plugViewIt; + map < string, multimap< int, pair > > pluginSubViews; map < string, map< int, map > > pluginViewElements; map < string, map< int, map > > pluginViewGrids; map < string, cSkinSetup* > skinSetups; @@ -72,11 +73,12 @@ public: bool OsdLanguageChanged(void); cString GetSkinRessourcePath(void); void AddPluginMenus(string name, map< int, string > menus); - void AddPluginViews(string name, map< int, string > views, map< int, map > viewElements, map< int, map > viewGrids); + void AddPluginViews(string name, map< int, string > views, multimap< int, pair > subViews, map< int, map > viewElements, map< int, map > viewGrids); void InitPluginMenuIterator(void); map *GetPluginTemplates(string &name); void InitPluginViewIterator(void); map *GetPluginViews(string &name); + map GetPluginSubViews(string name, int viewID); int GetPluginViewElementID(string pluginName, string viewElementName, int viewID); int GetPluginViewGridID(string pluginName, string viewGridName, int viewID); cString skinPath; diff --git a/designer.c b/designer.c index 45797d8..93b5b34 100644 --- a/designer.c +++ b/designer.c @@ -107,7 +107,7 @@ cSkinDisplayMessage *cSkinDesigner::DisplayMessage(void) { return displayMessage; } -cSkinDisplayPlugin *cSkinDesigner::DisplayPlugin(string pluginName, int viewID) { +cSkinDisplayPlugin *cSkinDesigner::DisplayPlugin(string pluginName, int viewID, int subViewID) { currentMenu = NULL; if (useBackupSkin) return NULL; @@ -119,7 +119,7 @@ cSkinDisplayPlugin *cSkinDesigner::DisplayPlugin(string pluginName, int viewID) map ::iterator hit2 = (hit->second).find(viewID); if (hit2 == (hit->second).end()) return NULL; - return new cSkinDisplayPlugin(hit2->second); + return new cSkinDisplayPlugin(hit2->second, subViewID); } @@ -344,15 +344,23 @@ bool cSkinDesigner::LoadTemplates(void) { string plugName; while ( plugViews = config.GetPluginViews(plugName) ) { for (map ::iterator v = plugViews->begin(); v != plugViews->end(); v++) { + int viewID = v->first; stringstream templateName; templateName << "plug-" << plugName << "-" << v->second.c_str(); - cTemplate *plgTemplate = new cTemplate(vtDisplayPlugin, plugName, v->first); + cTemplate *plgTemplate = new cTemplate(vtDisplayPlugin, plugName, viewID); plgTemplate->SetGlobals(globals); ok = plgTemplate->ReadFromXML(templateName.str()); if (!ok) { esyslog("skindesigner: error reading plugin %s template", plugName.c_str()); - DeleteTemplates(); - return false; + delete plgTemplate; + pluginTemplates.erase(plugName); + break; + } + ok = plgTemplate->SetSubViews(plugName, viewID); + if (!ok) { + delete plgTemplate; + pluginTemplates.erase(plugName); + break; } plgTemplate->Translate(); map< string, map >::iterator hit = pluginTemplates.find(plugName); diff --git a/designer.h b/designer.h index 20abcb6..8541ad7 100644 --- a/designer.h +++ b/designer.h @@ -43,7 +43,7 @@ public: virtual cSkinDisplayVolume *DisplayVolume(void); virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks); virtual cSkinDisplayMessage *DisplayMessage(void); - virtual cSkinDisplayPlugin *DisplayPlugin(string pluginName, int viewID); + virtual cSkinDisplayPlugin *DisplayPlugin(string pluginName, int viewID, int subViewID); void ActivateBackupSkin(void) { useBackupSkin = true; }; void Reload(void); void ListAvailableFonts(void); diff --git a/displaymenu.c b/displaymenu.c index d64e920..9cfe2b7 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -11,7 +11,7 @@ cSDDisplayMenu::cSDDisplayMenu(cTemplate *menuTemplate) { pluginMenuType = mtUnknown; if (!menuTemplate) { doOutput = false; - esyslog("skindesigner: displayMenu no valid template - aborting"); + dsyslog("skindesigner: displayMenu no valid template - aborting"); return; } rootView = new cDisplayMenuRootView(menuTemplate->GetRootView()); @@ -19,7 +19,6 @@ cSDDisplayMenu::cSDDisplayMenu(cTemplate *menuTemplate) { doOutput = false; return; } - esyslog("skindesigner: menu opened"); } cSDDisplayMenu::~cSDDisplayMenu() { @@ -27,7 +26,6 @@ cSDDisplayMenu::~cSDDisplayMenu() { delete rootView; if (textAreaFont) delete textAreaFont; - esyslog("skindesigner: menu closed"); } void cSDDisplayMenu::Scroll(bool Up, bool Page) { @@ -186,7 +184,6 @@ bool cSDDisplayMenu::SetItemPlugin(map *stringTokens, mapGetListView(); diff --git a/displayplugin.c b/displayplugin.c index ad5965f..28085a9 100644 --- a/displayplugin.c +++ b/displayplugin.c @@ -1,6 +1,7 @@ +#include "config.h" #include "displayplugin.h" -cSkinDisplayPlugin::cSkinDisplayPlugin(cTemplate *pluginTemplate) { +cSkinDisplayPlugin::cSkinDisplayPlugin(cTemplate *pluginTemplate, int subViewID) { if (!pluginTemplate) { doOutput = false; return; @@ -8,8 +9,17 @@ cSkinDisplayPlugin::cSkinDisplayPlugin(cTemplate *pluginTemplate) { doOutput = true; } initial = true; - pluginView = new cDisplayPluginView(pluginTemplate->GetRootView()); - if (!pluginView->createOsd()) { + if (subViewID > -1) { + cTemplateView *subView = pluginTemplate->GetRootView()->GetSubView((eSubView)subViewID); + if (!subView) { + doOutput = false; + return; + } + pluginView = new cDisplayPluginView(subView, false); + } else { + pluginView = new cDisplayPluginView(pluginTemplate->GetRootView(), true); + } + if (!pluginView->createOsd() && subViewID < 0) { doOutput = false; return; } @@ -22,6 +32,35 @@ cSkinDisplayPlugin::~cSkinDisplayPlugin(void) { } } +void cSkinDisplayPlugin::Deactivate(bool hide) { + if (!doOutput) { + return; + } + pluginView->Deactivate(hide); +} + +void cSkinDisplayPlugin::Activate(void) { + if (!doOutput) { + return; + } + pluginView->Activate(); +} + + +void cSkinDisplayPlugin::ClearViewElement(int id) { + if (!doOutput) { + return; + } + pluginView->CleanViewElement(id); +} + +void cSkinDisplayPlugin::DisplayViewElement(int id) { + if (!doOutput) { + return; + } + pluginView->DisplayViewElement(id); +} + void cSkinDisplayPlugin::SetViewElementIntTokens(map *intTokens) { if (pluginView) pluginView->SetIntTokens(intTokens); @@ -37,13 +76,6 @@ void cSkinDisplayPlugin::SetViewElementLoopTokens(mapSetLoopTokens(loopTokens); } -void cSkinDisplayPlugin::DisplayViewElement(int id) { - if (!doOutput) { - return; - } - pluginView->DisplayViewElement(id); -} - void cSkinDisplayPlugin::InitGrids(int viewGridID) { if (!doOutput) { return; @@ -88,10 +120,81 @@ void cSkinDisplayPlugin::ClearGrids(int viewGridID) { pluginView->ClearGrids(viewGridID); } +void cSkinDisplayPlugin::SetTabIntTokens(map *intTokens) { + if (!doOutput) { + return; + } + pluginView->SetTabIntTokens(intTokens); +} + +void cSkinDisplayPlugin::SetTabStringTokens(map *stringTokens) { + if (!doOutput) { + return; + } + pluginView->SetTabStringTokens(stringTokens); +} + +void cSkinDisplayPlugin::SetTabLoopTokens(map > > *loopTokens) { + if (!doOutput) { + return; + } + pluginView->SetTabLoopTokens(loopTokens); +} + +void cSkinDisplayPlugin::SetTabs(void) { + if (!doOutput) { + return; + } + pluginView->SetTabs(); +} + +void cSkinDisplayPlugin::TabLeft(void) { + if (!doOutput) { + return; + } + pluginView->TabLeft(); +} + +void cSkinDisplayPlugin::TabRight(void) { + if (!doOutput) { + return; + } + pluginView->TabRight(); +} + +void cSkinDisplayPlugin::TabUp(void) { + if (!doOutput) { + return; + } + pluginView->TabUp(); +} + +void cSkinDisplayPlugin::TabDown(void) { + if (!doOutput) { + return; + } + pluginView->TabDown(); +} + +void cSkinDisplayPlugin::DisplayTabs(void) { + if (!doOutput) { + return; + } + pluginView->DisplayTab(); +} + void cSkinDisplayPlugin::Flush(void) { if (initial) { pluginView->DoStart(); initial = false; } pluginView->Flush(); +} + +bool cSkinDisplayPlugin::ChannelLogoExists(string channelId) { + return imgCache->LogoExists(channelId); +} + +string cSkinDisplayPlugin::GetEpgImagePath(void) { + return *config.epgImagePath; } \ No newline at end of file diff --git a/displayplugin.h b/displayplugin.h index 6fef255..8c15ec1 100644 --- a/displayplugin.h +++ b/displayplugin.h @@ -11,8 +11,11 @@ private: cDisplayPluginView *pluginView; public: cSkinDisplayPlugin(void) {}; - cSkinDisplayPlugin(cTemplate *pluginTemplate); + cSkinDisplayPlugin(cTemplate *pluginTemplate, int subViewID); 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 *intTokens); virtual void SetViewElementStringTokens(map *stringTokens); @@ -23,7 +26,18 @@ public: virtual void DeleteGrid(int viewGridID, long gridID); virtual void DisplayGrids(int viewGridID); virtual void ClearGrids(int viewGridID); + virtual void SetTabIntTokens(map *intTokens); + virtual void SetTabStringTokens(map *stringTokens); + virtual void SetTabLoopTokens(map > > *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); }; #endif //__DISPLAYPLUGIN_H diff --git a/dtd/displayplugin.dtd b/dtd/displayplugin.dtd index df18160..c9e7a10 100644 --- a/dtd/displayplugin.dtd +++ b/dtd/displayplugin.dtd @@ -2,7 +2,7 @@ - + + + + + + + + + + %functions; diff --git a/dtd/functions.dtd b/dtd/functions.dtd index 9e474e4..5d6e782 100644 --- a/dtd/functions.dtd +++ b/dtd/functions.dtd @@ -1,4 +1,4 @@ - + - + - + + + + width = width; + this->height = height; + + surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); + cr = cairo_create(surface); + cairo_set_antialias(cr, CAIRO_ANTIALIAS_BEST); +} + +void cCairoImage::DrawTextVertical(string text, tColor color, string font, int size) { + + int imgHeight = GetTextWidth(text, font, size); + InitCairoImage(size * 1.2, imgHeight); + + SetColor(color); + cairo_move_to (cr, size, imgHeight); + cairo_font_weight_t fontWeight = CAIRO_FONT_WEIGHT_NORMAL; + cairo_font_slant_t fontSlant = CAIRO_FONT_SLANT_NORMAL; + cairo_select_font_face (cr, font.c_str(), fontSlant, fontWeight); + cairo_set_font_size (cr, size); + cairo_rotate(cr, 3*M_PI/2); + cairo_show_text (cr, text.c_str()); +} + +cImage *cCairoImage::GetImage(void) { + if (!cr || !surface) + return NULL; + + unsigned char *data = cairo_image_surface_get_data(surface); + cImage *image = new cImage(cSize(width, height), (tColor*)data); + return image; +} + +/********************************************************************************** +* Private Functions +**********************************************************************************/ + +int cCairoImage::GetTextWidth(string text, string font, int size) { + cairo_surface_t *tmpSurface; + cairo_t *tmpCr; + + double width = 300; + double height = (double)size *1.3; + + cairo_font_weight_t fontWeight = CAIRO_FONT_WEIGHT_NORMAL; + cairo_font_slant_t fontSlant = CAIRO_FONT_SLANT_NORMAL; + + tmpSurface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); + tmpCr = cairo_create (tmpSurface); + + cairo_select_font_face (tmpCr, font.c_str(), fontSlant, fontWeight); + cairo_set_font_size (tmpCr, size); + + cairo_text_extents_t te; + cairo_text_extents (tmpCr, text.c_str(), &te); + int textWidth = te.width; + + cairo_destroy (tmpCr); + cairo_surface_destroy (tmpSurface); + + return (double)textWidth * 1.1; +} + +void cCairoImage::SetColor(tColor color) { + if (!cr || !surface) + return; + tIndex tAlpha = (color & 0xFF000000) >> 24; + tIndex tRed = (color & 0x00FF0000) >> 16; + tIndex tGreen = (color & 0x0000FF00) >> 8; + tIndex tBlue = (color & 0x000000FF); + + double a = (int)tAlpha / (double)255; + double r = (int)tRed / (double)255; + double g = (int)tGreen / (double)255; + double b = (int)tBlue / (double)255; + + cairo_set_source_rgba(cr, r, g, b, a); +} \ No newline at end of file diff --git a/libcore/cairoimage.h b/libcore/cairoimage.h new file mode 100644 index 0000000..02e9c89 --- /dev/null +++ b/libcore/cairoimage.h @@ -0,0 +1,26 @@ +#ifndef __CAIROIMAGE_H +#define __CAIROIMAGE_H + +#include +#include +#include +#include + +using namespace std; + +class cCairoImage { +private: + int width; + int height; + cairo_surface_t *surface; + cairo_t *cr; + void SetColor(tColor color); + int GetTextWidth(string text, string font, int size); +public: + cCairoImage(void); + virtual ~cCairoImage(); + void InitCairoImage(int width, int height); + void DrawTextVertical(string text, tColor color, string font, int size); + cImage *GetImage(void); +}; +#endif //__CAIROIMAGE_H \ No newline at end of file diff --git a/libcore/imagecache.c b/libcore/imagecache.c index 2a9a948..e6188d2 100644 --- a/libcore/imagecache.c +++ b/libcore/imagecache.c @@ -4,6 +4,7 @@ #include #include #include "imagecache.h" +#include "cairoimage.h" #include "../config.h" #include "helpers.h" @@ -331,6 +332,28 @@ cImage *cImageCache::GetSkinpart(string name, int width, int height) { return NULL; } +cImage *cImageCache::GetVerticalText(string text, tColor color, string font, int size) { + cMutexLock MutexLock(&mutex); + stringstream buf; + buf << text << "_" << size; + string imgName = buf.str(); + map::iterator hit = cairoImageCache.find(imgName); + if (hit != cairoImageCache.end()) { + return (cImage*)hit->second; + } else { + cCairoImage c; + c.DrawTextVertical(text, color, font, size); + cImage *image = c.GetImage(); + cairoImageCache.insert(pair(imgName, image)); + hit = cairoImageCache.find(imgName); + if (hit != cairoImageCache.end()) { + return (cImage*)hit->second; + } + } + return NULL; +} + + bool cImageCache::LoadIcon(eImageType type, string name) { cString subdir(""); if (type == itMenuIcon) @@ -409,11 +432,17 @@ void cImageCache::Clear(void) { } channelLogoCache.clear(); - for(map::const_iterator it = skinPartsCache.begin(); it != skinPartsCache.end(); it++) { + for(map::const_iterator it = skinPartsCache.begin(); it != skinPartsCache.end(); it++) { cImage *img = (cImage*)it->second; delete img; } skinPartsCache.clear(); + + for(map::const_iterator it = cairoImageCache.begin(); it != cairoImageCache.end(); it++) { + cImage *img = (cImage*)it->second; + delete img; + } + cairoImageCache.clear(); } void cImageCache::Debug(bool full) { diff --git a/libcore/imagecache.h b/libcore/imagecache.h index 086d8e4..f2c04f3 100644 --- a/libcore/imagecache.h +++ b/libcore/imagecache.h @@ -30,6 +30,8 @@ public: //skinparts void CacheSkinpart(string path, int width, int height); cImage *GetSkinpart(string name, int width, int height); + //cairo special images + cImage *GetVerticalText(string text, tColor color, string font, int size); //helpers void Clear(void); void Debug(bool full); @@ -48,6 +50,7 @@ private: map iconCache; map channelLogoCache; map skinPartsCache; + map cairoImageCache; bool LoadIcon(eImageType type, string name); bool LoadLogo(const cChannel *channel); bool LoadSeparatorLogo(string name); diff --git a/libcore/pixmapcontainer.c b/libcore/pixmapcontainer.c index b3ea83e..3e5e60a 100644 --- a/libcore/pixmapcontainer.c +++ b/libcore/pixmapcontainer.c @@ -16,6 +16,7 @@ cPixmapContainer::cPixmapContainer(int numPixmaps) { pixmaps[i] = NULL; pixmapsTransparency[i] = 0; } + pixmapsLayer = NULL; mutex.Unlock(); checkRunning = false; fadeTime = 0; @@ -33,6 +34,9 @@ cPixmapContainer::~cPixmapContainer(void) { } delete[] pixmaps; delete[] pixmapsTransparency; + if (pixmapsLayer) + delete[] pixmapsLayer; + if (deleteOsdOnExit && osd) { mutex.Lock(); delete osd; @@ -65,12 +69,6 @@ void cPixmapContainer::OpenFlush(void) { flushState = fsOpen; } -bool cPixmapContainer::PixmapExists(int num) { - cMutexLock MutexLock(&mutex); - if (pixmaps[num]) - return true; - return false; -} void cPixmapContainer::DoFlush(void) { cMutexLock MutexLock(&mutex); @@ -81,6 +79,41 @@ void cPixmapContainer::DoFlush(void) { } } +void cPixmapContainer::HidePixmaps(void) { + cMutexLock MutexLock(&mutex); + pixmapsLayer = new int[numPixmaps]; + for(int i=0; i < numPixmaps; i++) { + if (!pixmaps[i]) { + pixmapsLayer[i] = 0; + continue; + } + pixmapsLayer[i] = pixmaps[i]->Layer(); + pixmaps[i]->SetLayer(-1); + } +} + +void cPixmapContainer::ShowPixmaps(void) { + cMutexLock MutexLock(&mutex); + if (!pixmapsLayer) + return; + for(int i=0; i < numPixmaps; i++) { + if (!pixmaps[i]) + continue; + pixmaps[i]->SetLayer(pixmapsLayer[i]); + } +} + +/****************************************************************************************************** +* Protected Functions +******************************************************************************************************/ + +bool cPixmapContainer::PixmapExists(int num) { + cMutexLock MutexLock(&mutex); + if (pixmaps[num]) + return true; + return false; +} + void cPixmapContainer::CreatePixmap(int num, int Layer, const cRect &ViewPort, const cRect &DrawPort) { cMutexLock MutexLock(&mutex); if (!osd || (checkRunning && !Running())) diff --git a/libcore/pixmapcontainer.h b/libcore/pixmapcontainer.h index 8fe1dfe..3b367c8 100644 --- a/libcore/pixmapcontainer.h +++ b/libcore/pixmapcontainer.h @@ -20,13 +20,14 @@ private: int numPixmaps; cPixmap **pixmaps; int *pixmapsTransparency; + int *pixmapsLayer; bool checkRunning; int fadeTime; bool deleteOsdOnExit; protected: void SetInitFinished(void) { pixContainerInit = false; }; bool CreateOsd(int Left, int Top, int Width, int Height); - void DeleteOsdOnExit(void) { deleteOsdOnExit = true; }; + void DeleteOsdOnExit(bool doDelete = true) { deleteOsdOnExit = doDelete; }; //Wrappers for access to pixmaps bool PixmapExists(int num); int NumPixmaps(void) { return numPixmaps; }; @@ -69,6 +70,8 @@ public: void LockFlush(void); void OpenFlush(void); void DoFlush(void); + void HidePixmaps(void); + void ShowPixmaps(void); virtual void Action(void) {}; }; diff --git a/libskindesigner/osdelements.c b/libskindesigner/osdelements.c new file mode 100644 index 0000000..11915a8 --- /dev/null +++ b/libskindesigner/osdelements.c @@ -0,0 +1,203 @@ +#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(key, value)); +} + +void cOsdElement::AddIntToken(string key, int value) { + intTokens.insert(pair(key, value)); +} + +void cOsdElement::AddLoopToken(string loopName, map &tokens) { + map > >::iterator hitLoop = loopTokens.find(loopName); + if (hitLoop == loopTokens.end()) { + vector > tokenVector; + tokenVector.push_back(tokens); + loopTokens.insert(pair > >(loopName, tokenVector)); + } else { + vector > *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 new file mode 100644 index 0000000..057a1fd --- /dev/null +++ b/libskindesigner/osdelements.h @@ -0,0 +1,91 @@ +#ifndef __OSDELEMENTS_H +#define __OSDELEMENTS_H + +#include +#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 &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 new file mode 100644 index 0000000..8fa9c69 --- /dev/null +++ b/libskindesigner/services.h @@ -0,0 +1,131 @@ +#ifndef __SKINDESIGNERSERVICES_H +#define __SKINDESIGNERSERVICES_H + +using namespace std; + +#include +#include +#include + +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 *stringTokens, map *intTokens, map > > *loopTokens, int Index, bool Current, bool Selectable); + virtual bool SetPluginText(map *stringTokens, map *intTokens, map > > *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 *intTokens); + virtual void SetViewElementStringTokens(map *stringTokens); + virtual void SetViewElementLoopTokens(map > > *loopTokens); + virtual void InitGrids(int viewGridID); + virtual void SetGrid(int viewGridID, long gridID, double x, double y, double width, double height, map *intTokens, map *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 *intTokens); + virtual void SetTabStringTokens(map *stringTokens); + virtual void SetTabLoopTokens(map > > *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(key, templateName)); + } + void SetView(int key, string templateName) { + views.insert(pair(key, templateName)); + } + void SetSubView(int view, int subView, string templateName) { + pair sub = make_pair(subView, templateName); + subViews.insert(pair >(view, sub)); + } + void SetViewElement(int view, int viewElement, string name) { + map< int, map >::iterator hit = viewElements.find(view); + if (hit == viewElements.end()) { + map vE; + vE.insert(pair(viewElement, name)); + viewElements.insert(pair >(view, vE)); + } else { + (hit->second).insert(pair(viewElement, name)); + } + } + void SetViewGrid(int view, int viewGrid, string name) { + map< int, map >::iterator hit = viewGrids.find(view); + if (hit == viewGrids.end()) { + map vG; + vG.insert(pair(viewGrid, name)); + viewGrids.insert(pair >(view, vG)); + } else { + (hit->second).insert(pair(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 > subViews; //subviews of standalone views as view -> (subview, templatename) multimap + map< int, map > viewElements; //viewelements as key -> (viewelement, viewelementname) hashmap + map< int, map > 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/skindesclient-0.0.1/libskindesigner/skindesignerosdbase.c b/libskindesigner/skindesignerosdbase.c similarity index 83% rename from skindesclient-0.0.1/libskindesigner/skindesignerosdbase.c rename to libskindesigner/skindesignerosdbase.c index 821efdc..4d40615 100644 --- a/skindesclient-0.0.1/libskindesigner/skindesignerosdbase.c +++ b/libskindesigner/skindesignerosdbase.c @@ -1,4 +1,41 @@ #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 diff --git a/skindesclient-0.0.1/libskindesigner/skindesignerosdbase.h b/libskindesigner/skindesignerosdbase.h similarity index 70% rename from skindesclient-0.0.1/libskindesigner/skindesignerosdbase.h rename to libskindesigner/skindesignerosdbase.h index 88068af..060ec11 100644 --- a/skindesclient-0.0.1/libskindesigner/skindesignerosdbase.h +++ b/libskindesigner/skindesignerosdbase.h @@ -10,6 +10,26 @@ #include #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; @@ -28,7 +48,9 @@ public: void AddLoopToken(string loopName, map &tokens); }; - +/********************************************************************** +* cSkindesignerOsdMenu +**********************************************************************/ class cSkindesignerOsdMenu : public cOsdMenu { private: bool init; diff --git a/libtemplate/template.c b/libtemplate/template.c index 01a7b28..189efd0 100644 --- a/libtemplate/template.c +++ b/libtemplate/template.c @@ -56,7 +56,8 @@ bool cTemplate::ReadFromXML(string xmlfile) { if (!parser.ParseView()) { return false; } - //read additional plugin templates + + //read additional plugin menu templates bool ok = true; if (viewType == vtDisplayMenu) { config.InitPluginMenuIterator(); @@ -114,6 +115,39 @@ void cTemplate::CacheImages(void) { } } +bool cTemplate::SetSubViews(string plugName, int viewID) { + map subViews = config.GetPluginSubViews(plugName, viewID); + + if (subViews.size() == 0) { + return true; + } + + for (map::iterator it = subViews.begin(); it != subViews.end(); it ++) { + int subViewID = it->first; + stringstream templateName; + templateName << "plug-" << plugName << "-" << it->second; + string subViewTemplate = templateName.str(); + cTemplateView *plgTemplateView = new cTemplateViewPlugin(plugName, subViewID); + plgTemplateView->SetGlobals(globals); + cXmlParser parser; + if (!parser.ReadView(plgTemplateView, subViewTemplate)) { + esyslog("skindesigner: error reading plugin %s template", plugName.c_str()); + delete plgTemplateView; + return false; + } + if (!parser.ParseView()) { + esyslog("skindesigner: error reading plugin %s template", plugName.c_str()); + delete plgTemplateView; + return false; + } + stringstream svid; + svid << subViewID; + rootView->AddSubView(svid.str(), plgTemplateView); + } + return true; +} + + void cTemplate::Debug(void) { rootView->Debug(); } diff --git a/libtemplate/template.h b/libtemplate/template.h index 79a824b..75dce5c 100644 --- a/libtemplate/template.h +++ b/libtemplate/template.h @@ -52,6 +52,8 @@ public: //get fonts for pre caching vector< pair > GetUsedFonts(void); void CacheImages(void); + //Set Plugin Subviews + bool SetSubViews(string plugName, int viewID); //Debug void Debug(void); }; diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 0b3de8a..8156633 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -725,11 +725,16 @@ bool cTemplateFunction::SetNumericParameter(eParamType type, string value) { break; case ptY: case ptHeight: - case ptFontSize: case ptScaleTvY: case ptScaleTvHeight: param.SetVertical(); break; + case ptFontSize: { + if (this->type == ftDrawTextVertical) + param.SetHorizontal(); + else + param.SetVertical(); + break; } case ptLayer: param.SetDefault(1); break; diff --git a/libtemplate/templatefunction.h b/libtemplate/templatefunction.h index f7af25c..e63850e 100644 --- a/libtemplate/templatefunction.h +++ b/libtemplate/templatefunction.h @@ -29,6 +29,7 @@ enum eFuncType { ftFill, ftDrawText, ftDrawTextBox, + ftDrawTextVertical, ftDrawImage, ftDrawRectangle, ftDrawEllipse, @@ -198,6 +199,8 @@ public: //Dynamic width or height parameter int GetWidth(bool cutted = true); int GetHeight(void); + int GetContainerWidth(void) { return containerWidth; }; + int GetContainerHeight(void) { return containerHeight; }; void GetNeededWidths(multimap *widths); void GetNeededHeights(multimap *heights); void GetNeededPosX(multimap *posXs); diff --git a/libtemplate/templatepixmap.c b/libtemplate/templatepixmap.c index 40e35a3..52ae63f 100644 --- a/libtemplate/templatepixmap.c +++ b/libtemplate/templatepixmap.c @@ -124,6 +124,8 @@ void cTemplatePixmap::AddFunction(string name, vector > &pa type = ftDrawText; } else if (!name.compare("drawtextbox")) { type = ftDrawTextBox; + } else if (!name.compare("drawtextvertical")) { + type = ftDrawTextVertical; } else if (!name.compare("drawimage")) { type = ftDrawImage; } else if (!name.compare("drawrectangle")) { diff --git a/libtemplate/templateview.c b/libtemplate/templateview.c index 753b242..c37b5f0 100644 --- a/libtemplate/templateview.c +++ b/libtemplate/templateview.c @@ -642,6 +642,22 @@ void cTemplateView::SetFunctionDefinitions(void) { attributes.insert("floatheight"); funcsAllowed.insert(pair< string, set >(name, attributes)); + name = "drawtextvertical"; + attributes.clear(); + attributes.insert("debug"); + attributes.insert("condition"); + attributes.insert("name"); + attributes.insert("x"); + attributes.insert("y"); + attributes.insert("height"); + attributes.insert("align"); + attributes.insert("valign"); + attributes.insert("font"); + attributes.insert("fontsize"); + attributes.insert("color"); + attributes.insert("text"); + funcsAllowed.insert(pair< string, set >(name, attributes)); + name = "drawimage"; attributes.clear(); attributes.insert("debug"); @@ -1849,6 +1865,20 @@ cTemplateViewPlugin::cTemplateViewPlugin(string pluginName, int viewID) { attributes.insert("scaletvheight"); funcsAllowed.insert(pair< string, set >(viewName, attributes)); + //definition of allowed parameters for viewtab + attributes.clear(); + attributes.insert("debug"); + attributes.insert("name"); + attributes.insert("condition"); + attributes.insert("x"); + attributes.insert("y"); + attributes.insert("width"); + attributes.insert("height"); + attributes.insert("layer"); + attributes.insert("transparency"); + attributes.insert("scrollheight"); + funcsAllowed.insert(pair< string, set >("tab", attributes)); + attributes.clear(); attributes.insert("x"); attributes.insert("y"); @@ -1858,15 +1888,23 @@ cTemplateViewPlugin::cTemplateViewPlugin(string pluginName, int viewID) { funcsAllowed.insert(pair< string, set >("grid", attributes)); viewElementsAllowed.insert("viewelement"); + viewElementsAllowed.insert("scrollbar"); + viewElementsAllowed.insert("tablabels"); viewGridsAllowed.insert("grid"); } cTemplateViewPlugin::~cTemplateViewPlugin() { } +void cTemplateViewPlugin::AddSubView(string sSubView, cTemplateView *subView) { + int subViewId = atoi(sSubView.c_str()); + subViews.insert(pair< eSubView, cTemplateView* >((eSubView)subViewId, subView)); +} + void cTemplateViewPlugin::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector > &viewElementattributes) { eViewElement ve = veUndefined; string viewElementName = ""; + int viewElementID = -1; bool found = false; for (vector >::iterator it = viewElementattributes.begin(); it != viewElementattributes.end(); it++) { if (!(it->first).compare("name")) { @@ -1875,15 +1913,22 @@ void cTemplateViewPlugin::AddPixmap(string sViewElement, cTemplatePixmap *pix, v break; } } - if (!found) { - esyslog("skindesigner: no name defined for plugin %s viewelement", pluginName.c_str()); - } - int viewElementID = config.GetPluginViewElementID(pluginName, viewElementName, viewID); - - if (viewElementID == -1) { - esyslog("skindesigner: %s: unknown ViewElement in displayplugin: %s", pluginName.c_str(), viewElementName.c_str()); - return; + if (found) { + viewElementID = config.GetPluginViewElementID(pluginName, viewElementName, viewID); + } else { + //check for internal view elements + ePluginInteralViewElements pve = pveUndefined; + if (!sViewElement.compare("scrollbar")) { + pve = pveScrollbar; + } else if (!sViewElement.compare("tablabels")) { + pve = pveTablabels; + } + if (pve == pveUndefined) { + esyslog("skindesigner: %s: unknown ViewElement in displayplugin: %s", pluginName.c_str(), viewElementName.c_str()); + return; + } + viewElementID = pve; } pix->SetGlobals(globals); @@ -1932,3 +1977,7 @@ void cTemplateViewPlugin::AddPixmapGrid(cTemplatePixmap *pix, vectorsecond)->AddPixmap(pix); } } + +void cTemplateViewPlugin::AddViewTab(cTemplateViewTab *viewTab) { + viewTabs.push_back(viewTab); +} diff --git a/libtemplate/templateview.h b/libtemplate/templateview.h index 7e0d43e..79564b7 100644 --- a/libtemplate/templateview.h +++ b/libtemplate/templateview.h @@ -211,7 +211,7 @@ public: void AddViewList(string sViewList, cTemplateViewList *viewList); }; -// --- cTemplateViewAudioTracks ------------------------------------------------------------- +// --- cTemplateViewPlugin ------------------------------------------------------------- class cTemplateViewPlugin : public cTemplateView { private: @@ -220,8 +220,10 @@ private: public: cTemplateViewPlugin(string pluginName, int viewID); virtual ~cTemplateViewPlugin(void); + void AddSubView(string sSubView, cTemplateView *subView); void AddPixmap(string viewElement, cTemplatePixmap *pix, vector > &viewElementattributes); void AddPixmapGrid(cTemplatePixmap *pix, vector > &gridAttributes); + void AddViewTab(cTemplateViewTab *viewTab); }; #endif //__TEMPLATEVIEW_H diff --git a/libtemplate/templateviewelement.h b/libtemplate/templateviewelement.h index ebddcd2..be7bb74 100644 --- a/libtemplate/templateviewelement.h +++ b/libtemplate/templateviewelement.h @@ -70,6 +70,12 @@ enum eViewElement { veVolume }; +enum ePluginInteralViewElements { + pveScrollbar = -1, + pveTablabels = -2, + pveUndefined = 0 +}; + class cTemplateViewElement { protected: bool debugTokens; diff --git a/libtemplate/xmlparser.c b/libtemplate/xmlparser.c index e086ba4..aa7d498 100644 --- a/libtemplate/xmlparser.c +++ b/libtemplate/xmlparser.c @@ -200,6 +200,8 @@ bool cXmlParser::ParseView(void) { vector > attribs; ParseAttributes(attr, node, attribs); ParseGrid(node->xmlChildrenNode, attribs); + } else if (!xmlStrcmp(node->name, (const xmlChar *) "tab")) { + ParseViewTab(node, view); } else { return false; } diff --git a/services.h b/services.h index ea2372b..233d1c7 100644 --- a/services.h +++ b/services.h @@ -22,6 +22,10 @@ public: void SetView(int key, string templateName) { views.insert(pair(key, templateName)); } + void SetSubView(int view, int subView, string templateName) { + pair sub = make_pair(subView, templateName); + subViews.insert(pair >(view, sub)); + } void SetViewElement(int view, int viewElement, string name) { map< int, map >::iterator hit = viewElements.find(view); if (hit == viewElements.end()) { @@ -43,11 +47,12 @@ public: } } // 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 - map< int, map > viewElements; //viewelements as key -> (viewelement, viewelementname) hashmap - map< int, map > viewGrids; //viewgrids as key -> (viewgrid, viewgridname) hashmap + 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 > subViews; //subviews of standalone views as view -> (subview, templatename) multimap + map< int, map > viewElements; //viewelements as key -> (viewelement, viewelementname) hashmap + map< int, map > viewGrids; //viewgrids as key -> (viewgrid, viewgridname) hashmap //out }; @@ -68,11 +73,13 @@ public: GetDisplayPlugin(void) { pluginName = ""; viewID = -1; + subViewID = -1; displayPlugin = NULL; }; // in string pluginName; int viewID; + int subViewID; //out cSkinDisplayPlugin *displayPlugin; }; diff --git a/skindesclient-0.0.1/COPYING b/skindesclient-0.0.1/COPYING deleted file mode 100644 index f90922e..0000000 --- a/skindesclient-0.0.1/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/skindesclient-0.0.1/Makefile b/skindesclient-0.0.1/Makefile deleted file mode 100644 index 7e19d59..0000000 --- a/skindesclient-0.0.1/Makefile +++ /dev/null @@ -1,123 +0,0 @@ -# -# Makefile for a Video Disk Recorder plugin -# -# $Id$ - -# The official name of this plugin. -# This name will be used in the '-P...' option of VDR to load the plugin. -# By default the main source file also carries this name. - -PLUGIN = skindesclient - -### The version number of this plugin (taken from the main source file): - -VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') - -### The directory environment: - -# Use package data if installed...otherwise assume we're under the VDR source directory: -PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc)) -LIBDIR = $(call PKGCFG,libdir) -LOCDIR = $(call PKGCFG,locdir) -PLGCFG = $(call PKGCFG,plgcfg) -# -TMPDIR ?= /tmp - -### The compiler options: - -export CFLAGS = $(call PKGCFG,cflags) -export CXXFLAGS = $(call PKGCFG,cxxflags) - -### The version number of VDR's plugin API: - -APIVERSION = $(call PKGCFG,apiversion) - -### Allow user defined options to overwrite defaults: - --include $(PLGCFG) - -### The name of the distribution archive: - -ARCHIVE = $(PLUGIN)-$(VERSION) -PACKAGE = vdr-$(ARCHIVE) - -### The name of the shared object file: - -SOFILE = libvdr-$(PLUGIN).so - -### Includes and Defines (add further entries here): - -INCLUDES += - -DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -### The object files (add further files here): - -OBJS = $(PLUGIN).o \ - libskindesigner/skindesignerosdbase.o - -### The main target: - -all: $(SOFILE) i18n - -### Implicit rules: - -%.o: %.c - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< - -### Dependencies: - -MAKEDEP = $(CXX) -MM -MG -DEPFILE = .dependencies -$(DEPFILE): Makefile - @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ - --include $(DEPFILE) - -### Internationalization (I18N): - -PODIR = po -I18Npo = $(wildcard $(PODIR)/*.po) -I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) -I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) -I18Npot = $(PODIR)/$(PLUGIN).pot - -%.mo: %.po - msgfmt -c -o $@ $< - -$(I18Npot): $(wildcard *.c) - xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='' -o $@ `ls $^` - -%.po: $(I18Npot) - msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< - @touch $@ - -$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo - install -D -m644 $< $@ - -.PHONY: i18n -i18n: $(I18Nmo) $(I18Npot) - -install-i18n: $(I18Nmsgs) - -### Targets: - -$(SOFILE): $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ - -install-lib: $(SOFILE) - install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) - -install: install-lib install-i18n - -dist: $(I18Npo) clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) - @mkdir $(TMPDIR)/$(ARCHIVE) - @cp -a * $(TMPDIR)/$(ARCHIVE) - @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE) - @-rm -rf $(TMPDIR)/$(ARCHIVE) - @echo Distribution package created as $(PACKAGE).tgz - -clean: - @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ diff --git a/skindesclient-0.0.1/README b/skindesclient-0.0.1/README deleted file mode 100644 index 3b270ac..0000000 --- a/skindesclient-0.0.1/README +++ /dev/null @@ -1,16 +0,0 @@ -This is a "plugin" for the Video Disk Recorder (VDR). - -Written by: Louis Braun - -Project's homepage: --- - -Latest version available at: --- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. -See the file COPYING for more information. - -Description: This is just an example how to use the skindesigner -template engine with a VDR plugin diff --git a/skindesclient-0.0.1/libskindesigner/services.h b/skindesclient-0.0.1/libskindesigner/services.h deleted file mode 100644 index 0a016fa..0000000 --- a/skindesclient-0.0.1/libskindesigner/services.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __SKINDESIGNERSERVICES_H -#define __SKINDESIGNERSERVICES_H - -using namespace std; - -#include -#include -#include - -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 *stringTokens, map *intTokens, map > > *loopTokens, int Index, bool Current, bool Selectable); - virtual bool SetPluginText(map *stringTokens, map *intTokens, map > > *loopTokens); -}; - -/********************************************************************* -* 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(key, templateName)); - } -// in - string name; //name of plugin - map< int, string > menus; //menus as key -> templatename hashmap -//out -}; - -// Data structure for service "GetDisplayMenu" -class GetDisplayMenu { -public: - GetDisplayMenu(void) { - displayMenu = NULL; - }; -// in -//out - cSDDisplayMenu *displayMenu; -}; -#endif //__SKINDESIGNERSERVICES_H \ No newline at end of file diff --git a/skindesclient-0.0.1/osdmenu.c b/skindesclient-0.0.1/osdmenu.c deleted file mode 100644 index e32b2d1..0000000 --- a/skindesclient-0.0.1/osdmenu.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "libskindesigner/skindesignerosdbase.h" - -enum eMenus { - meListMain, - meListSub, - meDetail -}; - -class cPlugOsdMenu : public cSkindesignerOsdMenu { -private: - void SetMenu(int numItems, bool subfolder = false); - void SetDetailView(int element); -public: - cPlugOsdMenu(void); - virtual ~cPlugOsdMenu(); - virtual eOSState ProcessKey(eKeys key); -}; - - -//*************************************************************************** -// Public Functions -//*************************************************************************** - -cPlugOsdMenu::cPlugOsdMenu(void) : cSkindesignerOsdMenu("Skindesigner Client") { - SetPluginName("skindesclient"); - SetMenu(10); -} - -cPlugOsdMenu::~cPlugOsdMenu(void) { - -} - -eOSState cPlugOsdMenu::ProcessKey(eKeys key) { - eOSState state = cOsdMenu::ProcessKey(key); - switch (key) { - case kOk: { - int element = Current(); - if (element%2) - SetDetailView(element); - else - SetMenu(25, true); - state = osContinue; - break; - } case kLeft: { - TextKeyLeft(); - state = osContinue; - break; - } case kRight: { - TextKeyRight(); - state = osContinue; - break; - } case kUp: { - TextKeyUp(); - state = osContinue; - break; - } case kDown: { - TextKeyDown(); - state = osContinue; - break; - } - default: - break; - } - return state; -} - -//*************************************************************************** -// Private Functions -//*************************************************************************** - -void cPlugOsdMenu::SetMenu(int numItems, bool subfolder) { - eMenus menu = subfolder ? meListSub : meListMain; - SetPluginMenu(menu, mtList); - Clear(); - - for (int i=0; i < numItems; i++) { - cSkindesignerOsdItem *item = new cSkindesignerOsdItem(); - //add some tokens to the menu item - stringstream text; - if (i%2) - text << "DetailItem" << (i+1); - else - text << "FolderItem" << (i+1); - item->SetText(text.str().c_str()); - item->AddIntToken("itemnumber", i); - item->AddStringToken("menuitemtext", text.str().c_str()); - - stringstream text2; - text2 << "CurrentItemText" << (i+1) << "\n"; - text2 << "CurrentItemText" << (i+1) << "\n"; - text2 << "CurrentItemText" << (i+1) << "\n"; - text2 << "CurrentItemText" << (i+1) << "\n"; - text2 << "CurrentItemText" << (i+1) << "\n"; - text2 << "CurrentItemText" << (i+1) << "\n"; - item->AddStringToken("currentitemtext", text2.str().c_str()); - - //Loop Token Example - for (int row=0; row<20; row++) { - map tokens; - for (int col=0; col<3; col++) { - stringstream key; - stringstream value; - key << "loop1[" << "col" << col << "]"; - value << "menuitem" << i << "-" << row << "x" << col; - tokens.insert(pair(key.str(), value.str())); - } - item->AddLoopToken("loop1", tokens); - } - //Add item - bool current = (i==0)?true:false; - Add(item, current); - } - SetHelp("Red", "Green", "Yellow", "Blue"); - Display(); -} - -void cPlugOsdMenu::SetDetailView(int element) { - SetPluginMenu(meDetail, mtText); - Clear(); - ClearTokens(); - - SetText("Text to be displayed if skindesigner templates are not available"); - - AddIntToken("menuitem", element); - AddStringToken("tabtext", "String Token to be displayed if skindesigner template is available"); - - //Loop Token Example - for (int row=0; row<25; row++) { - map tokens; - for (int col=0; col<10; col++) { - stringstream key; - stringstream value; - key << "loop1[" << "col" << col << "]"; - value << "row" << row << "-" << "col" << "-" << col; - tokens.insert(pair(key.str(), value.str())); - } - AddLoopToken("loop1", tokens); - } - - SetHelp("Red", "Green", "Yellow", "Blue"); - Display(); -} diff --git a/skindesclient-0.0.1/skindesclient.c b/skindesclient-0.0.1/skindesclient.c deleted file mode 100644 index 01bff96..0000000 --- a/skindesclient-0.0.1/skindesclient.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * skindesclient.c: A plugin for the Video Disk Recorder - * - * See the README file for copyright information and how to reach the author. - * - * $Id$ - */ - -#include -#include "osdmenu.c" -#include "libskindesigner/services.h" - -static const char *VERSION = "0.0.1"; -static const char *DESCRIPTION = "SkinDesigner Test Client"; -static const char *MAINMENUENTRY = "Skindesclient"; - -class cPluginSkindesclient : public cPlugin { -private: - // Add any member variables or functions you may need here. -public: - cPluginSkindesclient(void); - virtual ~cPluginSkindesclient(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Initialize(void); - virtual bool Start(void); - virtual void Stop(void); - virtual void Housekeeping(void); - virtual void MainThreadHook(void); - virtual cString Active(void); - virtual time_t WakeupTime(void); - virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); - virtual bool Service(const char *Id, void *Data = NULL); - virtual const char **SVDRPHelpPages(void); - virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode); - }; - -cPluginSkindesclient::cPluginSkindesclient(void) -{ - -} - -cPluginSkindesclient::~cPluginSkindesclient() -{ -} - -const char *cPluginSkindesclient::CommandLineHelp(void) -{ - return NULL; -} - -bool cPluginSkindesclient::ProcessArgs(int argc, char *argv[]) -{ - return true; -} - -bool cPluginSkindesclient::Initialize(void) -{ - return true; -} - -bool cPluginSkindesclient::Start(void) -{ - RegisterPlugin reg; - reg.name = "skindesclient"; - reg.SetMenu(meListMain, "menulistmain.xml"); - reg.SetMenu(meListSub, "menulistsub.xml"); - reg.SetMenu(meDetail, "menudetail.xml"); - static cPlugin *pSkinDesigner = cPluginManager::GetPlugin("skindesigner"); - if (pSkinDesigner) { - bool ok = pSkinDesigner->Service("RegisterPlugin", ®); - } else { - esyslog("skindesclient: skindesigner not available"); - } - return true; -} - -void cPluginSkindesclient::Stop(void) -{ - // Stop any background activities the plugin is performing. -} - -void cPluginSkindesclient::Housekeeping(void) -{ - // Perform any cleanup or other regular tasks. -} - -void cPluginSkindesclient::MainThreadHook(void) -{ - // Perform actions in the context of the main program thread. - // WARNING: Use with great care - see PLUGINS.html! -} - -cString cPluginSkindesclient::Active(void) -{ - // Return a message string if shutdown should be postponed - return NULL; -} - -time_t cPluginSkindesclient::WakeupTime(void) -{ - // Return custom wakeup time for shutdown script - return 0; -} - -cOsdObject *cPluginSkindesclient::MainMenuAction(void) -{ - cOsdObject *menu = new cPlugOsdMenu(); - return menu; -} - -cMenuSetupPage *cPluginSkindesclient::SetupMenu(void) -{ - // Return a setup menu in case the plugin supports one. - return NULL; -} - -bool cPluginSkindesclient::SetupParse(const char *Name, const char *Value) -{ - // Parse your own setup parameters and store their values. - return false; -} - -bool cPluginSkindesclient::Service(const char *Id, void *Data) -{ - // Handle custom service requests from other plugins - return false; -} - -const char **cPluginSkindesclient::SVDRPHelpPages(void) -{ - // Return help text for SVDRP commands this plugin implements - return NULL; -} - -cString cPluginSkindesclient::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) -{ - // Process SVDRP commands this plugin implements - return NULL; -} - -VDRPLUGINCREATOR(cPluginSkindesclient); // Don't touch this! diff --git a/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menudetail.xml b/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menudetail.xml deleted file mode 100644 index 82f13ab..0000000 --- a/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menudetail.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menulistmain.xml b/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menulistmain.xml deleted file mode 100644 index 2d88c32..0000000 --- a/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menulistmain.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menulistsub.xml b/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menulistsub.xml deleted file mode 100644 index acc3341..0000000 --- a/skindesclient-0.0.1/templates-metrixhd/plug-skindesclient-menulistsub.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\ No newline at end of file diff --git a/skindesigner.c b/skindesigner.c index dff54a7..36d9387 100644 --- a/skindesigner.c +++ b/skindesigner.c @@ -19,7 +19,7 @@ #endif -static const char *VERSION = "0.2.2"; +static const char *VERSION = "0.3.0"; static const char *DESCRIPTION = trNOOP("Skin Designer"); class cPluginSkinDesigner : public cPlugin { @@ -168,7 +168,7 @@ bool cPluginSkinDesigner::Service(const char *Id, void *Data) { return false; } config.AddPluginMenus(call->name, call->menus); - config.AddPluginViews(call->name, call->views, call->viewElements, call->viewGrids); + config.AddPluginViews(call->name, call->views, call->subViews, call->viewElements, call->viewGrids); if (call->menus.size() > 0) dsyslog("skindesigner: plugin %s has registered %ld menus", call->name.c_str(), call->menus.size()); if (call->views.size() > 0) @@ -195,7 +195,7 @@ bool cPluginSkinDesigner::Service(const char *Id, void *Data) { cSkin *current = Skins.Current(); for (vector::iterator skin = skins.begin(); skin != skins.end(); skin++) { if (*skin == current) { - cSkinDisplayPlugin *displayPlugin = (*skin)->DisplayPlugin(call->pluginName, call->viewID); + cSkinDisplayPlugin *displayPlugin = (*skin)->DisplayPlugin(call->pluginName, call->viewID, call->subViewID); if (displayPlugin) { call->displayPlugin = displayPlugin; return true; diff --git a/skins/blackhole/themes/default/icons/ico_activetimer.png b/skins/blackhole/themes/default/icons/ico_activetimer.png new file mode 100644 index 0000000..af4c33c Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_activetimer.png differ diff --git a/skins/blackhole/themes/default/icons/ico_arrow_left.png b/skins/blackhole/themes/default/icons/ico_arrow_left.png new file mode 100644 index 0000000..57800c7 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_arrow_left.png differ diff --git a/skins/blackhole/themes/default/icons/ico_arrow_right.png b/skins/blackhole/themes/default/icons/ico_arrow_right.png new file mode 100644 index 0000000..ea45f3a Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_arrow_right.png differ diff --git a/skins/blackhole/themes/default/icons/ico_delete_active.png b/skins/blackhole/themes/default/icons/ico_delete_active.png new file mode 100644 index 0000000..f473717 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_delete_active.png differ diff --git a/skins/blackhole/themes/default/icons/ico_delete_inactive.png b/skins/blackhole/themes/default/icons/ico_delete_inactive.png new file mode 100644 index 0000000..21b0a88 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_delete_inactive.png differ diff --git a/skins/blackhole/themes/default/icons/ico_edit_active.png b/skins/blackhole/themes/default/icons/ico_edit_active.png new file mode 100644 index 0000000..ec39699 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_edit_active.png differ diff --git a/skins/blackhole/themes/default/icons/ico_edit_inactive.png b/skins/blackhole/themes/default/icons/ico_edit_inactive.png new file mode 100644 index 0000000..71f016c Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_edit_inactive.png differ diff --git a/skins/blackhole/themes/default/icons/ico_info_active.png b/skins/blackhole/themes/default/icons/ico_info_active.png new file mode 100644 index 0000000..c88f76d Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_info_active.png differ diff --git a/skins/blackhole/themes/default/icons/ico_info_inactive.png b/skins/blackhole/themes/default/icons/ico_info_inactive.png new file mode 100644 index 0000000..37eeed2 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_info_inactive.png differ diff --git a/skins/blackhole/themes/default/icons/ico_no.png b/skins/blackhole/themes/default/icons/ico_no.png new file mode 100644 index 0000000..47cdba0 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_no.png differ diff --git a/skins/blackhole/themes/default/icons/ico_record_active.png b/skins/blackhole/themes/default/icons/ico_record_active.png new file mode 100644 index 0000000..476da99 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_record_active.png differ diff --git a/skins/blackhole/themes/default/icons/ico_record_inactive.png b/skins/blackhole/themes/default/icons/ico_record_inactive.png new file mode 100644 index 0000000..2a91da3 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_record_inactive.png differ diff --git a/skins/blackhole/themes/default/icons/ico_search_active.png b/skins/blackhole/themes/default/icons/ico_search_active.png new file mode 100644 index 0000000..7bf7bc7 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_search_active.png differ diff --git a/skins/blackhole/themes/default/icons/ico_search_inactive.png b/skins/blackhole/themes/default/icons/ico_search_inactive.png new file mode 100644 index 0000000..4a210bb Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_search_inactive.png differ diff --git a/skins/blackhole/themes/default/icons/ico_switchtimer.svg b/skins/blackhole/themes/default/icons/ico_switchtimer.svg new file mode 100644 index 0000000..533305d --- /dev/null +++ b/skins/blackhole/themes/default/icons/ico_switchtimer.svg @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/icons/ico_yes.png b/skins/blackhole/themes/default/icons/ico_yes.png new file mode 100644 index 0000000..2f1af98 Binary files /dev/null and b/skins/blackhole/themes/default/icons/ico_yes.png differ diff --git a/skins/blackhole/themes/default/skinparts/tvguide_grid_active_hor.svg b/skins/blackhole/themes/default/skinparts/tvguide_grid_active_hor.svg new file mode 100644 index 0000000..5ca5628 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_grid_active_hor.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_grid_active_ver.svg b/skins/blackhole/themes/default/skinparts/tvguide_grid_active_ver.svg new file mode 100644 index 0000000..dccad1b --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_grid_active_ver.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_grid_bright_hor.svg b/skins/blackhole/themes/default/skinparts/tvguide_grid_bright_hor.svg new file mode 100644 index 0000000..2451550 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_grid_bright_hor.svg @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_grid_bright_ver.svg b/skins/blackhole/themes/default/skinparts/tvguide_grid_bright_ver.svg new file mode 100644 index 0000000..a4ee2c5 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_grid_bright_ver.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_grid_dark_hor.svg b/skins/blackhole/themes/default/skinparts/tvguide_grid_dark_hor.svg new file mode 100644 index 0000000..7208924 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_grid_dark_hor.svg @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_grid_dark_ver.svg b/skins/blackhole/themes/default/skinparts/tvguide_grid_dark_ver.svg new file mode 100644 index 0000000..bef7868 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_grid_dark_ver.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_bright_hor.svg b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_bright_hor.svg new file mode 100644 index 0000000..b3bd1c6 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_bright_hor.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_bright_ver.svg b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_bright_ver.svg new file mode 100644 index 0000000..e170a67 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_bright_ver.svg @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_dark_hor.svg b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_dark_hor.svg new file mode 100644 index 0000000..cf20435 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_dark_hor.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_dark_ver.svg b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_dark_ver.svg new file mode 100644 index 0000000..7ea3449 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguide_timelinegrid_dark_ver.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/skinparts/tvguideheader.svg b/skins/blackhole/themes/default/skinparts/tvguideheader.svg new file mode 100644 index 0000000..15d8a00 --- /dev/null +++ b/skins/blackhole/themes/default/skinparts/tvguideheader.svg @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/skins/blackhole/themes/default/theme.xml b/skins/blackhole/themes/default/theme.xml index 4eb66a9..6598af8 100644 --- a/skins/blackhole/themes/default/theme.xml +++ b/skins/blackhole/themes/default/theme.xml @@ -14,8 +14,10 @@ FFFFFFFF FF000000 FF999999 + FF777777 55FF0000 99000000 + FF00284A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/blackhole/xmlfiles/plug-tvguideng-recmenu.xml b/skins/blackhole/xmlfiles/plug-tvguideng-recmenu.xml new file mode 100644 index 0000000..4d1bfb9 --- /dev/null +++ b/skins/blackhole/xmlfiles/plug-tvguideng-recmenu.xml @@ -0,0 +1,454 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/blackhole/xmlfiles/plug-tvguideng-root.xml b/skins/blackhole/xmlfiles/plug-tvguideng-root.xml index 342af31..bb7fc94 100644 --- a/skins/blackhole/xmlfiles/plug-tvguideng-root.xml +++ b/skins/blackhole/xmlfiles/plug-tvguideng-root.xml @@ -1,45 +1,270 @@ - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + - - + + + + + + + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -47,26 +272,122 @@ - + - + + - + + - + + - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/metrixhd/themes/default/icons/ico_switchtimer.svg b/skins/metrixhd/themes/default/icons/ico_switchtimer.svg new file mode 100644 index 0000000..5e2da04 --- /dev/null +++ b/skins/metrixhd/themes/default/icons/ico_switchtimer.svg @@ -0,0 +1,76 @@ + + + + + + + + + + image/svg+xml + + + + + + + + Switch + + diff --git a/skins/metrixhd/themes/default/theme.xml b/skins/metrixhd/themes/default/theme.xml index 9c65d2a..7822178 100644 --- a/skins/metrixhd/themes/default/theme.xml +++ b/skins/metrixhd/themes/default/theme.xml @@ -10,6 +10,7 @@ FF5FE200 FFE2DA00 FF007FE2 + FF000000 C0000000 D0000000 FF1E8BD7 @@ -17,6 +18,7 @@ C0FFFFFF FFFFFFFF FF14141E + 55FF0000 00000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/metrixhd/xmlfiles/plug-tvguideng-recmenu.xml b/skins/metrixhd/xmlfiles/plug-tvguideng-recmenu.xml new file mode 100644 index 0000000..03ae66f --- /dev/null +++ b/skins/metrixhd/xmlfiles/plug-tvguideng-recmenu.xml @@ -0,0 +1,452 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/metrixhd/xmlfiles/plug-tvguideng-root.xml b/skins/metrixhd/xmlfiles/plug-tvguideng-root.xml new file mode 100644 index 0000000..5de0069 --- /dev/null +++ b/skins/metrixhd/xmlfiles/plug-tvguideng-root.xml @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/nopacity/themes/darkred/icons/ico_arrow_left.png b/skins/nopacity/themes/darkred/icons/ico_arrow_left.png new file mode 100644 index 0000000..57800c7 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_arrow_left.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_arrow_right.png b/skins/nopacity/themes/darkred/icons/ico_arrow_right.png new file mode 100644 index 0000000..ea45f3a Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_arrow_right.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_delete_active.png b/skins/nopacity/themes/darkred/icons/ico_delete_active.png new file mode 100644 index 0000000..f473717 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_delete_active.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_delete_inactive.png b/skins/nopacity/themes/darkred/icons/ico_delete_inactive.png new file mode 100644 index 0000000..21b0a88 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_delete_inactive.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_edit_active.png b/skins/nopacity/themes/darkred/icons/ico_edit_active.png new file mode 100644 index 0000000..ec39699 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_edit_active.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_edit_inactive.png b/skins/nopacity/themes/darkred/icons/ico_edit_inactive.png new file mode 100644 index 0000000..71f016c Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_edit_inactive.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_info_active.png b/skins/nopacity/themes/darkred/icons/ico_info_active.png new file mode 100644 index 0000000..c88f76d Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_info_active.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_info_inactive.png b/skins/nopacity/themes/darkred/icons/ico_info_inactive.png new file mode 100644 index 0000000..37eeed2 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_info_inactive.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_rec_on.svg b/skins/nopacity/themes/darkred/icons/ico_rec_on.svg new file mode 100644 index 0000000..91b3e31 --- /dev/null +++ b/skins/nopacity/themes/darkred/icons/ico_rec_on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/skins/nopacity/themes/darkred/icons/ico_record_active.png b/skins/nopacity/themes/darkred/icons/ico_record_active.png new file mode 100644 index 0000000..476da99 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_record_active.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_record_inactive.png b/skins/nopacity/themes/darkred/icons/ico_record_inactive.png new file mode 100644 index 0000000..2a91da3 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_record_inactive.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_search_active.png b/skins/nopacity/themes/darkred/icons/ico_search_active.png new file mode 100644 index 0000000..7bf7bc7 Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_search_active.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_search_inactive.png b/skins/nopacity/themes/darkred/icons/ico_search_inactive.png new file mode 100644 index 0000000..4a210bb Binary files /dev/null and b/skins/nopacity/themes/darkred/icons/ico_search_inactive.png differ diff --git a/skins/nopacity/themes/darkred/icons/ico_switchtimer.svg b/skins/nopacity/themes/darkred/icons/ico_switchtimer.svg new file mode 100644 index 0000000..f3ef884 --- /dev/null +++ b/skins/nopacity/themes/darkred/icons/ico_switchtimer.svg @@ -0,0 +1,93 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_button.png b/skins/nopacity/themes/darkred/skinparts/tvguide_button.png new file mode 100644 index 0000000..7234f08 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_button.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_button_active.png b/skins/nopacity/themes/darkred/skinparts/tvguide_button_active.png new file mode 100644 index 0000000..ba09ea0 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_button_active.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_bottom.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_bottom.png new file mode 100644 index 0000000..7127ea7 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_bottom.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_head.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_head.png new file mode 100644 index 0000000..bce9d22 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_head.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_horizontal.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_horizontal.png new file mode 100644 index 0000000..13d733c Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_horizontal.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_left.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_left.png new file mode 100644 index 0000000..df495b1 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_left.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_right.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_right.png new file mode 100644 index 0000000..42dcf6d Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_right.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_vertical.png new file mode 100644 index 0000000..43778d0 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channelgroup_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channellogoback_horizontal.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channellogoback_horizontal.png new file mode 100644 index 0000000..d9bb54a Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channellogoback_horizontal.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_channellogoback_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_channellogoback_vertical.png new file mode 100644 index 0000000..06684cc Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_channellogoback_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_clock.png b/skins/nopacity/themes/darkred/skinparts/tvguide_clock.png new file mode 100644 index 0000000..2e8686e Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_clock.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_date_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_date_vertical.png new file mode 100644 index 0000000..58a72e4 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_date_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_bottom.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_bottom.png new file mode 100644 index 0000000..08de467 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_bottom.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_head.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_head.png new file mode 100644 index 0000000..060a908 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_head.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_horizontal.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_horizontal.png new file mode 100644 index 0000000..9319d6b Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_horizontal.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_left.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_left.png new file mode 100644 index 0000000..7852d94 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_left.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_right.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_right.png new file mode 100644 index 0000000..73dfbd0 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_right.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_vertical.png new file mode 100644 index 0000000..6d96d34 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_active_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_bottom.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_bottom.png new file mode 100644 index 0000000..82c20c4 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_bottom.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_head.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_head.png new file mode 100644 index 0000000..f434c11 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_head.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_horizontal.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_horizontal.png new file mode 100644 index 0000000..6f28550 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_horizontal.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_left.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_left.png new file mode 100644 index 0000000..df80f91 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_left.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_right.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_right.png new file mode 100644 index 0000000..d39470f Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_right.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_grid_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_vertical.png new file mode 100644 index 0000000..6ad219d Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_grid_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_header.png b/skins/nopacity/themes/darkred/skinparts/tvguide_header.png new file mode 100644 index 0000000..56a60a7 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_header.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_timelinebright_horizontal.png b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinebright_horizontal.png new file mode 100644 index 0000000..9240b37 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinebright_horizontal.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_timelinebright_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinebright_vertical.png new file mode 100644 index 0000000..dfa06c9 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinebright_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_timelinedark_horizontal.png b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinedark_horizontal.png new file mode 100644 index 0000000..4364677 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinedark_horizontal.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_timelinedark_vertical.png b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinedark_vertical.png new file mode 100644 index 0000000..5466546 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_timelinedark_vertical.png differ diff --git a/skins/nopacity/themes/darkred/skinparts/tvguide_tvframe.png b/skins/nopacity/themes/darkred/skinparts/tvguide_tvframe.png new file mode 100644 index 0000000..261fea3 Binary files /dev/null and b/skins/nopacity/themes/darkred/skinparts/tvguide_tvframe.png differ diff --git a/skins/nopacity/themes/darkred/theme.xml b/skins/nopacity/themes/darkred/theme.xml index 56b7df4..a1d3eea 100644 --- a/skins/nopacity/themes/darkred/theme.xml +++ b/skins/nopacity/themes/darkred/theme.xml @@ -15,6 +15,7 @@ FF2B0000 FF858585 B0000000 + FF000000 99000000 DF000000 99FF0000 diff --git a/skins/nopacity/themes/default/icons/ico_arrow_left.png b/skins/nopacity/themes/default/icons/ico_arrow_left.png new file mode 100644 index 0000000..57800c7 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_arrow_left.png differ diff --git a/skins/nopacity/themes/default/icons/ico_arrow_right.png b/skins/nopacity/themes/default/icons/ico_arrow_right.png new file mode 100644 index 0000000..ea45f3a Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_arrow_right.png differ diff --git a/skins/nopacity/themes/default/icons/ico_delete_active.png b/skins/nopacity/themes/default/icons/ico_delete_active.png new file mode 100644 index 0000000..f473717 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_delete_active.png differ diff --git a/skins/nopacity/themes/default/icons/ico_delete_inactive.png b/skins/nopacity/themes/default/icons/ico_delete_inactive.png new file mode 100644 index 0000000..21b0a88 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_delete_inactive.png differ diff --git a/skins/nopacity/themes/default/icons/ico_edit_active.png b/skins/nopacity/themes/default/icons/ico_edit_active.png new file mode 100644 index 0000000..ec39699 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_edit_active.png differ diff --git a/skins/nopacity/themes/default/icons/ico_edit_inactive.png b/skins/nopacity/themes/default/icons/ico_edit_inactive.png new file mode 100644 index 0000000..71f016c Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_edit_inactive.png differ diff --git a/skins/nopacity/themes/default/icons/ico_info_active.png b/skins/nopacity/themes/default/icons/ico_info_active.png new file mode 100644 index 0000000..c88f76d Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_info_active.png differ diff --git a/skins/nopacity/themes/default/icons/ico_info_inactive.png b/skins/nopacity/themes/default/icons/ico_info_inactive.png new file mode 100644 index 0000000..37eeed2 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_info_inactive.png differ diff --git a/skins/nopacity/themes/default/icons/ico_no.png b/skins/nopacity/themes/default/icons/ico_no.png new file mode 100644 index 0000000..47cdba0 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_no.png differ diff --git a/skins/nopacity/themes/default/icons/ico_rec_on.svg b/skins/nopacity/themes/default/icons/ico_rec_on.svg new file mode 100644 index 0000000..91b3e31 --- /dev/null +++ b/skins/nopacity/themes/default/icons/ico_rec_on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/skins/nopacity/themes/default/icons/ico_record_active.png b/skins/nopacity/themes/default/icons/ico_record_active.png new file mode 100644 index 0000000..476da99 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_record_active.png differ diff --git a/skins/nopacity/themes/default/icons/ico_record_inactive.png b/skins/nopacity/themes/default/icons/ico_record_inactive.png new file mode 100644 index 0000000..2a91da3 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_record_inactive.png differ diff --git a/skins/nopacity/themes/default/icons/ico_search_active.png b/skins/nopacity/themes/default/icons/ico_search_active.png new file mode 100644 index 0000000..7bf7bc7 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_search_active.png differ diff --git a/skins/nopacity/themes/default/icons/ico_search_inactive.png b/skins/nopacity/themes/default/icons/ico_search_inactive.png new file mode 100644 index 0000000..4a210bb Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_search_inactive.png differ diff --git a/skins/nopacity/themes/default/icons/ico_switchtimer.svg b/skins/nopacity/themes/default/icons/ico_switchtimer.svg new file mode 100644 index 0000000..f3ef884 --- /dev/null +++ b/skins/nopacity/themes/default/icons/ico_switchtimer.svg @@ -0,0 +1,93 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/skins/nopacity/themes/default/icons/ico_yes.png b/skins/nopacity/themes/default/icons/ico_yes.png new file mode 100644 index 0000000..2f1af98 Binary files /dev/null and b/skins/nopacity/themes/default/icons/ico_yes.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_button.png b/skins/nopacity/themes/default/skinparts/tvguide_button.png new file mode 100644 index 0000000..7a43e01 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_button.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_button_active.png b/skins/nopacity/themes/default/skinparts/tvguide_button_active.png new file mode 100644 index 0000000..22d167e Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_button_active.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_bottom.png b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_bottom.png new file mode 100644 index 0000000..c37ba42 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_bottom.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_head.png b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_head.png new file mode 100644 index 0000000..75ee8a8 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_head.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_horizontal.png b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_horizontal.png new file mode 100644 index 0000000..ead7606 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_horizontal.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_left.png b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_left.png new file mode 100644 index 0000000..30e1b45 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_left.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_right.png b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_right.png new file mode 100644 index 0000000..d89657c Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_right.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_vertical.png new file mode 100644 index 0000000..64134c7 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channelgroup_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channellogoback_horizontal.png b/skins/nopacity/themes/default/skinparts/tvguide_channellogoback_horizontal.png new file mode 100644 index 0000000..2df7f52 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channellogoback_horizontal.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_channellogoback_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_channellogoback_vertical.png new file mode 100644 index 0000000..669beeb Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_channellogoback_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_clock.png b/skins/nopacity/themes/default/skinparts/tvguide_clock.png new file mode 100644 index 0000000..3df1dae Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_clock.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_date_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_date_vertical.png new file mode 100644 index 0000000..58a72e4 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_date_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_active_bottom.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_bottom.png new file mode 100644 index 0000000..28fb443 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_bottom.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_active_head.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_head.png new file mode 100644 index 0000000..a494d95 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_head.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_active_horizontal.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_horizontal.png new file mode 100644 index 0000000..368309f Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_horizontal.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_active_left.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_left.png new file mode 100644 index 0000000..0548e21 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_left.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_active_right.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_right.png new file mode 100644 index 0000000..2aee1d6 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_right.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_active_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_vertical.png new file mode 100644 index 0000000..6aba9d1 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_active_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_bottom.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_bottom.png new file mode 100644 index 0000000..e90e05e Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_bottom.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_head.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_head.png new file mode 100644 index 0000000..4196cd8 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_head.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_horizontal.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_horizontal.png new file mode 100644 index 0000000..6bccb3f Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_horizontal.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_left.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_left.png new file mode 100644 index 0000000..7b17046 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_left.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_right.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_right.png new file mode 100644 index 0000000..17fe003 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_right.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_grid_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_grid_vertical.png new file mode 100644 index 0000000..e7192ac Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_grid_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_header.png b/skins/nopacity/themes/default/skinparts/tvguide_header.png new file mode 100644 index 0000000..24fd20c Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_header.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_timelinebright_horizontal.png b/skins/nopacity/themes/default/skinparts/tvguide_timelinebright_horizontal.png new file mode 100644 index 0000000..9240b37 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_timelinebright_horizontal.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_timelinebright_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_timelinebright_vertical.png new file mode 100644 index 0000000..5466546 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_timelinebright_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_timelinedark_horizontal.png b/skins/nopacity/themes/default/skinparts/tvguide_timelinedark_horizontal.png new file mode 100644 index 0000000..4364677 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_timelinedark_horizontal.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_timelinedark_vertical.png b/skins/nopacity/themes/default/skinparts/tvguide_timelinedark_vertical.png new file mode 100644 index 0000000..dfa06c9 Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_timelinedark_vertical.png differ diff --git a/skins/nopacity/themes/default/skinparts/tvguide_tvframe.png b/skins/nopacity/themes/default/skinparts/tvguide_tvframe.png new file mode 100644 index 0000000..cdb800c Binary files /dev/null and b/skins/nopacity/themes/default/skinparts/tvguide_tvframe.png differ diff --git a/skins/nopacity/themes/default/theme.xml b/skins/nopacity/themes/default/theme.xml index 82c075c..36af8e4 100644 --- a/skins/nopacity/themes/default/theme.xml +++ b/skins/nopacity/themes/default/theme.xml @@ -15,6 +15,7 @@ FF4C5C11 FF858585 B012273F + FF12273F 99000000 CC000000 99FF0000 diff --git a/skins/nopacity/xmlfiles/plug-tvguideng-detail.xml b/skins/nopacity/xmlfiles/plug-tvguideng-detail.xml new file mode 100644 index 0000000..2ad6b76 --- /dev/null +++ b/skins/nopacity/xmlfiles/plug-tvguideng-detail.xml @@ -0,0 +1,386 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/nopacity/xmlfiles/plug-tvguideng-recmenu.xml b/skins/nopacity/xmlfiles/plug-tvguideng-recmenu.xml new file mode 100644 index 0000000..01bedda --- /dev/null +++ b/skins/nopacity/xmlfiles/plug-tvguideng-recmenu.xml @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skins/nopacity/xmlfiles/plug-tvguideng-root.xml b/skins/nopacity/xmlfiles/plug-tvguideng-root.xml new file mode 100644 index 0000000..b071037 --- /dev/null +++ b/skins/nopacity/xmlfiles/plug-tvguideng-root.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/views/displaymessageview.c b/views/displaymessageview.c index c1ffe47..b51802b 100644 --- a/views/displaymessageview.c +++ b/views/displaymessageview.c @@ -18,6 +18,9 @@ bool cDisplayMessageView::createOsd(void) { cOsd::OsdTop() + osdSize.Y(), osdSize.Width(), osdSize.Height()); + if (!ok) { + DeleteOsdOnExit(false); + } return ok; } diff --git a/views/displaypluginview.c b/views/displaypluginview.c index 89ff94c..f3471cb 100644 --- a/views/displaypluginview.c +++ b/views/displaypluginview.c @@ -1,17 +1,26 @@ #define __STL_CONFIG_H #include "displaypluginview.h" -cDisplayPluginView::cDisplayPluginView(cTemplateView *tmplView) : cView(tmplView) { +cDisplayPluginView::cDisplayPluginView(cTemplateView *tmplView, bool isRootView) : cView(tmplView) { + init = true; + tabInit = true; + tabScrolled = true; + hidden = false; intTokens = NULL; stringTokens = NULL; loopTokens = NULL; - DeleteOsdOnExit(); + currentTmplTab = NULL; + tabView = NULL; + if (isRootView) + DeleteOsdOnExit(); SetFadeTime(tmplView->GetNumericParameter(ptFadeTime)); } cDisplayPluginView::~cDisplayPluginView() { CancelSave(); FadeOut(); + if (tabView) + delete tabView; } bool cDisplayPluginView::createOsd(void) { @@ -23,10 +32,49 @@ bool cDisplayPluginView::createOsd(void) { return ok; } +void cDisplayPluginView::Deactivate(bool hide) { + Stop(); + if (!hide) + return; + HidePixmaps(); + for (map< int, cViewGrid* >::iterator it = viewGrids.begin(); it != viewGrids.end(); it++) { + cViewGrid *viewGrid = it->second; + viewGrid->Hide(); + } + hidden = true; +} + +void cDisplayPluginView::Activate(void) { + if (tvScaled) { + cDevice::PrimaryDevice()->ScaleVideo(scalingWindow); + } + if (hidden) { + ShowPixmaps(); + for (map< int, cViewGrid* >::iterator it = viewGrids.begin(); it != viewGrids.end(); it++) { + cViewGrid *viewGrid = it->second; + viewGrid->Show(); + } + } + Start(); +} + +void cDisplayPluginView::CleanViewElement(int id) { + if (ViewElementScrolls((eViewElement)id)) { + currentlyScrolling = false; + if (Running()) + Stop(); + DestroyViewElement((eViewElement)id); + } else { + ClearViewElement((eViewElement)id); + } +} + void cDisplayPluginView::DisplayViewElement(int id) { if (!intTokens || !stringTokens || !loopTokens) return; DrawViewElement((eViewElement)id, stringTokens, intTokens, loopTokens); + if (!init && ViewElementScrolls((eViewElement)id)) + Start(); } void cDisplayPluginView::InitGrids(int viewGridID) { @@ -75,9 +123,162 @@ void cDisplayPluginView::ClearGrids(int viewGridID) { (hit->second)->Clear(); } +void cDisplayPluginView::SetTabIntTokens(map *intTokens) { + tabIntTokens = *intTokens; +} + +void cDisplayPluginView::SetTabStringTokens(map *stringTokens) { + tabStringTokens = *stringTokens; +} + +void cDisplayPluginView::SetTabLoopTokens(map > > *loopTokens) { + tabLoopTokens = *loopTokens; +} + +void cDisplayPluginView::SetTabs(void) { + tmplView->InitViewTabIterator(); + cTemplateViewTab *tmplTab = NULL; + while(tmplTab = tmplView->GetNextViewTab()) { + tmplTab->ParseDynamicParameters(&tabIntTokens, true); + tmplTab->ClearDynamicFunctionParameters(); + tmplTab->ParseDynamicFunctionParameters(&tabStringTokens, &tabIntTokens); + if (tmplTab->DoExecute()) { + activeTabs.push_back(tmplTab); + } + } + atIt = activeTabs.begin(); +} + +void cDisplayPluginView::TabLeft(void) { + if (activeTabs.size() > 1) { + currentTmplTab = GetPrevTab(); + delete tabView; + tabView = NULL; + tabScrolled = true; + } else { + tabScrolled = tabView->KeyLeft(); + } +} + +void cDisplayPluginView::TabRight(void) { + if (activeTabs.size() > 1) { + currentTmplTab = GetNextTab(); + delete tabView; + tabView = NULL; + tabScrolled = true; + } else { + tabScrolled = tabView->KeyRight(); + } +} + +void cDisplayPluginView::TabUp(void) { + tabScrolled = tabView->KeyUp(); +} + +void cDisplayPluginView::TabDown(void) { + tabScrolled = tabView->KeyDown(); +} + +void cDisplayPluginView::DisplayTab(void) { + if (tabInit) { + currentTmplTab = *atIt; + tabInit = false; + } + if (!tabView) { + tabView = new cDisplayMenuTabView(currentTmplTab); + tabView->SetTokens(&tabIntTokens, &tabStringTokens, &tabLoopTokens); + tabView->CreateTab(); + tabView->Start(); + DrawTabLabels(); + } + if (tabScrolled) { + DrawScrollbar(); + } +} + +cTemplateViewTab *cDisplayPluginView::GetPrevTab(void) { + if (atIt == activeTabs.begin()) { + atIt = activeTabs.end(); + } + atIt--; + return *atIt; +} + +cTemplateViewTab *cDisplayPluginView::GetNextTab(void) { + atIt++; + if (atIt == activeTabs.end()) { + atIt = activeTabs.begin(); + } + return *atIt; +} + +void cDisplayPluginView::DrawScrollbar(void) { + map < string, string > scrollbarStringTokens; + map < string, int > scrollbarIntTokens; + + int barTop = 0; + int barHeight = 0; + tabView->GetScrollbarPosition(barTop, barHeight); + + scrollbarIntTokens.insert(pair("height", barHeight)); + scrollbarIntTokens.insert(pair("offset", barTop)); + ClearViewElement((eViewElement)pveScrollbar); + DrawViewElement((eViewElement)pveScrollbar, &scrollbarStringTokens, &scrollbarIntTokens); +} + +void cDisplayPluginView::DrawTabLabels(void) { + if (!ViewElementImplemented((eViewElement)pveTablabels)) { + return; + } + map < string, string > labelStringTokens; + map < string, int > labelIntTokens; + map < string, vector< map< string, string > > > labelLoopTokens; + + string labelPrev = ""; + string labelPrevTemp = ""; + string labelCurrent = ""; + string labelNext = ""; + bool wasCurrent = false; + vector< map< string, string > > tabLabels; + for (list::iterator it = activeTabs.begin(); it != activeTabs.end(); it++) { + cTemplateViewTab *tab = *it; + map< string, string > tabLabel; + tabLabel.insert(pair< string, string >("tabs[title]", tab->GetName())); + if (wasCurrent) { + labelNext = tab->GetName(); + } + if (tab == currentTmplTab) { + wasCurrent = true; + labelCurrent = tab->GetName(); + labelPrev = labelPrevTemp; + tabLabel.insert(pair< string, string >("tabs[current]", "1")); + } else { + wasCurrent = false; + tabLabel.insert(pair< string, string >("tabs[current]", "0")); + } + labelPrevTemp = tab->GetName(); + tabLabels.push_back(tabLabel); + } + if (labelNext.size() == 0 && activeTabs.size() > 0) { + cTemplateViewTab *firstTab = activeTabs.front(); + labelNext = firstTab->GetName(); + } + if (labelPrev.size() == 0 && activeTabs.size() > 0) { + cTemplateViewTab *lastTab = activeTabs.back(); + labelPrev = lastTab->GetName(); + } + labelStringTokens.insert(pair< string, string >("currenttab", labelCurrent)); + labelStringTokens.insert(pair< string, string >("nexttab", labelNext)); + labelStringTokens.insert(pair< string, string >("prevtab", labelPrev)); + labelLoopTokens.insert(pair< string, vector< map< string, string > > >("tabs", tabLabels)); + + ClearViewElement((eViewElement)pveTablabels); + DrawViewElement((eViewElement)pveTablabels, &labelStringTokens, &labelIntTokens, &labelLoopTokens); +} + void cDisplayPluginView::Action(void) { SetInitFinished(); FadeIn(); DoFlush(); cView::Action(); -} +} \ No newline at end of file diff --git a/views/displaypluginview.h b/views/displaypluginview.h index b170116..b3307a6 100644 --- a/views/displaypluginview.h +++ b/views/displaypluginview.h @@ -1,25 +1,45 @@ #ifndef __DISPLAYPLUGINVIEW_H #define __DISPLAYPLUGINVIEW_H +#include #include #include "../libtemplate/template.h" #include "view.h" #include "viewgrid.h" +#include "displaymenutabview.h" class cDisplayPluginView : public cView { private: + bool init; + bool tabInit; + bool tabScrolled; + bool hidden; map *intTokens; map *stringTokens; map > > *loopTokens; map< int, cViewGrid* > viewGrids; + map tabIntTokens; + map tabStringTokens; + map > > tabLoopTokens; + cTemplateViewTab *currentTmplTab; + list activeTabs; + list::iterator atIt; + cDisplayMenuTabView *tabView; + cTemplateViewTab *GetPrevTab(void); + cTemplateViewTab *GetNextTab(void); + void DrawScrollbar(void); + void DrawTabLabels(void); virtual void Action(void); public: - cDisplayPluginView(cTemplateView *tmplView); + cDisplayPluginView(cTemplateView *tmplView, bool isRootView); virtual ~cDisplayPluginView(); bool createOsd(void); + void Deactivate(bool hide); + void Activate(void); void SetIntTokens(map *intTokens) { this->intTokens = intTokens; }; void SetStringTokens(map *stringTokens) { this->stringTokens = stringTokens; }; void SetLoopTokens(map > > *loopTokens) { this->loopTokens = loopTokens; }; + void CleanViewElement(int id); void DisplayViewElement(int id); void InitGrids(int viewGridID); void SetGrid(int viewGridID, long gridID, double x, double y, double width, double height, map *intTokens, map *stringTokens); @@ -27,7 +47,16 @@ public: void DeleteGrid(int viewGridID, long gridID); void DisplayGrids(int viewGridID); void ClearGrids(int viewGridID); - void DoStart(void) { Start(); }; + void SetTabIntTokens(map *intTokens); + void SetTabStringTokens(map *stringTokens); + void SetTabLoopTokens(map > > *loopTokens); + void SetTabs(void); + void TabLeft(void); + void TabRight(void); + void TabUp(void); + void TabDown(void); + void DisplayTab(void); + void DoStart(void) { init = false; Start(); }; void Flush(void) { DoFlush(); }; }; #endif //__DISPLAYPLUGINVIEW_H diff --git a/views/view.c b/views/view.c index 1571d2e..9e5a53a 100644 --- a/views/view.c +++ b/views/view.c @@ -16,7 +16,7 @@ cView::cView(cTemplateView *tmplView) : cPixmapContainer(tmplView->GetNumPixmaps Init(); } -cView::cView(cTemplateViewElement *tmplItem) : cPixmapContainer(tmplItem->GetNumPixmaps()) { +cView::cView(cTemplateViewElement *tmplItem) : cPixmapContainer(tmplItem ? tmplItem->GetNumPixmaps() : 0) { this->tmplItem = tmplItem; tmplView = NULL; tmplTab = NULL; @@ -164,6 +164,23 @@ void cView::ClearViewElement(eViewElement ve) { } } +void cView::DestroyViewElement(eViewElement ve) { + if (!tmplView) + return; + cTemplateViewElement *viewElement = tmplView->GetViewElement(ve); + if (!viewElement) + return; + int pixCurrent = viewElement->GetPixOffset(); + if (pixCurrent < 0) + return; + cTemplatePixmap *pix = NULL; + viewElement->InitIterator(); + while(pix = viewElement->GetNextPixmap()) { + DestroyPixmap(pixCurrent); + pixCurrent++; + } +} + void cView::ActivateScrolling(void) { if (veScroll == veUndefined) return; @@ -192,6 +209,22 @@ bool cView::ViewElementImplemented(eViewElement ve) { return tmplView->GetNumPixmapsViewElement(ve); } +bool cView::ViewElementScrolls(eViewElement ve) { + if (scrollingPix < 0) + return false; + if (!tmplView) + return false; + cTemplateViewElement *viewElement = tmplView->GetViewElement(ve); + if (!viewElement) + return false; + int pixStart = viewElement->GetPixOffset(); + int numPixmaps = viewElement->GetNumPixmaps(); + if ( (scrollingPix >= pixStart) && (scrollingPix < (pixStart + numPixmaps)) ) + return true; + return false; +} + + void cView::CreateViewPixmap(int num, cTemplatePixmap *pix, cRect *size) { cRect pixSize; if (size) { @@ -236,6 +269,9 @@ void cView::DrawPixmap(int num, cTemplatePixmap *pix, map < string, vector< map< case ftDrawText: DoDrawText(num, func); break; + case ftDrawTextVertical: + DoDrawTextVertical(num, func); + break; case ftDrawTextBox: { int floating = func->GetNumericParameter(ptFloat); if (floating > flNone) { @@ -438,6 +474,53 @@ void cView::DoDrawText(int num, cTemplateFunction *func, int x0, int y0) { DrawText(num, pos, text.c_str(), clr, clrBack, fontName, fontSize); } +void cView::DoDrawTextVertical(int num, cTemplateFunction *func, int x0, int y0) { + string fontName = func->GetFontName(); + int fontSize = func->GetNumericParameter(ptFontSize); + tColor clr = func->GetColorParameter(ptColor); + tColor clrBack = clrTransparent; + string text = func->GetText(false); + cImage *textVertical = imgCache->GetVerticalText(text, clr, fontName, fontSize); + if (!textVertical) + return; + + //align has to be set here because here we know the image size + int x = 0; + int y = 0; + int align = func->GetNumericParameter(ptAlign); + if (align == alCenter) { + int containerWidth = func->GetContainerWidth(); + x = (containerWidth - textVertical->Width()) / 2; + } else if (align == alLeft) { + x = 0; + } else if (align = alRight) { + int containerWidth = func->GetContainerWidth(); + x = (containerWidth - textVertical->Width()); + } else { + x = func->GetNumericParameter(ptX); + } + + int valign = func->GetNumericParameter(ptValign); + if (valign == alCenter) { + int containerHeight = func->GetContainerHeight(); + y = (containerHeight - textVertical->Height()) / 2; + } else if (align == alTop) { + y = 0; + } else if (align = alBottom) { + int containerHeight = func->GetContainerHeight(); + y = (containerHeight - textVertical->Height()); + } else { + y = func->GetNumericParameter(ptY); + } + + if (x < 0) x = 0; + x += x0; + if (y < 0) y = func->GetContainerHeight() - textVertical->Height() - 5; + y += y0; + cPoint pos(x,y); + DrawImage(num, pos, *textVertical); +} + void cView::DoDrawTextBox(int num, cTemplateFunction *func, int x0, int y0) { string text = func->GetText(false); if (text.size() < 3) @@ -858,17 +941,22 @@ cGrid::~cGrid() { void cGrid::Set(double x, double y, double width, double height, map *intTokens, map *stringTokens) { + if ((width != this->width) || (height != this->height)) { + this->width = width; + this->height = height; resized = true; dirty = false; } else { resized = false; } - this->x = x; - this->y = y; - this->width = width; - this->height = height; - moved = true; + if (this->x != x || this->y != y) { + this->x = x; + this->y = y; + moved = true; + } else { + moved = false; + } if (intTokens) { this->intTokens = *intTokens; SetCurrent(current); @@ -889,6 +977,8 @@ void cGrid::SetCurrent(bool current) { } void cGrid::Move(void) { + if (!tmplItem) + return; tmplItem->InitIterator(); cTemplatePixmap *pix = NULL; int pixCurrent = 0; @@ -905,6 +995,8 @@ void cGrid::Move(void) { } void cGrid::Draw(void) { + if (!tmplItem) + return; if (tmplItem->DebugTokens()) { DebugTokens("Grid", &stringTokens, &intTokens); } diff --git a/views/view.h b/views/view.h index 7b5bd9b..77ad318 100644 --- a/views/view.h +++ b/views/view.h @@ -13,6 +13,7 @@ private: void Init(void); void DoFill(int num, cTemplateFunction *func); void DoDrawText(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0); + void DoDrawTextVertical(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0); void DoDrawTextBox(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0); void DoDrawFloatingTextBox(int num, cTemplateFunction *func); void DoDrawRectangle(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0); @@ -40,7 +41,9 @@ protected: int scrollSpeed; void DrawViewElement(eViewElement ve, map *stringTokens = NULL, map *intTokens = NULL, map < string, vector< map< string, string > > > *loopTokens = NULL); void ClearViewElement(eViewElement ve); + void DestroyViewElement(eViewElement ve); bool ViewElementImplemented(eViewElement ve); + bool ViewElementScrolls(eViewElement ve); void CreateViewPixmap(int num, cTemplatePixmap *pix, cRect *size = NULL); void CreateScrollingPixmap(int num, cTemplatePixmap *pix, cSize &drawportSize); void DrawPixmap(int num, cTemplatePixmap *pix, map < string, vector< map< string, string > > > *loopTokens = NULL, bool flushPerLoop = false); diff --git a/views/viewgrid.c b/views/viewgrid.c index 6488ccd..008133e 100644 --- a/views/viewgrid.c +++ b/views/viewgrid.c @@ -25,7 +25,6 @@ void cViewGrid::SetGrid(long gridID, } void cViewGrid::SetCurrent(long gridID, bool current) { - esyslog("skindesigner: setting %ld to current %d", gridID, current); map::iterator hit = grids.find(gridID); if (hit != grids.end()) (hit->second)->SetCurrent(current); @@ -35,7 +34,6 @@ void cViewGrid::Delete(long gridID) { map::iterator hit = grids.find(gridID); if (hit == grids.end()) return; - esyslog("skindesigner: deleting grid %ld", gridID); delete (hit->second); grids.erase(gridID); } @@ -47,28 +45,43 @@ void cViewGrid::Clear(void) { } void cViewGrid::Render(void) { - esyslog("skindesigner: rendering %ld grids", grids.size()); for (map < long, cGrid* >::iterator it = grids.begin(); it != grids.end(); it++) { cGrid *grid = it->second; if (grid->Dirty()) { if (grid->Moved()) { - grid->DeletePixmaps(); + grid->Move(); } - esyslog("skindesigner: rendering grid %ld", it->first); + grid->Clear(); + //esyslog("skindesigner: rendering grid %ld", it->first); grid->Draw(); } else if (grid->Resized()) { - esyslog("skindesigner: resizing grid %ld", it->first); + //esyslog("skindesigner: resizing grid %ld", it->first); grid->DeletePixmaps(); grid->Draw(); } else if (grid->Moved()) { - esyslog("skindesigner: moving grid %ld", it->first); - grid->Move(); + //esyslog("skindesigner: moving grid %ld", it->first); + grid->Move(); } else { - esyslog("skindesigner: skipping grid %ld", it->first); + //esyslog("skindesigner: skipping grid %ld", it->first); } } } +void cViewGrid::Hide(void) { + for (map < long, cGrid* >::iterator it = grids.begin(); it != grids.end(); it++) { + cGrid *grid = it->second; + grid->HidePixmaps(); + } +} + +void cViewGrid::Show(void) { + for (map < long, cGrid* >::iterator it = grids.begin(); it != grids.end(); it++) { + cGrid *grid = it->second; + grid->ShowPixmaps(); + } +} + + void cViewGrid::Debug(void) { } \ No newline at end of file diff --git a/views/viewgrid.h b/views/viewgrid.h index 84209c3..0fc11f6 100644 --- a/views/viewgrid.h +++ b/views/viewgrid.h @@ -20,6 +20,8 @@ public: void Delete(long gridID); void Clear(void); void Render(void); + void Hide(void); + void Show(void); void Debug(void); };