]> git.vomp.tv Git - vompclient.git/commitdiff
Added basic skinning support and a new different looking skin, additionally some...
authorMarten Richter <marten.richter@freenet.de>
Sat, 4 Oct 2014 17:53:28 +0000 (19:53 +0200)
committerMarten Richter <marten.richter@freenet.de>
Sat, 4 Oct 2014 17:53:28 +0000 (19:53 +0200)
20 files changed:
GNUmakefile
colour.cc
colour.h
command.cc
command.h
objects.mk
osdopenvg.cc
surface.cc
surface.h
vdr.cc
vdr.h
vdrcommand.h
vepglistadvanced.cc
vopts.cc
vvideolivetv.cc
vvideolivetv.h
vwelcome.cc
wprogressbar.cc
wselectlist.cc
wtabbar.cc

index b27c5a53a77385fb276ed4fdc400cfa1a2ffee05..26c9621629bee1cb2af85a75de0b60d18b8eda34 100644 (file)
@@ -52,7 +52,11 @@ $(info MVP flags)
 LDFLAGS = -Wall -static
 LIBS = -lpthread -lrt
 
-OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o wjpegcomplex.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o 
+OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o \
+           surfacemvp.o fonts/helvB24.o fonts/helvB18.o   wjpegcomplex.o vmedialist.o vcolourtuner.o \
+           audioplayer.o demuxeraudio.o \
+           vmediaview.o vvideomedia.o imagereader.o  media.o  mediaoptions.o mediaplayer.o  serialize.o \
+           localmediafile.o   playermedia.o demuxermedia.o mediafile.o
 TIOBJECT = ticonfig.o
 CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a
 INCLUDES = -I../jpeg/jpeg-6b  -DVOMP_PLATTFORM_MVP 
index 05e6f24338eab68e6ebe7e1b11d3867ead635161..78dbe1e3dc31b057a44cbda699cfbb8860630e1f 100644 (file)
--- a/colour.cc
+++ b/colour.cc
@@ -19,7 +19,7 @@
 */
 
 #include "colour.h"
-
+#include "defines.h"
 
 DrawStyle DrawStyle::BLACK(0, 0, 0);
 DrawStyle DrawStyle::RED(255, 0, 0);
@@ -28,23 +28,58 @@ DrawStyle DrawStyle::GREY(180, 180, 180);
 DrawStyle DrawStyle::DARKGREY(100, 100, 100);
 DrawStyle DrawStyle::BLUE(0, 0, 255);
 DrawStyle DrawStyle::YELLOW(255, 255, 0);
-DrawStyle DrawStyle::VIDEOBLUE(0, 0, 150);
 DrawStyle DrawStyle::VIEWBACKGROUND(0, 0, 100);
 DrawStyle DrawStyle::VIEWTRANSPARENTBACKGROUND(0, 0, 100, 128);
 DrawStyle DrawStyle::TABVIEWBACKGROUND(0, 0, 120);
 DrawStyle DrawStyle::TITLEBARBACKGROUND(0, 0, 200);
 DrawStyle DrawStyle::SELECTHIGHLIGHT(240, 250, 80);
+DrawStyle DrawStyle::LIVETVSYMBOLS(240, 250, 80);
 DrawStyle DrawStyle::SELECTDARKHIGHLIGHT(120, 125, 40);
+DrawStyle DrawStyle::SELECTBACKGROUND(0, 0, 100);
+DrawStyle DrawStyle::PROGRESSBAR(255, 255, 255);
 DrawStyle DrawStyle::LIGHTTEXT(255, 255, 255);
 DrawStyle DrawStyle::DARKTEXT(0, 0, 100);
 DrawStyle DrawStyle::DANGER(200, 0, 0);
+DrawStyle DrawStyle::OSDBACKGROUND(0,0,0,128);
 DrawStyle DrawStyle::BUTTONBACKGROUND(0, 0, 200);
 DrawStyle DrawStyle::PROGRAMMEB(80, 80, 240); // two colours used as alterating backgrounds for individual programmes in EPG
 DrawStyle DrawStyle::PROGRAMMEA(40, 40, 120); // TODO fit epg style (colours) in with rest of application
 DrawStyle DrawStyle::NOPROGRAMME(180, 180, 180); // no programme details colour
+DrawStyle DrawStyle::WALLPAPER(0xFF000000);
+
+
+enum SkinNames{
+#ifdef GRADIENT_DRAWING
+       NoopacityInspired,
+       ClassicEnhanced,
+#endif
+       Classic,
+       MaxSkins
+};
+
+const char *skinnames[]={
+#ifdef GRADIENT_DRAWING
+"Noopacity inspired",
+"VompClassic Enhanced",
+#endif
+ "VompClassic"
+};
+
+ const char* *SkinFactory::getSkinNames()
+ {
+
+       return skinnames;
+ }
+
+
+int SkinFactory::getNumberofSkins()
+{
+       return MaxSkins;
+}
+
 
 
-void SkinFactory::InitDefaultSkin()
+void InitDefaultSkin()
 {
        /*
 Real colours
@@ -56,22 +91,26 @@ Real colours
        DrawStyle::GREEN=DrawStyle(0, 255, 0);
        DrawStyle::BLUE=DrawStyle(0, 0, 255);
        DrawStyle::YELLOW=DrawStyle(255, 255, 0);
-       DrawStyle::VIDEOBLUE=DrawStyle(0, 0, 150);
+       DrawStyle::WALLPAPER=DrawStyle(0, 0, 150);
        DrawStyle::VIEWBACKGROUND=DrawStyle(0, 0, 100);
+       DrawStyle::SELECTBACKGROUND=DrawStyle(0, 0, 100);
        DrawStyle::VIEWTRANSPARENTBACKGROUND=DrawStyle(0, 0, 100, 128);
        DrawStyle::TABVIEWBACKGROUND=DrawStyle(0, 0, 120);
        DrawStyle::TITLEBARBACKGROUND=DrawStyle(0, 0, 200);
+       DrawStyle::LIVETVSYMBOLS=DrawStyle(240, 250, 80);
        DrawStyle::SELECTHIGHLIGHT=DrawStyle(240, 250, 80);
        DrawStyle::SELECTDARKHIGHLIGHT=DrawStyle(120, 125, 40);
-       DrawStyle::LIGHTTEXT=DrawStyle(255, 255, 255);
+       DrawStyle::PROGRESSBAR=DrawStyle::LIGHTTEXT=DrawStyle(255, 255, 255);
        DrawStyle::DARKTEXT=DrawStyle(0, 0, 100);
        DrawStyle::DANGER=DrawStyle(200, 0, 0);
        DrawStyle::BUTTONBACKGROUND=DrawStyle(0, 0, 200);
+       DrawStyle::OSDBACKGROUND=DrawStyle(0,0,0,128);
        DrawStyle::PROGRAMMEB=DrawStyle(80, 80, 240); // two colours used as alterating backgrounds for individual programmes in EPG
        DrawStyle::PROGRAMMEA=DrawStyle(40, 40, 120); // TODO fit epg style (colours) in with rest of application
        DrawStyle::NOPROGRAMME=DrawStyle(180, 180, 180); // no programme details colour
 
 
+
        /*
 Silly colours
 
@@ -86,7 +125,7 @@ Colour Colour::BUTTONBACKGROUND(255, 255, 255);
         */
 }
 
-void SkinFactory::InitEnhancedSkin()
+void InitEnhancedSkin()
 {
        /*
 Real colours
@@ -160,7 +199,7 @@ Real colours
        DrawStyle::DARKGREY.y2=1.0;
 
 
-       DrawStyle::VIDEOBLUE=DrawStyle(0, 0, 150);
+       DrawStyle::WALLPAPER=DrawStyle(0, 0, 150);
 
        DrawStyle::VIEWBACKGROUND=DrawStyle(0, 0, 100);
        DrawStyle::VIEWBACKGROUND.grad_col[0]=Colour(0,0,160);
@@ -202,6 +241,8 @@ Real colours
        DrawStyle::SELECTHIGHLIGHT.x2=0.0;
        DrawStyle::SELECTHIGHLIGHT.y2=1.0;
 
+       DrawStyle::LIVETVSYMBOLS = DrawStyle::SELECTHIGHLIGHT;
+
 
        DrawStyle::SELECTDARKHIGHLIGHT=DrawStyle(60, 65, 20);
        DrawStyle::SELECTDARKHIGHLIGHT.grad_col[0]=DrawStyle(120, 125, 40);
@@ -212,6 +253,15 @@ Real colours
        DrawStyle::SELECTDARKHIGHLIGHT.x2=0.0;
        DrawStyle::SELECTDARKHIGHLIGHT.y2=1.0;
 
+       DrawStyle::SELECTBACKGROUND=DrawStyle(0, 0, 100);
+       DrawStyle::SELECTBACKGROUND.grad_col[0]=Colour(0,0,160);
+       DrawStyle::SELECTBACKGROUND.num_colors=1;
+       DrawStyle::SELECTBACKGROUND.ft=DrawStyle::GradientLinear;
+       DrawStyle::SELECTBACKGROUND.x1=0.0;
+       DrawStyle::SELECTBACKGROUND.y1=0.0;
+       DrawStyle::SELECTBACKGROUND.x2=0.0;
+       DrawStyle::SELECTBACKGROUND.y2=1.0;
+
        DrawStyle::LIGHTTEXT=DrawStyle(255, 255, 255);
        DrawStyle::LIGHTTEXT.grad_col[0]=DrawStyle(150, 150, 150);
        DrawStyle::LIGHTTEXT.num_colors=1;
@@ -220,6 +270,7 @@ Real colours
        DrawStyle::LIGHTTEXT.y1=0.0;
        DrawStyle::LIGHTTEXT.x2=0.0;
        DrawStyle::LIGHTTEXT.y2=1.0;
+       DrawStyle::PROGRESSBAR=DrawStyle::LIGHTTEXT;
 
        DrawStyle::DARKTEXT=DrawStyle(0, 0, 100);
        DrawStyle::DANGER=DrawStyle(200, 0, 0);
@@ -233,6 +284,8 @@ Real colours
        DrawStyle::BUTTONBACKGROUND.x2=0.0;
        DrawStyle::BUTTONBACKGROUND.y2=1.0;
 
+       DrawStyle::OSDBACKGROUND=DrawStyle(0,0,0,128);
+
 
        DrawStyle::PROGRAMMEB=DrawStyle(40, 40, 120); // two colours used as alterating backgrounds for individual programmes in EPG
        DrawStyle::PROGRAMMEB.grad_col[0]=DrawStyle(80, 80, 240);
@@ -264,6 +317,8 @@ Real colours
        DrawStyle::NOPROGRAMME.y2=1.0;
 
 
+
+
        /*
 Silly colours
 
@@ -277,3 +332,131 @@ Colour Colour::DANGER(200, 200, 0);
 Colour Colour::BUTTONBACKGROUND(255, 255, 255);
         */
 }
+
+void InitNoopacityInspiredSkin()
+{
+       /*
+Real colours
+        */
+       DrawStyle::BLACK=DrawStyle(0, 0, 0);
+       DrawStyle::RED=DrawStyle(0x99BB0000);
+       DrawStyle::GREY=DrawStyle(0xFE777777);
+       DrawStyle::DARKGREY=DrawStyle(0x7D000000);
+       DrawStyle::GREEN=DrawStyle(0x9900BB00);
+       DrawStyle::BLUE=DrawStyle(0x990000BB);
+       DrawStyle::YELLOW=DrawStyle(0x99BBBB00);
+       DrawStyle::VIEWBACKGROUND=DrawStyle(0xB012273f);
+       DrawStyle::VIEWTRANSPARENTBACKGROUND=DrawStyle(0x99242A38);
+       DrawStyle::OSDBACKGROUND=DrawStyle(0xB012273f);
+       DrawStyle::TABVIEWBACKGROUND=DrawStyle(0x99242A38);
+
+       DrawStyle::LIVETVSYMBOLS=DrawStyle(0xFF9a9a9a);
+       DrawStyle::PROGRESSBAR=DrawStyle(0xFFC6D590);
+
+
+
+       DrawStyle::SELECTHIGHLIGHT=DrawStyle(0xFF999999);
+       DrawStyle::SELECTHIGHLIGHT.grad_col[0]=DrawStyle(0xFFa4fd15);
+       DrawStyle::SELECTHIGHLIGHT.grad_col[1]=DrawStyle(0xFFa4fd15);
+       DrawStyle::SELECTHIGHLIGHT.grad_col[2]=DrawStyle(0x7D000000);
+       DrawStyle::SELECTHIGHLIGHT.grad_pos[0]=0.3;
+       DrawStyle::SELECTHIGHLIGHT.grad_pos[1]=0.9;
+       DrawStyle::SELECTHIGHLIGHT.num_colors=3;
+       DrawStyle::SELECTHIGHLIGHT.ft=DrawStyle::GradientLinear;
+       DrawStyle::SELECTHIGHLIGHT.x1=0.0;
+       DrawStyle::SELECTHIGHLIGHT.y1=0.2;
+       DrawStyle::SELECTHIGHLIGHT.x2=1.1;
+       DrawStyle::SELECTHIGHLIGHT.y2=0.8;
+
+
+       DrawStyle::SELECTDARKHIGHLIGHT=DrawStyle(0xFD999999);
+       DrawStyle::SELECTDARKHIGHLIGHT.grad_col[0]=DrawStyle(0xFF7bbd0f);
+       DrawStyle::SELECTDARKHIGHLIGHT.grad_col[1]=DrawStyle(0xFF7bbd0f);
+       DrawStyle::SELECTDARKHIGHLIGHT.grad_col[2]=DrawStyle(0x7D000000);
+       DrawStyle::SELECTDARKHIGHLIGHT.grad_pos[0]=0.3;
+       DrawStyle::SELECTDARKHIGHLIGHT.grad_pos[1]=0.9;
+       DrawStyle::SELECTDARKHIGHLIGHT.num_colors=3;
+       DrawStyle::SELECTDARKHIGHLIGHT.ft=DrawStyle::GradientLinear;
+       DrawStyle::SELECTDARKHIGHLIGHT.x1=0.0;
+       DrawStyle::SELECTDARKHIGHLIGHT.y1=0.2;
+       DrawStyle::SELECTDARKHIGHLIGHT.x2=1.1;
+       DrawStyle::SELECTDARKHIGHLIGHT.y2=0.8;
+
+
+       DrawStyle::SELECTBACKGROUND=DrawStyle(0xFE999999);
+       DrawStyle::SELECTBACKGROUND.grad_col[0]=DrawStyle(0xFF353b50);
+       DrawStyle::SELECTBACKGROUND.grad_col[1]=DrawStyle(0xFF353b50);
+       DrawStyle::SELECTBACKGROUND.grad_col[2]=DrawStyle(0x7D000000);
+       DrawStyle::SELECTBACKGROUND.grad_pos[0]=0.3;
+       DrawStyle::SELECTBACKGROUND.grad_pos[1]=0.9;
+       DrawStyle::SELECTBACKGROUND.num_colors=3;
+       DrawStyle::SELECTBACKGROUND.ft=DrawStyle::GradientLinear;
+       DrawStyle::SELECTBACKGROUND.x1=0.0;
+       DrawStyle::SELECTBACKGROUND.y1=0.2;
+       DrawStyle::SELECTBACKGROUND.x2=1.1;
+       DrawStyle::SELECTBACKGROUND.y2=0.8;
+
+       DrawStyle::TITLEBARBACKGROUND=DrawStyle::SELECTBACKGROUND;
+
+       DrawStyle::LIGHTTEXT=DrawStyle(0xFFFFFFFF);
+       DrawStyle::DARKTEXT=DrawStyle(0xFF363636);
+       DrawStyle::DANGER=DrawStyle(200, 0, 0);
+       DrawStyle::BUTTONBACKGROUND=DrawStyle::SELECTBACKGROUND;
+        // two colours used as alterating backgrounds for individual programmes in EPG
+       DrawStyle::PROGRAMMEB=DrawStyle::SELECTBACKGROUND;
+
+
+
+       DrawStyle::PROGRAMMEA=DrawStyle(0x7D000000);
+       DrawStyle::PROGRAMMEA.grad_col[0]=DrawStyle(0xFF353b50);
+       DrawStyle::PROGRAMMEA.grad_col[1]=DrawStyle(0xFF353b50);
+       DrawStyle::PROGRAMMEA.grad_col[2]=DrawStyle(0xFE999999);
+       DrawStyle::PROGRAMMEA.grad_pos[0]=0.3;
+       DrawStyle::PROGRAMMEA.grad_pos[1]=0.9;
+       DrawStyle::PROGRAMMEA.num_colors=3;
+       DrawStyle::PROGRAMMEA.ft=DrawStyle::GradientLinear;
+       DrawStyle::PROGRAMMEA.x1=0.0;
+       DrawStyle::PROGRAMMEA.y1=0.2;
+       DrawStyle::PROGRAMMEA.x2=1.0;
+       DrawStyle::PROGRAMMEA.y2=0.8;
+
+
+       DrawStyle::NOPROGRAMME=DrawStyle(0xFF353b50); // no programme details colour
+
+       DrawStyle::WALLPAPER=DrawStyle(0x00000000); // two colours used as alternating backgrounds for individual programmes in EPG
+       DrawStyle::WALLPAPER.grad_col[0]=DrawStyle(0x0012273f);
+       DrawStyle::WALLPAPER.num_colors=1;
+       DrawStyle::WALLPAPER.ft=DrawStyle::GradientLinear;
+       DrawStyle::WALLPAPER.x1=0.0;
+       DrawStyle::WALLPAPER.y1=0.0;
+       DrawStyle::WALLPAPER.x2=0.0;
+       DrawStyle::WALLPAPER.y2=1.0;
+
+       /*
+Silly colours
+
+Colour Colour::VIDEOBLUE(250, 0, 0);
+Colour Colour::VIEWBACKGROUND(100, 0, 100);
+Colour Colour::TITLEBARBACKGROUND(100, 0, 200);
+Colour Colour::SELECTHIGHLIGHT(240, 250, 180);
+Colour Colour::LIGHTTEXT(255, 0, 255);
+Colour Colour::DARKTEXT(0, 0, 255);
+Colour Colour::DANGER(200, 200, 0);
+Colour Colour::BUTTONBACKGROUND(255, 255, 255);
+        */
+}
+
+bool SkinFactory::InitSkin(int n)
+{
+       switch(n)
+       {
+       default:
+       case Classic: InitDefaultSkin(); break;
+#ifdef GRADIENT_DRAWING
+       case ClassicEnhanced: InitEnhancedSkin(); break;
+       case NoopacityInspired: InitNoopacityInspiredSkin(); break;
+#endif
+       };
+       return true;
+}
+
index 28eaf0163134bb5b0875157ee669cef7c747c48f..746b3c10470fc13c1f4ae1e70a178ea87ad085cd 100644 (file)
--- a/colour.h
+++ b/colour.h
@@ -33,6 +33,14 @@ class Colour
     Colour(int Tred, int Tgreen, int Tblue, int Talpha)
       { red = Tred; green = Tgreen; blue = Tblue; alpha = Talpha; }
 
+    Colour(unsigned int color)
+       {
+               red = (color & 0x00ff0000)>>16;
+               green = (color & 0x0000ff00)>>8;
+               blue = (color & 0x000000ff);
+               alpha = (color & 0xff000000)>>24;
+       }
+
     void set(int Tred, int Tgreen, int Tblue)
       { red = Tred; green = Tgreen; blue = Tblue; alpha = 255; }
 
@@ -66,6 +74,14 @@ public:
 
        DrawStyle(int Tred, int Tgreen, int Tblue, int Talpha)
      { red = Tred; green = Tgreen; blue = Tblue; alpha = Talpha; ft=Color;ct=Global;}
+       DrawStyle(unsigned int color)
+       {
+               red = (color & 0x00ff0000)>>16;
+               green = (color & 0x0000ff00)>>8;
+               blue = (color & 0x000000ff);
+               alpha = (color & 0xff000000)>>24;
+               ft=Color;ct=Global;
+       }
 
        enum FillType {
                        Color,
@@ -91,11 +107,14 @@ public:
     static DrawStyle BLUE;
     static DrawStyle GREY;
     static DrawStyle DARKGREY;
-    static DrawStyle VIDEOBLUE;
     static DrawStyle VIEWBACKGROUND;
     static DrawStyle VIEWTRANSPARENTBACKGROUND;
+    static DrawStyle LIVETVSYMBOLS;
+    static DrawStyle PROGRESSBAR;
+    static DrawStyle OSDBACKGROUND;
     static DrawStyle TABVIEWBACKGROUND;
     static DrawStyle TITLEBARBACKGROUND;
+    static DrawStyle SELECTBACKGROUND;
     static DrawStyle SELECTHIGHLIGHT;
     static DrawStyle SELECTDARKHIGHLIGHT;
     static DrawStyle LIGHTTEXT;
@@ -105,13 +124,15 @@ public:
     static DrawStyle PROGRAMMEA;
     static DrawStyle PROGRAMMEB;
     static DrawStyle NOPROGRAMME;
+    static DrawStyle WALLPAPER; // this one is special, if transparent it means picture
 
 };
 
 class SkinFactory {
 public:
-       static void InitDefaultSkin();
-       static void InitEnhancedSkin();
+       static int getNumberofSkins();
+       static const char* *getSkinNames();
+       static bool InitSkin(int n);
 };
 
 #endif
index 8094a26ab64cda45bf983d70ad84033b7944a5d6..f9f894611067fc387ba5ea80fe6edf24dda025dc 100644 (file)
@@ -69,6 +69,7 @@ Command::Command()
   connLost = NULL;
   crashed = false;
   server = NULL;
+  wallpaper = wallpaper_pict = NULL;
 }
 
 Command::~Command()
@@ -99,11 +100,8 @@ int Command::init(bool tcrashed, char* tServer)
     initted = 0;
     return 0;
   }
-#ifdef GRADIENT_DRAWING
-  SkinFactory::InitEnhancedSkin();
-#else
-  SkinFactory::InitDefaultSkin();
-#endif
+
+  SkinFactory::InitSkin(0);
 
 #ifndef WIN32
   pthread_mutex_init(&masterLock, NULL);
@@ -133,42 +131,57 @@ void Command::stop()
 
 void Command::doWallpaper()
 {
-  Video* video = Video::getInstance();
+       Video* video = Video::getInstance();
 
-  // Blue background
-  Boxx* bbg = new Boxx();
-  bbg->setSize(video->getScreenWidth(), video->getScreenHeight());
-  bbg->createBuffer();
-  bbg->fillColour(DrawStyle::VIDEOBLUE);
-  boxstack->add(bbg);
-  boxstack->update(bbg);
-  boxstack->remove(bbg);
+       // Blue background
+       Boxx* bbg = new Boxx();
+       bbg->setSize(video->getScreenWidth(), video->getScreenHeight());
+       bbg->createBuffer();
+       bbg->fillColour(DrawStyle::WALLPAPER);
+       boxstack->add(bbg);
+       boxstack->update(bbg);
+       boxstack->remove(bbg);
 
-  // Wallpaper
-  WJpeg* wallpaperj = new WJpegTYPE();
-  wallpaperj->setSize(video->getScreenWidth(), video->getScreenHeight());
-  wallpaperj->createBuffer();
+       // Wallpaper
+       wallpaper = new Boxx();
+       wallpaper->setSize(video->getScreenWidth(), video->getScreenHeight());
+       wallpaper->createBuffer();
+       wallpaper ->setBackgroundColour(DrawStyle::WALLPAPER);
 
-  if (video->getFormat() == Video::PAL)
-  {
-    logger->log("Command", Log::DEBUG, "PAL wallpaper selected");
+
+
+
+       wallpaper_pict = new WJpegTYPE();
+       wallpaper_pict->setSize(video->getScreenWidth(), video->getScreenHeight());
+
+
+       if (video->getFormat() == Video::PAL)
+       {
+               logger->log("Command", Log::DEBUG, "PAL wallpaper selected");
 #ifndef _MIPS_ARCH    
-    wallpaperj->init("/wallpaperPAL.jpg");
+               wallpaper_pict->init("/wallpaperPAL.jpg");
 #else
-    wallpaperj->init("wallpaperPAL.jpg");
+               wallpaper_pict->init("wallpaperPAL.jpg");
 #endif
-  }
-  else
-  {
-    logger->log("Command", Log::DEBUG, "NTSC wallpaper selected");
-    wallpaperj->init("/wallpaperNTSC.jpg");
-  }
-  wallpaperj->draw();
+       }
+       else
+       {
+               logger->log("Command", Log::DEBUG, "NTSC wallpaper selected");
+               wallpaper_pict->init("/wallpaperNTSC.jpg");
+       }
+       if (DrawStyle::WALLPAPER.alpha) {
+               wallpaper_pict->setVisible(true);
+       } else {
+               wallpaper_pict->setVisible(false);
+       }
+       wallpaper->add(wallpaper_pict);
+       wallpaper->draw();
+
+       boxstack->add(wallpaper);
+       boxstack->update(wallpaper);
+
 
-  boxstack->add(wallpaperj);
-  boxstack->update(wallpaperj);
 
-  wallpaper = wallpaperj;
 }
 
 void Command::run()
@@ -756,6 +769,30 @@ void Command::doJustConnected(VConnect* vconnect)
   }
   if (config) delete[] config;
 
+  config = vdr->configLoad("Advanced", "Skin Name");
+  if (config) {
+         const char **skinnames=SkinFactory::getSkinNames();
+         for (int i=0;i<SkinFactory::getNumberofSkins();i++) {
+                 if (!STRCASECMP(config, skinnames[i])) {
+                         SkinFactory::InitSkin(i);
+                         break;
+                 }
+         }
+         delete[] config;
+         if (wallpaper && wallpaper_pict) {
+                 if (DrawStyle::WALLPAPER.alpha) {
+                         wallpaper_pict->setVisible(true);
+                 } else {
+                         wallpaper_pict->setVisible(false);
+                 }
+                 wallpaper->draw();
+                 boxstack->update(wallpaper);
+         }
+
+  } else {
+         SkinFactory::InitSkin(0);
+  }
+
   // See if config says to override video format (PAL/NTSC)
   config = vdr->configLoad("General", "Override Video Format");
   if (config)
@@ -801,6 +838,8 @@ void Command::doJustConnected(VConnect* vconnect)
         logger->log("Command", Log::DEBUG, "Switching to NTSC_J");
         video->init(Video::NTSC_J);
       }
+      delete[] config;
+
 #ifndef __ANDROID__
       //we do not init twice
       osd->init((char*)("/dev/stbgfx"));
index 22f27e7fedce57e2df030fcd0e2e88020d3e2f4d..0a5538493b4b655d54b404263f7146e756f2aa15 100644 (file)
--- a/command.h
+++ b/command.h
@@ -45,6 +45,7 @@ class Boxx;
 class BoxStack;
 class Log;
 class VInfo;
+class WJpeg;
 
 class Command : public MessageQueue
 {
@@ -95,6 +96,7 @@ class Command : public MessageQueue
     BoxStack* boxstack;
     Remote* remote;
     Boxx* wallpaper;
+    WJpeg* wallpaper_pict;
     VInfo* connLost;
     bool crashed;
     char* server;
index e74efec8f79ae84c5efa28127c6f0605ae96f629..2aea3f72b1f892423242fb562a847f7207fa6989 100644 (file)
@@ -13,19 +13,16 @@ OBJECTS1 = command.o  tcp.o dsock.o thread.o timers.o i18n.o       \
            vradiorec.o vaudioselector.o vscreensaver.o vopts.o                   \
            wselectlist.o wjpeg.o wsymbol.o wbutton.o wtextbox.o           \
            woptionpane.o woptionbox.o wremoteconfig.o wtabbar.o                  \
-           fonts/helvB24.o fonts/helvB18.o                                       \
            remote.o led.o mtd.o  osd.o surface.o                  \
-            media.o vpicturebanner.o                                 \
-           audioplayer.o demuxeraudio.o abstractoption.o                         \
+            vpicturebanner.o                                 \
+            abstractoption.o                         \
            eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o              \
            vvideolivetv.o vsleeptimer.o                                          \
            playerlivetv.o playerliveradio.o                                      \
            wprogressbar.o                                                        \
            bitmap.o dvbsubtitles.o                                               \
-           imagereader.o  mediaoptions.o mediaplayer.o  \
-           serialize.o localmediafile.o   playermedia.o \
-           demuxermedia.o tfeed.o vteletextview.o teletextdecodervbiebu.o        \
-           teletxt/txtfont.o mediafile.o movieinfo.o seriesinfo.o wmovieview.o wseriesview.o tvmedia.o wtvmedia.o\
+            tfeed.o vteletextview.o teletextdecodervbiebu.o        \
+           teletxt/txtfont.o  movieinfo.o seriesinfo.o wmovieview.o wseriesview.o tvmedia.o wtvmedia.o\
            wpictureview.o
            
 
index cd869f22113f446915fac575fcadfee98defebdc..86d2dc44ba54d158569ee02c10a4028ff92aee0e 100644 (file)
@@ -182,11 +182,17 @@ int OsdOpenVG::init(void* device)
    uint32_t back_image_ptr;
    bcm_backres=vc_dispmanx_resource_create(VC_IMAGE_RGBX32,16,16,&back_image_ptr);
    unsigned int color[16*16];
+   DrawStyle bg=DrawStyle::WALLPAPER;
+   if (bg.ft!=DrawStyle::GradientLinear) {
+          bg.grad_col[0]=bg;
+   }
    //memset(color,0xFF,sizeof(unsigned int)*4*8);
    for (int j=0;j<16;j++) {
-          int help=j;
+          int helpr=(((15-j)*bg.red)+(j*bg.grad_col[0].red))/15;
+          int helpb=(((15-j)*bg.blue)+(j*bg.grad_col[0].blue))/15;
+          int helpg=(((15-j)*bg.green)+(j*bg.grad_col[0].green))/15;
           //unsigned int cur_col=help | (help<< 8)  | (help<< 16)  | (0xFF<< 24);
-          unsigned int cur_col=help *3 | (help<< (8+2))  | (help<< (16+2))  | (0xFF<< (24));
+          unsigned int cur_col=helpr  | (helpg<< (8))  | (helpb<< (16))  | (0xFF<< (24));
           for (int i=0;i<16;i++) {
                   color[i+16*j]=cur_col;
           }
@@ -543,7 +549,9 @@ void OsdOpenVG::threadPostStopCleanup()
 
 void OsdOpenVG::InternalRendering(){
        vgmutex.Lock();
+       Colour bg=DrawStyle::WALLPAPER;
     float colclear[]={1.f,1.0f,1.f,1.f};
+    if (bg.alpha==0) colclear[3]=0.f;
     vgSetfv(VG_CLEAR_COLOR,4,colclear);
        vgClear(0,0,BACKBUFFER_WIDTH,BACKBUFFER_HEIGHT);
        vgSeti(VG_BLEND_MODE, VG_BLEND_SRC);
index a1f7b607cc94db703b800eaa980ea65e48bfb191..4555987072c8037a1c6b21a222e772d46dd3f8f6 100644 (file)
@@ -73,7 +73,9 @@ void initpol_tables(){
 
 
 Surface* Surface::screen = NULL;
+#ifndef GRADIENT_DRAWING
 osd_font_t* Surface::font = &font_helvB18;
+#endif
 
 Surface::Surface(int id)
 {
@@ -93,7 +95,7 @@ int Surface::drawText(const char* text, int x, int y, const DrawStyle& c)
 {
   return drawText(text, x, y, 2000, c);
 }
-
+#ifndef GRADIENT_DRAWING
 int Surface::drawText(const char* text, int x, int y, int width, const DrawStyle& c)
 {
   int h, n, i;
@@ -175,6 +177,7 @@ int Surface::getFontHeight()
 {
   return font->spacing;
 }
+#endif
 
  wchar_t Surface::getWChar(const char* str, unsigned int *length)
  {
index b7232564241497d83be2aca375a620304679dad3..228cd421c25f6ac1dab2429a09e0b85f917ad207 100644 (file)
--- a/surface.h
+++ b/surface.h
@@ -27,6 +27,7 @@
 
 #include "teletextdecodervbiebu.h"
 
+#ifndef GRADIENT_DRAWING
 // Font stuff
 
 typedef struct bogl_font {
@@ -41,6 +42,7 @@ typedef struct bogl_font {
 //extern osd_font_t font_CaslonRoman_1_25;
 //extern osd_font_t font_helvB24;
 extern osd_font_t font_helvB18;
+#endif
 
 class Bitmap;
 class DisplayRegion;
@@ -57,14 +59,24 @@ class Surface
     virtual ~Surface();
 
     static Surface* getScreen();
-    virtual int getFontHeight();
-    virtual float getCharWidth(wchar_t c);
     virtual wchar_t getWChar(const char* str, unsigned int *length);
 
+#ifdef GRADIENT_DRAWING
+    virtual int getFontHeight()=0;
+    virtual float getCharWidth(wchar_t c)=0;
+    virtual int drawText(const char* text, int x, int y, const DrawStyle& c)=0;
+    virtual int drawText(const char* text, int x, int y, int width, const DrawStyle& c)=0;
+    virtual int drawTextRJ(const char* text, int x, int y, const DrawStyle& c)=0;
+    virtual int drawTextCentre(const char* text, int x, int y, const DrawStyle& c)=0;
+#else
+    //May be move this stuff to a new Basis class surface pixel
+    virtual int getFontHeight();
+    virtual float getCharWidth(wchar_t c);
     virtual int drawText(const char* text, int x, int y, const DrawStyle& c);
     virtual int drawText(const char* text, int x, int y, int width, const DrawStyle& c);
     virtual int drawTextRJ(const char* text, int x, int y, const DrawStyle& c);
     virtual int drawTextCentre(const char* text, int x, int y, const DrawStyle& c);
+#endif
 
     virtual void drawJpeg(const char *fileName,int x, int y,int *width, int *height) {}
 
@@ -99,7 +111,9 @@ class Surface
 
   protected:
     static Surface* screen;
+#ifndef GRADIENT_DRAWING
     static osd_font_t* font;
+#endif
 
 
     virtual void drawPixel(int x, int y, unsigned int c, bool fastdraw=false)=0; // deprecated preparation for vector based drawing, only allowed to be called inside implementation
diff --git a/vdr.cc b/vdr.cc
index 83e640374fb2cf46b24b9c7713f8b72061843e03..97be450cbb4b22f9c0c86f62400f51528d55286a 100644 (file)
--- a/vdr.cc
+++ b/vdr.cc
 #include "vdrrequestpacket.h"
 #include "vdrresponsepacket.h"
 #include "command.h"
+#ifdef VOMP_MEDIAPLAYER
 #include "media.h"
 #include "mediaprovider.h"
 #include "mediaproviderids.h"
+#endif
 #include "vdrcommand.h"
 #include "video.h"
 #include "osd.h"
@@ -44,6 +46,7 @@
 #define VOMP_PROTOCOLL_VERSION 0x00000302
 
 VDR* VDR::instance = NULL;
+#ifdef VOMP_MEDIAPLAYER
 //prepare a request
 //will create a request package from a command variable and fill this
 //caller has to destroy buffer
@@ -108,7 +111,7 @@ static int decodeResponse(SerializeBuffer *rp,VDR_Command *c) {
   return 0;
 }
 
-
+#endif
 
 VDR::VDR()
 {
@@ -122,9 +125,11 @@ VDR::VDR()
   channelNumberWidth = 1;
   doVDRShutdown = false;
   TEMP_SINGLE_VDR_PR = NULL;
+#ifdef VOMP_MEDIAPLAYER
   providerId=MPROVIDERID_VDR;
   subRange=MPROVIDERRANGE_VDR;
   MediaPlayerRegister::getInstance()->registerMediaProvider(this,MPROVIDERID_VDR,MPROVIDERRANGE_VDR);
+#endif
 }
 
 VDR::~VDR()
@@ -1349,7 +1354,7 @@ void VDR::getChannelPids(Channel* channel)
   return ;
 }
 
-
+#ifdef VOMP_MEDIAPLAYER
 MediaList * VDR::getRootList() {
   return getMediaList(NULL);
 }
@@ -1500,7 +1505,7 @@ int VDR::closeMediaChannel(ULONG channel) {
   return (flags != 0)?-1:0;
 }
 
-
+#endif
 
 
 int VDR::deleteTimer(RecTimer* delTimer)
diff --git a/vdr.h b/vdr.h
index b028288d688aae8464b541861aa1d86c97b80260..c4c29060cfe4fdb630299bb741d0d6f250093e6e 100644 (file)
--- a/vdr.h
+++ b/vdr.h
@@ -36,7 +36,9 @@
 #include "defines.h"
 #include "rectimer.h"
 #include "mark.h"
+#ifdef VOMP_MEDIAPLAYER
 #include "mediaprovider.h"
+#endif
 #include "eventdispatcher.h"
 #include "i18n.h"
 #include "log.h"
@@ -49,7 +51,9 @@ class Event;
 class Channel;
 class VDR_RequestPacket;
 class VDR_ResponsePacket;
+#ifdef VOMP_MEDIAPLAYER
 class SerializeBuffer;
+#endif
 class MovieInfo;
 class SeriesInfo;
 
@@ -112,7 +116,12 @@ class VDR_PacketReceiver : public EDReceiver // implementation in vdr.cc
     StreamReceiver* streamReceiver;
 };
 
-class VDR : public Thread_TYPE, public EventDispatcher, public MediaProvider, public ExternLogger
+class VDR : public Thread_TYPE,
+public EventDispatcher,
+#ifdef VOMP_MEDIAPLAYER
+public MediaProvider,
+#endif
+public ExternLogger
 {
 
   public:
@@ -191,7 +200,7 @@ class VDR : public Thread_TYPE, public EventDispatcher, public MediaProvider, pu
     bool          LogExtern(const char* buffer);
     
     bool setCharset(int charset); // 1 latin 2 UTF-8
-
+#ifdef VOMP_MEDIAPLAYER
     /**
       * the MediaProvider functions
       *
@@ -203,6 +212,7 @@ class VDR : public Thread_TYPE, public EventDispatcher, public MediaProvider, pu
         unsigned char ** buffer);
     virtual int getMediaInfo(ULONG channel, struct MediaInfo * result);
     virtual int closeMediaChannel(ULONG channel);
+#endif
 
     //TV Scraper support
     void getScraperEventType(char * fileName, int & movieID, int & seriesID, int & episodeID);
@@ -249,10 +259,11 @@ class VDR : public Thread_TYPE, public EventDispatcher, public MediaProvider, pu
     ULONG channelNumberWidth;
     VDR_PacketReceiver* TEMP_SINGLE_VDR_PR;
 
-
+#ifdef VOMP_MEDIAPLAYER
     ULONG providerId;
     ULONG subRange;
     SerializeBuffer * doRequestResponse(SerializeBuffer *in,int cmd);
+#endif
   protected:
   
     // Thread
index df347e3f949317eea4c86805169a670cc0470ccf..28b54927f42e268318337f829ba13a94e959eb0c 100644 (file)
@@ -78,7 +78,7 @@ const static ULONG VDR_GETEVENTSCRAPEREVENTTYPE = 43;
 const static ULONG VDR_LOADTVMEDIAEVENTTHUMB = 44;
 const static ULONG VDR_LOADCHANNELLOGO = 45;
 const static ULONG VDR_SHUTDOWN            = 666;
-
+#ifdef VOMP_MEDIAPLAYER
 class VDR_Command : public SerializableList {
   public:
     VDR_Command(const ULONG cmd) {
@@ -168,6 +168,6 @@ class VDR_GetMediaInfoResponse : public VDR_Command {
 };
 
 
-
+#endif
 
 #endif
index cd2bcc494bee8f8ef382fc98de6ef1f4064f29a4..f86f0b83333677d8c3ea6818baafb8822d0c4f09 100644 (file)
@@ -293,8 +293,16 @@ void VEpgListAdvanced::doGrid()
                Channel * chan=(*chanList)[ sl.getCurrentOptionData()];
                channelNumber = chan->number;
        }
+       UINT listIndex;
+       unsigned int chanlistsize=chanList->size();
+       Channel *chan;
+       for(listIndex = 0; listIndex < chanlistsize; listIndex++)
+       {
+               chan = (*chanList)[listIndex];
+               if (chan->number == channelNumber) break;
+       }
 
-       VEpg* vepg = new VEpg(videolive, channelNumber, chanList);
+       VEpg* vepg = new VEpg(videolive, listIndex, chanList);
        vepg->draw();
        boxstack->add(vepg);
        boxstack->update(vepg);
index cfa700e687b601db142a3edc2e678679914336d4..84d3084496bb32666f4b327308f713a181593fb7 100644 (file)
--- a/vopts.cc
+++ b/vopts.cc
@@ -258,6 +258,14 @@ VOpts::VOpts()
          wop->addOptionLine(option);
   }
 
+  int numskins=SkinFactory::getNumberofSkins();
+   if (numskins>1) {
+         option = new Option(20, "Skin Name (needs restart)",   "Advanced", "Skin Name",  Option::TYPE_KEYED_TEXT, numskins, 0, 0,
+                                 SkinFactory::getSkinNames(),SkinFactory::getSkinNames());
+         options.push_back(option);
+         wop->addOptionLine(option);
+   }
+
 #ifdef ADVANCED_MENUES
   option = new Option(19, "Advanced Menu", "General", "Menu type",Option::TYPE_TEXT, 2, 0, 0, options19);
   options.push_back(option);
@@ -486,6 +494,12 @@ void VOpts::doSave()
                }
                break;
         }
+        case 20:
+        {
+               SkinFactory::InitSkin(options[i]->userSetChoice);
+               Log::getInstance()->log("Options", Log::DEBUG, "Init Skin %d",options[i]->userSetChoice);
+               break;
+        }
       }
     }
     else
index 96bcdf9d5741890ed82307a9b9e173df66f4ac7a..2daf14a17f64b57e0c8da49736932ca930a517b6 100644 (file)
@@ -45,8 +45,9 @@
 #include "vepgsummary.h"
 #include "vepglistadvanced.h"
 
+#include <sstream>
+
 VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, VChannelList* tvchannelList)
-: osdBack(0, 0, 0, 128)
 {
   vdr = VDR::getInstance();
   boxstack = BoxStack::getInstance();
@@ -137,14 +138,14 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   }
 
   osdposterbanner.setPosition(20,20);
-  osdposterbanner.setBackgroundColour(osdBack);
+  osdposterbanner.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   osdposterbanner.setSize(video->getScreenWidth()*4/10,video->getScreenHeight()*4/10);
   osdposterbanner.setVisible(false);
   add(&osdposterbanner);
 
 
 
-  osd.setBackgroundColour(osdBack);
+  osd.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   osd.setPosition(0, video->getScreenHeight() - 150);
   osd.setSize(video->getScreenWidth(), 150);
   osd.setVisible(false);
@@ -152,7 +153,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   
   int channellogomove=0;
   if (osdv) {
-         osdChannelLogo.setBackgroundColour(osdBack);
+         osdChannelLogo.setBackgroundColour(DrawStyle::OSDBACKGROUND);
          osdChannelLogo.setPosition(30,5);
          osdChannelLogo.setSize(60,60);
          osdChannelLogo.setTVMedia(info, WTVMedia::ZoomVertical);
@@ -160,17 +161,17 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
          channellogomove=30-5;
   }
 
-  clock.setBackgroundColour(osdBack);
+  clock.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   clock.setPosition(osd.getWidth() - 100, 4);
   clock.setSize(90, 30);
   osd.add(&clock);
 
-  osdChanNum.setBackgroundColour(osdBack);
+  osdChanNum.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   osdChanNum.setPosition(60+channellogomove, 4);
   osdChanNum.setSize((numberWidth*10) + 22, getFontHeight()+5); // 10 px = width of number chars in font
   osd.add(&osdChanNum);  
 
-  osdChanName.setBackgroundColour(osdBack);
+  osdChanName.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   osdChanName.setPosition(osdChanNum.getX2() + 10, 4);
   osdChanName.setSize(300, 30);
   osd.add(&osdChanName);
@@ -195,7 +196,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   boxBlue.setSize(18, 16);
   osd.add(&boxBlue);  
   
-  textRed.setBackgroundColour(osdBack);
+  textRed.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   textRed.setPosition(boxRed.getX2(), 98);
   textRed.setSize(boxGreen.getX() - boxRed.getX2(), 30);
   textRed.setText(tr("Summary"));
@@ -203,51 +204,33 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
     
   if (streamType == VDR::VIDEO)
   {
-    textGreen.setBackgroundColour(osdBack);
+    textGreen.setBackgroundColour(DrawStyle::OSDBACKGROUND);
     textGreen.setPosition(boxGreen.getX2(), 98);
     textGreen.setSize(boxYellow.getX() - boxGreen.getX2(), 30);
     textGreen.setText(tr("Audio"));
     osd.add(&textGreen);  
   }
     
-  textYellow.setBackgroundColour(osdBack);
+  textYellow.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   textYellow.setPosition(boxYellow.getX2(), 98);
   textYellow.setSize(boxBlue.getX() - boxYellow.getX2(), 30);
   textYellow.setText(tr("Teletext"));
   osd.add(&textYellow);  
     
-  textBlue.setBackgroundColour(osdBack);
+  textBlue.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   textBlue.setPosition(boxBlue.getX2(), 98);
   textBlue.setSize(osd.getX2() - boxBlue.getX2(), 30);
   textBlue.setText(tr("EPG"));
   osd.add(&textBlue);  
     
-  sl.setBackgroundColour(osdBack);
+  sl.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   sl.setPosition(90, 36);
   sl.setSize(480, 58);
-  sl.setNoLoop();
   osd.add(&sl);
   
-  // Summary Box
-  summary.setBackgroundColour(osdBack);
-  summary.setPosition(0, video->getScreenHeight() - 300);
-  summary.setSize(video->getScreenWidth(), 150);
-  summary.setVisible(false);
-  add(&summary);  
-  
-  textSummary.setBackgroundColour(osdBack);
-  textSummary.setPosition(40, 10);
-  textSummary.setSize(video->getScreenWidth() - 80, 130);
-  textSummary.setParaMode(true);
-  summary.add(&textSummary);
-  
-  summaryBlackLine.setBackgroundColour(DrawStyle::BLACK);
-  summaryBlackLine.setPosition(0, summary.getHeight() - 4);
-  summaryBlackLine.setSize(summary.getWidth(), 4);
-  summary.add(&summaryBlackLine);
   
   sAspectRatio.setPosition(osd.getWidth() - 90, 40);
-  sAspectRatio.nextColour = DrawStyle::SELECTHIGHLIGHT;
+  sAspectRatio.nextColour = DrawStyle::LIVETVSYMBOLS;
   sAspectRatio.setVisible(false);
   osd.add(&sAspectRatio);
   
@@ -257,21 +240,17 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   osd.add(&bufferBar);
   
   sAudioChannels.setPosition(osd.getWidth() - 130, 40);
-  sAudioChannels.nextColour = DrawStyle::SELECTHIGHLIGHT;
+  sAudioChannels.nextColour = DrawStyle::LIVETVSYMBOLS;
   sAudioChannels.setVisible(false);
   osd.add(&sAudioChannels);
   
-  textUnavailable.setBackgroundColour(osdBack);
+  textUnavailable.setBackgroundColour(DrawStyle::OSDBACKGROUND);
   textUnavailable.setPosition(60, 30);
   textUnavailable.setSize(osd.getWidth() - 120, 30);
   textUnavailable.setText(tr("Channel Unavailable"));
   textUnavailable.setVisible(false);
   add(&textUnavailable);
   
-  // FIXME painful
-  Region r1 = summary.getRegionR();
-  Region r2 = osd.getRegionR();
-  osdSummaryRegion = r1 + r2;
 
   vdisplay.mode=Fullscreen;
   vdisplay.fallbackMode=Fullscreen;
@@ -306,7 +285,6 @@ void VVideoLiveTV::delData()
     delete eventList;
 
   }
-  sl.clear();
 }
 
 int VVideoLiveTV::handleCommand(int command)
@@ -505,8 +483,6 @@ void VVideoLiveTV::doUpDown(bool down)
 {
   if (osd.getVisible())
   {
-    if (down) sl.down();
-    else      sl.up();
     sl.draw();
     
     displayOSD(false);
@@ -574,27 +550,7 @@ void VVideoLiveTV::doSummary()
        vr->draw();
        boxstack->add(vr);
        boxstack->update(vr);
-/*
-  if (summary.getVisible())
-  {
-    summary.setVisible(false);
-    draw();
-    boxstack->update(this, summary.getRegion());
-    Timers::getInstance()->setTimerD(this, 1, 8); // Restart a timer to get rid of osd
-    return;
-  }
 
-  summary.setVisible(true);
-
-  if (osd.getVisible())
-  {
-    Timers::getInstance()->cancelTimer(this, 1);
-    displayOSD(false);
-  }
-  else
-  {
-    displayOSD(true);
-  }*/
 }
 
 void VVideoLiveTV::doKey(int command)
@@ -718,12 +674,11 @@ void VVideoLiveTV::doAudioSelector()
   vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLiveTV*)player)->getCurrentAudioChannel(),
       subtitleType,subtitleChannel,NULL);
 
-  vas->setBackgroundColour(osdBack);
+  vas->setBackgroundColour(DrawStyle::OSDBACKGROUND);
   vas->setPosition(0, osd.getScreenY() - vas->getHeight());
   vas->draw();
 
   // make vas != null and displayOSD will not set a timer or do any boxstack update
-  summary.setVisible(false);
   if (osd.getVisible()) displayOSD(false);
   else displayOSD(true);
   draw();
@@ -767,7 +722,7 @@ void VVideoLiveTV::setNowNextData()
 
   if (!eventList)
   {
-    sl.addOption(tr("No channel data available"), 0, 1);
+    sl.setText(tr("No channel data available"));
   }
   else
   {
@@ -778,6 +733,7 @@ void VVideoLiveTV::setNowNextData()
     struct tm* btime;
     Event* event;
     int eventListSize = eventList->size();
+    std::stringstream string;
     for(int i = 0; i < eventListSize; i++)
     {
       event = (*eventList)[i];
@@ -791,29 +747,13 @@ void VVideoLiveTV::setNowNextData()
       strftime(tempString2, 299, "%H:%M ", btime);
 #endif
       SNPRINTF(tempString, 299, "%s %s", tempString2, event->title);
-      
-      sl.addOption(tempString, (ULONG)event, (i==0));
+      string << tempString << "\n";
     }
+    sl.setText(string.str().c_str());
   }
 }
 
-void VVideoLiveTV::setSummaryData()
-{
-  // If osd is not being displayed, sl will be filled with now, current channel
-  // If the display was already on, sl will have programme to show summary for, not necessarily current channel and now
-  Event* selectedEvent = (Event*)sl.getCurrentOptionData();
-  
-  if (!selectedEvent)
-  {
-    Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "No summary");  
-    textSummary.setText(tr("No summary available"));
-  }
-  else
-  {
-    Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Summary: %s", selectedEvent->description);  
-    textSummary.setText(selectedEvent->description);
-  }
-}
+
 
 void VVideoLiveTV::displayOSD(bool newNowNextData)
 {
@@ -830,16 +770,9 @@ void VVideoLiveTV::displayOSD(bool newNowNextData)
   
 
   Region  toupdate;
-  if (summary.getVisible())
-  {
-    setSummaryData();
-    summary.draw();
-    toupdate=osdSummaryRegion;
-  }
-  else
-  {
-       toupdate=*osd.getRegion();
-  }
+
+  toupdate=*osd.getRegion();
+
 
   if (osdposterbanner.getVisible()) {
          boxstack->update(this);
@@ -849,7 +782,6 @@ void VVideoLiveTV::displayOSD(bool newNowNextData)
   
   bool setTimer = true;
   if (vas) setTimer = false;
-  if (summary.getVisible()) setTimer = false;
   if (textUnavailable.getVisible()) setTimer = false;
 
   if (setTimer) Timers::getInstance()->setTimerD(this, 1, 4);
@@ -857,11 +789,10 @@ void VVideoLiveTV::displayOSD(bool newNowNextData)
 
 void VVideoLiveTV::clearScreen()
 {  
-  if (!summary.getVisible()) Timers::getInstance()->cancelTimer(this, 1);
+  Timers::getInstance()->cancelTimer(this, 1);
 
   textUnavailable.setVisible(false);
   osd.setVisible(false);
-  summary.setVisible(false);
   osdposterbanner.setVisible(false);
 
   okTriggeredOSD = false;
index 0d3f3cea9c134d80b20f5cbc0cedbf3d5a5e718d..3639cd44875d99588372399039c4ff3437b20bc2 100644 (file)
@@ -134,7 +134,8 @@ class VVideoLiveTV : public Boxx, public TimerReceiver, public OSDReceiver
     WTextbox clock;
     WTextbox osdChanNum;
     WTextbox osdChanName;
-    WSelectList sl;
+    WTextbox sl;
+
     Boxx boxRed;
     Boxx boxGreen;
     Boxx boxYellow;
@@ -151,12 +152,8 @@ class VVideoLiveTV : public Boxx, public TimerReceiver, public OSDReceiver
     WTVMedia radioChannelLogo;
     WTVMedia osdChannelLogo;
     
-    Boxx summary;
-    WTextbox textSummary;
-    Boxx summaryBlackLine;
-    DrawStyle osdBack;
     
-    Region osdSummaryRegion;
+
     
     bool okTriggeredOSD;
 
index 144bc28bf99ae001c85c911550252961f9fffb9e..9d644f4dfd4fcde750fab0bdd6ead59196f1d962 100644 (file)
@@ -109,8 +109,9 @@ void VWelcome::draw()
 void VWelcome::drawClock()
 {
   // Blank the area first
+#ifndef GRADIENT_DRAWING
   rectangle(area.w - 60, 0, 60, 30, titleBarColour);
-
+#endif
   char timeString[20];
   time_t t;
   time(&t);
@@ -128,7 +129,11 @@ void VWelcome::drawClock()
 
 void VWelcome::timercall(int clientReference)
 {
+#ifndef GRADIENT_DRAWING
   drawClock();
+#else
+  draw();
+#endif
   boxstack->update(this, &clockRegion);
 }
 
index 9ce9892936057c1833a032af2037a8958043563a..a41f21915475cff77556f5b10733b2a5499bf785 100644 (file)
@@ -51,6 +51,6 @@ void WProgressBar::draw()
   rectangle(area.w - 2, 0, 2, area.h, DrawStyle::LIGHTTEXT); // right
   
   int progressWidth = (int)((area.w - 4) * (float)percent / 100);
-  rectangle(2, 2, progressWidth, area.h - 4, DrawStyle::SELECTHIGHLIGHT);
+  rectangle(2, 2, progressWidth, area.h - 4, DrawStyle::PROGRESSBAR);
 }
 
index 3037dfcffec5aea8159b4c6892b55de860db9c0f..7b40406013698c6300bfcb2874dd2af6228f495f 100644 (file)
@@ -125,14 +125,15 @@ void WSelectList::draw()
     if (i == selectedOption && showseloption)
     {
 
-      rectangle(0, ypos, area.w, fontHeight * linesPerOption, darkseloption ? DrawStyle::SELECTDARKHIGHLIGHT: DrawStyle::SELECTHIGHLIGHT);
+      rectangle(0, ypos, area.w, fontHeight * linesPerOption-1, darkseloption ? DrawStyle::SELECTDARKHIGHLIGHT: DrawStyle::SELECTHIGHLIGHT);
 
       drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::DARKTEXT, options[i].pict);
     }
     else
     {
+       rectangle(0, ypos, area.w, fontHeight * linesPerOption-1, DrawStyle::SELECTBACKGROUND);
 
-      drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::LIGHTTEXT, options[i].pict);
+        drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::LIGHTTEXT, options[i].pict);
     }
     ypos += ySeperation;
   }
index 044a90af88b8aaa1975914d5382c99008f0f3936..e5df6e494db3baf8b5b49b3a9e4e2ae28ebb7933 100644 (file)
@@ -28,7 +28,7 @@ WTabBar::WTabBar()
 {
   buttonBarActive = true;
   visiblePane = 0;
-  setBackgroundColour(DrawStyle::VIEWBACKGROUND);
+  setBackgroundColour(DrawStyle::TABVIEWBACKGROUND);
   
   symbolLeft.setPosition(0, 4);
   symbolLeft.nextColour = DrawStyle::BUTTONBACKGROUND;