diff options
| -rw-r--r-- | HISTORY | 16 | ||||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | README | 14 | ||||
| -rw-r--r-- | TVonscreen.h | 37 | ||||
| -rw-r--r-- | anyfont.c | 79 | ||||
| -rw-r--r-- | anyfont.h | 17 | ||||
| -rw-r--r-- | config.c | 158 | ||||
| -rw-r--r-- | config.h | 48 | ||||
| -rw-r--r-- | gfxtools.c | 173 | ||||
| -rw-r--r-- | gfxtools.h | 27 | ||||
| -rw-r--r-- | i18n.c | 741 | ||||
| -rw-r--r-- | magazine.c | 816 | ||||
| -rw-r--r-- | magazine.h | 52 | ||||
| -rw-r--r-- | magazine.h.orig | 97 | ||||
| -rw-r--r-- | tvonscreen.c | 26 | ||||
| -rwxr-xr-x | vdr-136-tvonscreen-0.5.0-patch.diff | 567 |
16 files changed, 1952 insertions, 920 deletions
@@ -12,4 +12,20 @@ VDR Plugin 'tvonscreen' Revision History 2004-03-23: Version 0.5.1 - added patch for vdr 1.3.x (not tested, don't have 1.3.x) + (thanks to Lars Volkhardt) +2004-06-30: Version 0.5.2 + +- added finnish translations (thanks to Rolf Ahrenberg) +- added patch for >= vdr 1.3.7 (thanks to Rolf Ahrenberg) + +2004-09-19: Version 0.6.0 + +- reworked patch of Rolf to make it more maintainable + (hopefully there will be no more big changes like this or I + will stop developing plugins, this takes too much time and + all those #ifdef doesn't make code better) +- added logo support +- added setup page +- added own XPM routines because the buildin of vdr were to special, + this allows logo support in 1.2.6 and 1.3.x @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.2 2004/03/03 00:22:47 schmitzj Exp $ +# $Id: Makefile,v 1.4 2004/07/07 10:37:23 schmitzj Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -46,7 +46,7 @@ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE ### The object files (add further files here): -OBJS = $(PLUGIN).o i18n.o magazine.o anyfont.o +OBJS = $(PLUGIN).o i18n.o magazine.o anyfont.o config.o gfxtools.o ### Implicit rules: @@ -15,6 +15,10 @@ does. The channels are shown from left to right, 3 on one screen. You can scroll though the channels and the time and create a timer. +Command line options: + +-l <path to logos> optional path for the XPM channel logos, + if not given, <configDir>/logos is used TV-Onscreen has two different modes: @@ -28,6 +32,7 @@ This is quite intuitive when you use it! The keys in show mode (when startet): +1 show help Cursor up/down scroll the time Cursor left/right scroll the channels Red/Blue scroll the time by 1 day (blue=+1 day) @@ -37,6 +42,7 @@ Green/Yellow scroll the channels by 1 page (-/+ 3 channels) 0 go to the current time Back leave Ok go to edit mode +4/5/6 jump to user specified point in time The keys in edit mode (after pressing Ok): @@ -55,9 +61,15 @@ Ok shows details of the current schedule Requirements: -ElchiAIO patches (or similar) with additional colors must be +On 1.2.6 ElchiAIO patches (or similar) with additional colors must be installed. +Important notes: + +On 1.2.6 the channel logos should be displayed in black/white! This setup option +will be set every time vdr starts. + +Press key "1" to open the help page. TODO: diff --git a/TVonscreen.h b/TVonscreen.h new file mode 100644 index 0000000..1cf21d0 --- /dev/null +++ b/TVonscreen.h @@ -0,0 +1,37 @@ +/* XPM */ +static char *TVonscreen[] = { +/* width height num_colors chars_per_pixel */ +" 104 27 3 1", +/* colors */ +". c #ff0000", +"l c #ffffff", +"m c none", +/* pixels */ +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm.mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm..mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm..mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm..mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmm.....................mmmmmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +".........................mmmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmm.............mmmmm....mmmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmm....mmmmmmmm.....mmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmm...mmmmmmmmm.....mmmmm..llllllllmmmmmmmmmmmmmmllllllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmm.....mmmmmmmmm.....mmmmm.ll.mmmmllmmmmmmmmmmmmmllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmm.....mmmmmmmmm.....mmmmmll..mmmmmllmmllmmllmmmmllmmmmmmmmmllllmmmlmlllmmmlllmmmmmmllmmmmmllmmllmm", +"mmmmmmm....mmmmmmmmmm......mm..ll..mmmmmllmmlllllllmmmmllmmmmmmmllllllmllllllmllllllmmmllllllmmmlllllllm", +"mmmmmmm....mmmmmmmmmmm.....mm..ll.mmmmmmllmmlllmmmlmmmmllllmmmmllmmmmmmlllmmmmllmmmllmmlmmmmllmmlllmmllm", +"mmmmmmm....mmmmmmmmmmm.....mm..ll.mmmmmmllmmlllmmmllmmmmmllllmmllmmmmmmllmmmmmlllllllmllllllllmmlllmmllm", +"mmmmmm.....mmmmmmmmmmm.....m...ll.mmmmmmllmmlllmmmllmmmmmmlllmmllmmmmmmllmmmmmlllllllmllllllllmmlllmmllm", +"mmmmmm....mmmmmmmmmmmm..........llmmmmmmllmmlllmmmllmmmmmmmllmmllmmmmmmllmmmmmllmmmmmmmlmmmmmmmmlllmmllm", +"mmmmmm....mmmmmmmmmmmmmm.........llmmmmllmmmlllmmmllmmlmmmlllmmlllmmmmmllmmmmmllmmmmmmmllmmmmmmmlllmmllm", +"mmmmmm....mmmmmmmmmmmmmm.........lllllllmmmmlllmmmllmmlllllllmmmllllllmllmmmmmmllllllmmmllllllmmlllmmllm", +"mmmmmm....mmmmmmmmmmmmmm.........mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmm...mmmmmmmmmmmmmmmm.......mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmm...mmmmmmmmmmmmmmmm.......mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmm...mmmmmmmmmmmmmmmm......mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmm...mmmmmmmmmmmmmmmmmm.mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmm...mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", +"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm" +}; @@ -1,16 +1,20 @@ /* - * anyfont.h: Internationalization + * anyfont.c: Internationalization * * See the README file for copyright information and how to reach the author. * - * $Id: anyfont.c,v 1.2 2004/03/04 23:16:22 schmitzj Exp $ + * $Id: anyfont.c,v 1.6 2004/07/08 13:46:38 schmitzj Exp $ * */ #include "anyfont.h" #include "magazine.h" +#if VDRVERSNUM >= 10307 +anyFont::anyFont(cOsd *_osd,const cFont::tPixelData *fd,int fheight,int transparent) +#else anyFont::anyFont(cOsdBase *_osd,const cFont::tPixelData *fd,int fheight,int transparent) +#endif { osd=_osd; FontData=fd; @@ -51,22 +55,30 @@ int anyFont::LargeWidth(char c) } return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]*2; } +#if VDRVERSNUM >= 10307 +int anyFont::Text(int x, int y, const char *txt, tColor fg, tColor bg) +#else int anyFont::Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) +#endif { unsigned int pxl; int row,col; while (txt && *txt) { - for (row=0; row<Height(); row++) + for (row=0; row<Height()+2; row++) { pxl = FontData[(((unsigned char)*txt)-32)*(FontHeight)+row+2]; - // XXX maybe increment col befor starting? + // XXX maybe increment col before starting? for (col=Width(*txt); col>=0; col--) { if (!trans || pxl&1) - osd->Fill(x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg,wh); +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg); +#else + osd->Fill (x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg,wh); +#endif pxl >>= 1; } } @@ -74,7 +86,11 @@ int anyFont::Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWi } return x; } +#if VDRVERSNUM >= 10307 +int anyFont::LargeText(int x, int y, const char *txt, tColor fg, tColor bg) +#else int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) +#endif { unsigned int pxl; int row,col; @@ -89,7 +105,11 @@ int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg for (col=Width(*txt); col>=0; col--) { if (!trans || pxl&1) - osd->Fill(x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg,wh); +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg); +#else + osd->Fill (x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg,wh); +#endif pxl >>= 1; } } @@ -97,7 +117,11 @@ int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg } return x; } +#if VDRVERSNUM >= 10307 +int anyFont::Text(int x, int y, int w, int h, const char *txt, tColor fg, tColor bg) +#else int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) +#endif { if (txt==NULL) return x; @@ -113,6 +137,8 @@ int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDv switch (*mytxt) { case ' ': + case '\t': + case '\n': c=*(mytxt); *(mytxt)=0; if (x0+Width(t2)>w && x0>0) @@ -121,9 +147,28 @@ int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDv y0+=Height(); } if (y0<h*Height()) +#if VDRVERSNUM >= 10307 + x0+=Text(x+x0,y+y0,t2,fg,bg) -x-x0+Width(c); +#else x0+=Text(x+x0,y+y0,t2,fg,bg,wh)-x-x0+Width(c); +#endif *(mytxt)=c; t2=mytxt+1; + if (c=='\t') + { + if (x0==0) + { + x+=20; + w-=20; + } + else + x0=((x0+20)/20)*20; + } + else if (c=='\n') + { + x0=0; + y0+=Height(); + } break; case '-': case '.': @@ -135,7 +180,11 @@ int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDv y0+=Height(); } if (y0<h*Height()) +#if VDRVERSNUM >= 10307 + x0+=Text(x+x0,y+y0,t2,fg,bg) -x-x0; +#else x0+=Text(x+x0,y+y0,t2,fg,bg,wh)-x-x0; +#endif *(mytxt+1)=c; t2=mytxt+1; break; @@ -150,7 +199,11 @@ int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDv y0+=Height(); } if (y0<h*Height()) +#if VDRVERSNUM >= 10307 + x0+=Text(x+x0,y+y0,t2,fg,bg); +#else x0+=Text(x+x0,y+y0,t2,fg,bg,wh); +#endif } free(memtxt); return y0/Height()+1; @@ -170,6 +223,8 @@ int anyFont::TextHeight(int w, const char *txt) switch (*mytxt) { case ' ': + case '\t': + case '\n': c=*(mytxt); *(mytxt)=0; if (x0+Width(t2)>w && x0>0) @@ -180,6 +235,18 @@ int anyFont::TextHeight(int w, const char *txt) x0+=Width(t2)+Width(c); *(mytxt)=c; t2=mytxt+1; + if (c=='\t') + { + if (x0==0) + w-=20; + else + x0=((x0+20)/20)*20; + } + else if (c=='\n') + { + x0=0; + y0+=Height(); + } break; case '-': case '.': @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: anyfont.h,v 1.1 2004/03/03 00:22:47 schmitzj Exp $ + * $Id: anyfont.h,v 1.2 2004/07/06 13:02:14 schmitzj Exp $ * */ @@ -14,21 +14,36 @@ class anyFont { +#if VDRVERSNUM >= 10307 + cOsd *osd; +#else cOsdBase *osd; +#endif const cFont::tPixelData *FontData; int FontHeight; int trans; public: +#if VDRVERSNUM >= 10307 + anyFont(cOsd *o,const cFont::tPixelData *fd,int fheight,int transparent=0); +#else anyFont(cOsdBase *o,const cFont::tPixelData *fd,int fheight,int transparent=0); +#endif int Height(void); int Width(const char *txt); int LargeWidth(const char *txt); int Width(char c); int LargeWidth(char c); +#if VDRVERSNUM >= 10307 + int Text(int x, int y, const char *txt, tColor fg, tColor bg); + int LargeText(int x, int y, const char *txt, tColor fg, tColor bg); + + int Text(int x, int y, int w, int h, const char *txt, tColor fg, tColor bg); +#else int Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh); int LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh); int Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh); +#endif int TextHeight(int w, const char *txt); }; @@ -1,12 +1,164 @@ /* - * magazine.c + * config.c * * See the README file for copyright information and how to reach the author. * - * $Id: magazine.c,v 1.6 2004/03/05 11:15:38 schmitzj Exp $ + * $Id: config.c,v 1.8 2004/07/08 17:06:45 schmitzj Exp $ * */ - #include "config.h" +#include "magazine.h" + +#include <getopt.h> +#include <unistd.h> +#include <vdr/menuitems.h> + +tvonscreenConfig tvonscreenCfg; + +#if VDRVERSNUM < 10307 +class cMenuEditTimeItem : public cMenuEditItem { +protected: + int *value; + int hh, mm; + int pos; + virtual void Set(void); +public: + cMenuEditTimeItem(const char *Name, int *Value); + virtual eOSState ProcessKey(eKeys Key); + }; +#endif + +tvonscreenConfig::tvonscreenConfig(void) +{ + showLogos=false; + XLfonts=true; + noInfoLine=false; + showChannels=true; +#if VDRVERSNUM >= 10307 + bwlogos=false; +#else + bwlogos=true; +#endif + colorworkaround=true; + + usertime1=1200; + usertime2=1800; + usertime3=2015; + thenshownextday=true; + + logos=NULL; +} +tvonscreenConfig::~tvonscreenConfig() +{ + if (logos) + free(logos); +} + +bool tvonscreenConfig::SetupParse(const char *Name, const char *Value) +{ + if (strcmp(Name,"showLogos")==0) showLogos = atoi(Value); + else if (strcmp(Name,"XLfonts")==0) XLfonts = atoi(Value); + else if (strcmp(Name,"noInfoLine")==0) noInfoLine = atoi(Value); + else if (strcmp(Name,"showChannels")==0) showChannels = atoi(Value); + else if (strcmp(Name,"bwlogos")==0) bwlogos = atoi(Value); + else if (strcmp(Name,"colorworkaround")==0) colorworkaround = atoi(Value); + else if (strcmp(Name,"usertime1")==0) usertime1 = atoi(Value); + else if (strcmp(Name,"usertime2")==0) usertime2 = atoi(Value); + else if (strcmp(Name,"usertime3")==0) usertime3 = atoi(Value); + else if (strcmp(Name,"thenshownextday")==0) thenshownextday = atoi(Value); + else + return false; + +#if VDRVERSNUM < 10307 + bwlogos=true; +#endif + return true; +} +const char *tvonscreenConfig::CommandLineHelp(void) +{ + // Return a string that describes all known command line options. + return " -l PathToLogos\n --logos=PathToLogos\n"; +} + +bool tvonscreenConfig::ProcessArgs(int argc, char *argv[]) +{ + static struct option long_options[] = { + { "logos", required_argument, NULL, 'l' }, + { NULL } + }; + + bool retval=true; + int c; + while ((c = getopt_long(argc, argv, "l:", long_options, NULL)) != -1) + { + switch (c) + { + case 'l': + if (logos) + { + free(logos); + logos=NULL; + } + logos = strdup(optarg); + retval=true; + break; + default: + break; + } + } + return retval; +} + +// ---------------------------------------------------------------------- + +tvonscreenConfigPage::tvonscreenConfigPage(void) : cMenuSetupPage() +{ + m_NewConfig = tvonscreenCfg; + +#if TL_YSTART == 48 + Add(new cMenuEditBoolItem(tr("show channel logos"), + &m_NewConfig.showLogos)); + Add(new cMenuEditBoolItem(tr("show channel names"), + &m_NewConfig.showChannels)); + Add(new cMenuEditBoolItem(tr("show logos in black&white"), + &m_NewConfig.bwlogos)); + Add(new cMenuEditBoolItem(tr("enable color problem work around"), + &m_NewConfig.colorworkaround)); +#endif + Add(new cMenuEditBoolItem(tr("use XL fonts"), + &m_NewConfig.XLfonts)); + Add(new cMenuEditBoolItem(tr("hide info line"), + &m_NewConfig.noInfoLine)); + + Add(new cMenuEditTimeItem(tr("user point in time 1 (Key 4)"), + &m_NewConfig.usertime1)); + Add(new cMenuEditTimeItem(tr("user point in time 2 (Key 5)"), + &m_NewConfig.usertime2)); + Add(new cMenuEditTimeItem(tr("user point in time 3 (Key 6)"), + &m_NewConfig.usertime3)); + + Add(new cMenuEditBoolItem(tr("jump to next day point if ago"), + &m_NewConfig.thenshownextday)); + +} + +tvonscreenConfigPage::~tvonscreenConfigPage() +{ +} + +void tvonscreenConfigPage::Store(void) +{ + SetupStore("showLogos", m_NewConfig.showLogos); + SetupStore("XLfonts", m_NewConfig.XLfonts); + SetupStore("noInfoLine", m_NewConfig.XLfonts); + SetupStore("showChannels", m_NewConfig.showChannels); + SetupStore("bwlogos", m_NewConfig.bwlogos); + SetupStore("colorworkaround", m_NewConfig.colorworkaround); + SetupStore("usertime1", m_NewConfig.usertime1); + SetupStore("usertime2", m_NewConfig.usertime2); + SetupStore("usertime3", m_NewConfig.usertime3); + SetupStore("thenshownextday", m_NewConfig.thenshownextday); + tvonscreenCfg = m_NewConfig; +} @@ -1,32 +1,56 @@ /* - * magazine.c + * config.h * * See the README file for copyright information and how to reach the author. * - * $Id: config.h,v 1.1 2004/03/05 12:16:26 schmitzj Exp $ + * $Id: config.h,v 1.5 2004/07/08 10:46:44 schmitzj Exp $ * */ - #ifndef TVONSCREEN_CONFIG_H #define TVONSCREEN_CONFIG_H - #include <vdr/config.h> - -#define MAX +#include <vdr/menuitems.h> class tvonscreenConfig { - public: - tvonscreenConfig(void) - { - *NameUser = 0; - } + tvonscreenConfig(void); + ~tvonscreenConfig(); + bool SetupParse(const char *Name, const char *Value); + bool ProcessArgs(int argc, char *argv[]); + const char *CommandLineHelp(void); + +// char showChannels[]; + int showLogos; + int XLfonts; + int noInfoLine; + int showChannels; + int bwlogos; + int colorworkaround; + int usertime1; + int usertime2; + int usertime3; + int thenshownextday; + + char *logos; +}; - char showChannels[]; +extern tvonscreenConfig tvonscreenCfg; + +class tvonscreenConfigPage : public cMenuSetupPage +{ +private: + tvonscreenConfig m_NewConfig; + +protected: + virtual void Store(void); + +public: + tvonscreenConfigPage(void); + virtual ~tvonscreenConfigPage(); }; #endif diff --git a/gfxtools.c b/gfxtools.c new file mode 100644 index 0000000..cb1b947 --- /dev/null +++ b/gfxtools.c @@ -0,0 +1,173 @@ +/* + * gfxtools.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: gfxtools.c,v 1.7 2004/07/08 10:46:44 schmitzj Exp $ + * + */ + +#include <vdr/plugin.h> +#include "gfxtools.h" +#include <string.h> + +bool DrawXpm(const char *FileName,areaT *drawable,int x,int y,winhandleT winhand,bool blackwhite) +{ // Bases on vdr cBitmap::LoadXpm but made more readable + // and added x/y support + bool Result = false; + FILE *f = fopen(FileName, "r"); + if (f) + { + char **Xpm = NULL; + bool isXpm = false; + int lines = 0; + int index = 0; + char *s; + + while ((s = readline(f)) != NULL) + { + s = skipspace(s); + if (!isXpm) + { + if (strcmp(s, "/* XPM */") != 0) + { + esyslog("ERROR: invalid header in XPM file '%s'", FileName); + break; + } + isXpm = true; + } + else if (*s++ == '"') + { + if (!lines) + { + int w, h, n, c; + if (4 != sscanf(s, "%d %d %d %d", &w, &h, &n, &c)) + { + esyslog("ERROR: faulty 'values' line in XPM file '%s'", FileName); + break; + } + lines = h + n + 1; + Xpm = MALLOC(char *, lines); + } + char *q = strchr(s, '"'); + if (!q) + { + esyslog("ERROR: missing quotes in XPM file '%s'", FileName); + break; + } + *q = 0; + if (index < lines) + Xpm[index++] = strdup(s); + else + { + esyslog("ERROR: too many lines in XPM file '%s'", FileName); + break; + } + } + } + if (index == lines) + Result = DrawXpm(Xpm,drawable,x,y,winhand,blackwhite); + else + esyslog("ERROR: too few lines in XPM file '%s'", FileName); + for (int i = 0; i < index; i++) + free(Xpm[i]); + free(Xpm); + fclose(f); + } + else + esyslog("ERROR: can't open XPM file '%s'", FileName); + return Result; +} + +bool DrawXpm(char *Xpm[], areaT *drawable,int x0,int y0,winhandleT winhand,bool blackwhite) +{ // Bases on vdr cBitmap::LoadXpm but made more readable + // and added x/y support and "none" is now no longer drawn + char **p = Xpm; + int w, h, n, c; + if (4 != sscanf(*p, "%d %d %d %d", &w, &h, &n, &c)) + { + esyslog("ERROR: faulty 'values' line in XPM: '%s'", *p); + return false; + } + if (n > MAXNUMCOLORS) + { + esyslog("ERROR: too many colors in XPM: %d", n); + return false; + } + + int NoneColorIndex = MAXNUMCOLORS; +#if VDRVERSNUM >= 10307 + tColor cols[n]; +#else + eDvbColor cols[n]; +#endif + for (int i = 0; i < n; i++) + { + const char *s = *++p; + if (int(strlen(s)) < c) + { + esyslog("ERROR: faulty 'colors' line in XPM: '%s'", s); + return false; + } + s = skipspace(s + c); + if (*s != 'c') + { + esyslog("ERROR: unknown color key in XPM: '%c'", *s); + return false; + } + s = skipspace(s + 1); + if (strcasecmp(s, "none") == 0) + { + s = "#00000000"; + NoneColorIndex = i; + } + if (*s != '#') + { + esyslog("ERROR: unknown color code in XPM: '%c'", *s); + return false; + } + unsigned int col=strtoul(++s, NULL, 16); + if (blackwhite) + { + int bwcol=(int)(0.299*(double)((col & 0xff0000) >> 16) + 0.587*(double)((col & 0xff00) >> 8) + 0.114*(double)(col & 0xff)); + if (bwcol>0xff) bwcol=0xff; + bwcol&=(0xff-31); + col=(bwcol<<16) | (bwcol<<8)| (bwcol); + } +#if VDRVERSNUM >= 10307 + cols[i] = col | 0xFF000000; +#else + cols[i] = (eDvbColor)(((col & 0xff) << 16) | (col & 0xff00) | ((col & 0xff0000) >> 16) | 0xFF000000); +#endif + } + for (int y = 0; y < h; y++) + { + const char *s = *++p; + if (int(strlen(s)) != w * c) + { + esyslog("ERROR: faulty pixel line in XPM: %d '%s'", y, s); + return false; + } + for (int x = 0; x < w; x++) + { + for (int i = 0; i < n; i++) + { + if (strncmp(Xpm[i + 1], s, c) == 0) + { + if (i != NoneColorIndex) + { +#if VDRVERSNUM >= 10307 + drawable->DrawPixel(x0+x,y0+y, cols[i]); +#else +// drawable->AddColor(cols[i],winhand); + drawable->Fill(x0+x,y0+y,x0+x,y0+y,cols[i],winhand); +#endif + } + break; + } + } + s += c; + } + } + return true; +} diff --git a/gfxtools.h b/gfxtools.h new file mode 100644 index 0000000..9906542 --- /dev/null +++ b/gfxtools.h @@ -0,0 +1,27 @@ +/* + * gfxtools.h + * + * See the README file for copyright information and how to reach the author. + * + * $Id: gfxtools.h,v 1.6 2004/07/07 15:14:23 schmitzj Exp $ + * + */ + +#ifndef GFXTOOLS_H +#define GFXTOOLS_H + +#include <vdr/plugin.h> +#include "anyfont.h" + +#if VDRVERSNUM >= 10307 +typedef cOsd areaT; +typedef int winhandleT; +#else +typedef cOsdBase areaT; +typedef tWindowHandle winhandleT; +#endif + +bool DrawXpm(const char *FileName,areaT *drawable,int x0,int y0,winhandleT winhand=0,bool blackwhite=false); +bool DrawXpm(char *Xpm[], areaT *drawable,int x0,int y0,winhandleT winhand=0,bool blackwhite=false); + +#endif @@ -3,60 +3,705 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: i18n.c,v 1.2 2004/03/03 00:22:47 schmitzj Exp $ + * $Id: i18n.c,v 1.11 2004/07/27 20:51:51 schmitzj Exp $ * */ #include "i18n.h" const tI18nPhrase tvoPhrases[] = { - { "TV-Onscreen", - "TV-Onscreen", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { "o'clock", - "Uhr", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - }, - { "%d-%m", - "%d.%m.", - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO - "",// TODO + { "TV-OnScreen", // English + "TV-OnScreen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "TV-ohjelmat", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif }, + { "Shows the EPG info in form of a typical TV magazine", // English + "", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "TV-ohjelmatiedot (OSD)", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "o'clock", // English + "Uhr", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + " ", // suomi (empty space) + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "%d-%m", // English + "%d.%m.", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "%d.%m.", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "Press 1 for help", // English + "Für Hilfe die 1 drücken", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Paina '1' nähdäksesi opasteen", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "show channel logos", // English + "zeige Kanal-Logos", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä kanavien logot", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "use XL fonts", // English + "benutze XL Schrift", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Käytä XL-kirjasinta", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "hide info line", // English + "verstecke Info Zeile", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Piilota inforivi", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "show channel names", // English + "zeige Kanal-Namen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä kanavien nimet", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "show logos in black&white", // English + "zeige Kanal-Logos in Schwarz/Weiß", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä logot mustavalkoisina", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "enable color problem work around", // English + "Farbproblem Umgehung aktivieren", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Saksalainen värikorjaus", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "user point in time 1 (Key 4)", // English + "Anwenderzeitpunkt 1 (Taste 4)", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Ajankohta #1 (näppäin '4')", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "user point in time 2 (Key 5)", // English + "Anwenderzeitpunkt 2 (Taste 5)", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Ajankohta #2 (näppäin '5')", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "user point in time 3 (Key 6)", // English + "Anwenderzeitpunkt 3 (Taste 6)", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Ajankohta #3 (näppäin '6')", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "jump to next day point if ago", // English + "Gehe zum nächsten Tag wenn vorbei", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Siirry tarvittaessa seur. päivään", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + +// Help + { "NORMAL MODE:", // English + "NORMALER MODUS:", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "NORMAALITILA:\n", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "arrows\n\tmove view", // English + "Pfeile\n\tAnsicht bewegen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Nuolinäppäimet'\n\tohjaa näkymää", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "back\n\tclose TV OnScreen", // English + "back\n\tschließe TV OnScreen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Takaisin'\n\tsulje laajennos", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "red/blue\n\t-/+ one day", // English + "rot/blau\n\t-/+ ein Tag", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Punainen'/'Sininen'\n\tyksi päivä eteen/taaksepäin", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "green/yellow\n\tone page left/right", // English + "grün/gelb\n\teine Seite links/rechts", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Vihreä'/'Keltainen'\n\tseuraava/edellinen sivu", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "7/9\n\tone page left/right", // English + "7/9\n\teine Seite links/rechts", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'7'/'9'\n\tseuraava/edellinen sivu", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "8\n\tgoto current channel", // English + "8\n\tgehe zum aktuellen Kanal", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'8'\n\tsiirry nykyiselle kanavalle", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "0\n\tgoto now", // English + "0\n\tgehe zur aktuellen Zeit", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'0'\n\tsiirry nykyhetkeen", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "4/5/6\n\tgoto configured time", // English + "4/5/6\n\tgehe zu eingestellten Zeitpunkten", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'4'/'5'/'6'\n\tsiirry määriteltyyn ajankohtaan", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "ok\n\tswitch to edit mode\n", // English + "ok\n\taktiviere Editier-Modus\n", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'OK'\n\tvaihda muokkaustilaan\n", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "EDIT MODE:", // English + "EDITIER MODUS:", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "MUOKKAUSTILA:\n", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "back\n\tback to normal mode", // English + "back\n\tzurück zum normalen Modus", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Takaisin'\n\tvaihda normaalitilaan", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "arrows\n\tmove selected schedule", // English + "Pfeile\n\tSendung auswählen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Nuolinäppäimet'\n\tvalitse ohjelma", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "record\n\tcreate timer", // English + "record\n\terzeuge Timer", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Tallenna'\n\tluo ajastin", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { "ok\n\tshow details", // English + "ok\n\tzeige Sendungsdetails", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'OK'\n\tnäytä lisätiedot", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#endif +#endif + }, + { NULL } }; @@ -3,11 +3,34 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: magazine.c,v 1.10 2004/03/23 14:08:25 schmitzj Exp $ + * $Id: magazine.c,v 1.26 2004/07/27 20:51:51 schmitzj Exp $ * */ #include "magazine.h" +#include "TVonscreen.h" + +#if VDRVERSNUM >= 10307 +#define clrGrey 0xFF5F5F5F +#define clrBackground clrGray50 // this should be tied somehow into current theme + +static tArea Areas[NUMBER_OF_AREAS] = +{ +#ifndef MULTINAMES + { 8+45, 0, 8+45 + 188*2+184 - 1, 0 + 48/*20*/ - 1, 8 }, // NAMES_AREA +#else + { 8+45, 0, 8+45 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME1_AREA + { 8+45+188, 0, 8+45+188 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME2_AREA + { 8+45+188*2, 0, 8+45+188*2 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME3_AREA +#endif + { 0, 0, 0 + 8+40 - 1, TL_YSTART + 384 - 1, 2 }, // TIMELINE_AREA + { 8+45, TL_YSTART, 8+45 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED1_AREA + { 8+45+188, TL_YSTART, 8+45+188 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED2_AREA + { 8+45+188*2, TL_YSTART, 8+45+188*2 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED3_AREA + { 50, 384+TL_YSTART+8, 50 + 8+45+188*2+184-101 - 1, 384+TL_YSTART+8 + 20 - 1, 2 }, // CONTROL_AREA +}; + +#endif static int CompareSchedules(const void *p1, const void *p2) { @@ -107,6 +130,9 @@ magazine::magazine(class cPlugin *p) ev2=NULL; ev3=NULL; fullHours=NULL; + fullHours_tmp1=NULL; + fullHours_tmp2=NULL; + fullHours_tmp3=NULL; currentFirstTime=time(NULL); } @@ -123,6 +149,9 @@ magazine::~magazine(void) met=NULL; } + delete [] fullHours_tmp3; + delete [] fullHours_tmp2; + delete [] fullHours_tmp1; delete [] fullHours; delete [] ev1; delete [] ev2; @@ -136,87 +165,207 @@ magazine::~magazine(void) free(schedArray); delete osd; } -/* void magazine::printHead(const cSchedule *s,tWindowHandle sched) +void magazine::printLogo(const cSchedule *s,int p) { cChannel* channel; const char *txt; - - osd->Clear(sched); - osd->Fill(0,0,184,20,clrBlue,sched); + int x=184*p+p*4; + int currentChannel; + +#if VDRVERSNUM >= 10300 +#ifdef MULTINAMES + int a=0; + switch (p) + { + case 0: + default: + a=NAME1_AREA; + break; + case 1: + a=NAME2_AREA; + break; + case 2: + a=NAME3_AREA; + break; + } + x=0; +#else + int a=NAMES_AREA; +#endif +#endif if (s!=NULL) { + currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); #if VDRVERSNUM >= 10300 channel = Channels.GetByChannelID(s->ChannelID(), true); #else channel = Channels.GetByChannelID(s->GetChannelID(), true); #endif txt=channel->Name(); - if (f3->LargeWidth(txt)>184) - f3->Text((184-f3->Width(txt))/2,0,txt,clrWhite,clrBlue,sched); - else - f3->LargeText((184-f3->LargeWidth(txt))/2,0,txt,clrWhite,clrBlue,sched); + // logo: 64x48px + + const char *ConfigDirectory=cPlugin::ConfigDirectory("../logos"); + if (tvonscreenCfg.logos) + ConfigDirectory=tvonscreenCfg.logos; + char *fname=new char[strlen(ConfigDirectory) + 1 + strlen(txt) + strlen(".xpm") + 1]; + sprintf(fname,"%s/%s.xpm",ConfigDirectory,txt); +#if VDRVERSNUM >= 10300 + DrawXpm(fname,osd,x+Areas[a].x1,Areas[a].y1,0,tvonscreenCfg.bwlogos); +#else + DrawXpm(fname,osd,x,0,names,tvonscreenCfg.bwlogos); +#endif } - osd->Fill(0,21,184,23,clrTransparent,sched); -} */ +} void magazine::printHead(const cSchedule *s,int p) { cChannel* channel; const char *txt; int x=184*p+p*4; int currentChannel; + int wmin=0,yoff=0; + + if (tvonscreenCfg.showLogos) + wmin=64; - osd->Fill(x,0,x+188,20,clrBlue,names); - if (s!=NULL) +#if VDRVERSNUM >= 10307 +#ifdef MULTINAMES + int a; + switch (p) { - enum eDvbColor col=clrWhite; + case 0: + default: + a=NAME1_AREA; + break; + case 1: + a=NAME2_AREA; + break; + case 2: + a=NAME3_AREA; + break; + } + x=0; +#else + int a=NAMES_AREA; +#endif +#if TL_YSTART == 48 + yoff=28; + osd->DrawRectangle(x+Areas[a].x1,0+Areas[a].y1+0,x+Areas[a].x1+188,Areas[a].y1+48,clrTransparent); + osd->DrawEllipse(x+Areas[a].x1+182-28,0+Areas[a].y1,x+Areas[a].x1+182,Areas[a].y1+28,clrGrey,1); + osd->DrawEllipse(x+Areas[a].x1+182-28-2,0+Areas[a].y1+2,x+Areas[a].x1+182-2,Areas[a].y1+28+2,clrTransparent,1); + + osd->DrawEllipse(x+Areas[a].x1,Areas[a].y1,x+Areas[a].x1+28,Areas[a].y1+28,clrGrey,2); + osd->DrawEllipse(x+Areas[a].x1+2,Areas[a].y1+2,x+Areas[a].x1+28+2,Areas[a].y1+28+2,clrTransparent,2); + + osd->DrawRectangle(x+Areas[a].x1+28,0+Areas[a].y1,x+Areas[a].x1+182-28,Areas[a].y1+2,clrGrey); + osd->DrawRectangle(x+Areas[a].x1+182-2,0+Areas[a].y1+28,x+Areas[a].x1+182,Areas[a].y1+28+20,clrGrey); + osd->DrawRectangle(x+Areas[a].x1,0+Areas[a].y1+28,x+Areas[a].x1+2,Areas[a].y1+28+20,clrGrey); // nie zu sehen, außer wenn kein Logo gefunden wird + + if (p==2) DrawXpm(TVonscreen,osd,x+Areas[a].x1+182-110,0+Areas[a].y1); + + if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) +#endif + osd->DrawRectangle(x+Areas[a].x1,yoff+Areas[a].y1,x+Areas[a].x1+182,Areas[a].y1+20+yoff,clrBlue); +#else +#if TL_YSTART == 48 + osd->Fill(x,0,x+182,20+28,clrGrey,names); + osd->Fill(x+2,2,x+182-2,20+28,clrTransparent,names); + if (p==2) DrawXpm(TVonscreen,osd,x+182-110,0,names); + yoff=28; + if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) +#endif + osd->Fill(x,0+yoff,x+182,20+yoff,clrBlue,names); + +#endif + if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) + { + if (s!=NULL) + { +#if VDRVERSNUM >= 10307 + tColor col=clrWhite; +#else + enum eDvbColor col=clrWhite; +#endif - currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); + currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); #if VDRVERSNUM >= 10300 - channel = Channels.GetByChannelID(s->ChannelID(), true); + channel = Channels.GetByChannelID(s->ChannelID(), true); #else - channel = Channels.GetByChannelID(s->GetChannelID(), true); + channel = Channels.GetByChannelID(s->GetChannelID(), true); +#endif + if (currentChannel==channel->Number()) + { + col=clrCyan; + } + txt=channel->Name(); + + if (!tvonscreenCfg.XLfonts || f3->LargeWidth(txt)>=184-wmin) +#if VDRVERSNUM >= 10307 + f3->Text(wmin+x+Areas[a].x1+(184-wmin-f3->Width(txt))/2,Areas[a].y1+yoff-1,txt,col,clrBlue); +#else + f3->Text(wmin+x+(184-wmin-f3->Width(txt))/2,-1+yoff,txt,col,clrBlue,names); +#endif + else +#if VDRVERSNUM >= 10307 + f3->LargeText(wmin+x+Areas[a].x1+(184-wmin-f3->LargeWidth(txt))/2,Areas[a].y1+yoff-1,txt,col,clrBlue); +#else + f3->LargeText(wmin+x+(184-wmin-f3->LargeWidth(txt))/2,-1+yoff,txt,col,clrBlue,names); #endif - if (currentChannel==channel->Number()) - { - col=clrCyan; } - txt=channel->Name(); - if (f3->LargeWidth(txt)>184) - f3->Text(x+(184-f3->Width(txt))/2,-1,txt,col,clrBlue,names); - else - f3->LargeText(x+(184-f3->LargeWidth(txt))/2,-1,txt,col,clrBlue,names); } } -void magazine::showHeads() +void magazine::showHeads(bool onlyBG) { - const cSchedule *s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; - const cSchedule *s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; - const cSchedule *s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; + const cSchedule *s1=NULL,*s2=NULL,*s3=NULL; + + if (!onlyBG) + { + s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; + s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; + s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; + } printHead(s1,0); printHead(s2,1); printHead(s3,2); + + if (tvonscreenCfg.showLogos) + { + printLogo(s1,0); + printLogo(s2,1); + printLogo(s3,2); + } } void magazine::showKeys(void) { char txt[100]; +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(Areas[CONTROL_AREA].x1, Areas[CONTROL_AREA].y1, Areas[CONTROL_AREA].x2+1, Areas[CONTROL_AREA].y2+1, clrTransparent); +#else osd->Clear(control); +#endif + if (tvonscreenCfg.noInfoLine) + return; + txt[0]=0; if (curmode==SHOW) { - sprintf(txt,"%s",tr("Keys: Up/Down/Left/Right/Red/Blue/Green/Yellow/Ok/Back/7/8/9/0")); - } - else if (curmode==EDIT) - { - sprintf(txt,"%s",tr("Keys: Up/Down/Ok/Back/Rec")); + sprintf(txt,"%s",tr("Press 1 for help")); } +#if VDRVERSNUM >= 10307 + f4->Text(Areas[CONTROL_AREA].x1+(8+45+188*2+184-101-f4->Width(txt))/2,Areas[CONTROL_AREA].y1,txt,clrWhite,clrBackground); +#else f4->Text((8+45+188*2+184-100-f4->Width(txt))/2,-1,txt,clrWhite,clrBackground,control); +#endif } void magazine::showTimeline(void) { int lh=-1; int lhc=0; +#if VDRVERSNUM >= 10307 + tColor hgr[]={clrBlue,clrBlack}; +#else enum eDvbColor hgr[]={clrBlue,clrBlack}; +#endif char dtxt[50]; time_t t1; struct tm tm_r1; @@ -224,56 +373,105 @@ void magazine::showTimeline(void) t1=currentFirstTime; localtime_r(&t1,&tm_r1); - osd->Fill(0,0,48,424,clrBlack,timeline); +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,48,400+TL_YSTART,clrBlack); +#else + osd->Fill(0,0,48,400+TL_YSTART,clrBlack,timeline); +#endif for(int i=0;i<evnum;i++) { - int y=i*f1->Height()+24; + int y=i*f1->Height()+TL_YSTART; if (lh!=fullHours[i] && fullHours[i]>=0) { lh=fullHours[i]; lhc=lh&1; } +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,y+Areas[TIMELINE_AREA].y1,48,y+f1->Height(),hgr[lhc]); +#else osd->Fill(0,y,48,y+f1->Height(),hgr[lhc],timeline); +#endif } +#if TL_YSTART == 24 strftime(dtxt,sizeof(dtxt),tr("%d-%m"),&tm_r1); +#if VDRVERSNUM >= 10307 + f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,dtxt,clrWhite,clrBlack); +#else f3->Text((48-f3->Width(dtxt))/2,0,dtxt,clrWhite,clrBlack,timeline); - +#endif +#else + strcpy(dtxt,WeekDayName(tm_r1.tm_wday)); +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,Areas[TIMELINE_AREA].x1+48,Areas[TIMELINE_AREA].y1+f3->Height()*2,clrWhite); + osd->DrawRectangle(2+Areas[TIMELINE_AREA].x1,2+Areas[TIMELINE_AREA].y1,Areas[TIMELINE_AREA].x1+48-2,Areas[TIMELINE_AREA].y1+f3->Height(),clrBlack); + f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,dtxt,clrWhite,clrBlack); +#else + osd->Fill(0,0,48,f3->Height()*2,clrWhite,timeline); + osd->Fill(2,2,48-2,f3->Height(),clrBlack,timeline); + f3->Text((48-f3->Width(dtxt))/2,0,dtxt,clrWhite,clrBlack,timeline); +#endif + strftime(dtxt,sizeof(dtxt),tr("%d-%m"),&tm_r1); +#if VDRVERSNUM >= 10307 + f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1+f3->Height(),dtxt,clrBlack,clrWhite); +#else + f3->Text((48-f3->Width(dtxt))/2,0+f3->Height(),dtxt,clrBlack,clrWhite,timeline); +#endif +#endif for(int i=0;i<evnum;i++) { - int y=i*f1->Height()+24; + int y=i*f1->Height()+TL_YSTART; if (fullHours[i]>=0 && lh!=fullHours[i]) { char txt[50]; sprintf(txt,"%02d",fullHours[i]); lh=fullHours[i]; +#if VDRVERSNUM >= 10307 + f1->Text((48-f1->Width(txt))/2+Areas[TIMELINE_AREA].x1,y+Areas[TIMELINE_AREA].y1,txt,clrWhite,clrBlack); +#else f1->Text((48-f1->Width(txt))/2,y,txt,clrWhite,clrBlack,timeline); +#endif if (i+1<evnum && (fullHours[i+1]==lh || fullHours[i+1]==-1)) { strcpy(txt,tr("o'clock")); +#if VDRVERSNUM >= 10307 + f2->Text((48-f2->Width(txt))/2+Areas[TIMELINE_AREA].x1,y+f1->Height()+Areas[TIMELINE_AREA].y1,txt,clrWhite,clrBlack); +#else f2->Text((48-f2->Width(txt))/2,y+f1->Height(),txt,clrWhite,clrBlack,timeline); +#endif } } } - osd->Flush(); } -#if VDRVERSNUM >= 10300 +#if VDRVERSNUM >= 10307 +void magazine::showSched(const cSchedule *s,cEvent **ev,tMagazineArea area) +#elif VDRVERSNUM >= 10300 void magazine::showSched(const cSchedule *s,cEvent **ev,tWindowHandle sched) -{ - cEvent *oldev=NULL,*cev=NULL; #else void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) +#endif { +#if VDRVERSNUM >= 10300 + cEvent *oldev=NULL,*cev=NULL; +#else cEventInfo *oldev=NULL,*cev=NULL; #endif + int j=0; - const char *txt; + const char *txt,*timetxt; int lh=-1; int lhc=0; +#if VDRVERSNUM >= 10307 + tColor hgr[]={clrGrey,clrBackground}; + tColor col=clrWhite; + + osd->DrawRectangle(Areas[area].x1, Areas[area].y1, Areas[area].x2+1, Areas[area].y2+1, clrGray50); +#else enum eDvbColor hgr[]={clrGrey,clrBackground}; enum eDvbColor col=clrWhite; osd->Clear(sched); +#endif for(int i=0;i<evnum;i++) { @@ -283,7 +481,11 @@ void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) lh=fullHours[i]; lhc=lh&1; } +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(Areas[area].x1,Areas[area].y1+y,Areas[area].x1+184,Areas[area].y1+y+f1->Height(),hgr[lhc]); +#else osd->Fill(0,y,184,y+f1->Height(),hgr[lhc],sched); +#endif } for(int i=0;i<evnum;i++) { @@ -302,7 +504,13 @@ void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) #endif int cc=f2->TextHeight(184-f1->Width("00:0"),txt); if (cc<=i-j) + { +#if VDRVERSNUM >= 10307 + f2->Text(f1->Width("00:0")+Areas[area].x1,(j)*f1->Height()+Areas[area].y1,184-f1->Width("00:0"),i-j,txt,col,clrBackground); +#else f2->Text(f1->Width("00:0"),(j)*f1->Height()/*+24*/,184-f1->Width("00:0"),i-j,txt,col,clrBackground,sched); +#endif + } } col=clrWhite; #if VDRVERSNUM >= 10300 @@ -314,14 +522,21 @@ void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) col=clrYellow; EDIT_curEVI=i; } - txt=cev->GetTimeString(); - f1->Text(0,y,txt,col,clrBackground,sched); + timetxt=cev->GetTimeString(); #if VDRVERSNUM >= 10300 txt=cev->Title(); #else txt=cev->GetTitle(); #endif +#if VDRVERSNUM >= 10307 + if (i+f1->TextHeight(f1->Width("00:00 ")+Areas[area].x1,txt)>=evnum) + break; + f1->Text(Areas[area].x1,y+Areas[area].y1,timetxt,col,clrBackground); + j=i+f1->Text(f1->Width("00:00 ")+Areas[area].x1,y+Areas[area].y1,184-f1->Width("00:00 "),20,txt,col,clrBackground); +#else + f1->Text(0,y,timetxt,col,clrBackground,sched); j=i+f1->Text(f1->Width("00:00 "),y,184-f1->Width("00:00 "),20,txt,col,clrBackground,sched); +#endif oldev=cev; } } @@ -333,7 +548,12 @@ void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) #else txt=oldev->GetSubtitle(); #endif - f2->Text(f1->Width("00:0"),j*f1->Height()/*+24*/,184-f1->Width("00:0"),evnum-j,txt,col,clrBackground,sched); +#if VDRVERSNUM >= 10307 + if (j+f2->TextHeight(f1->Width("00:00")+Areas[area].x1,txt)>=evnum) + f2->Text(f1->Width("00:0")+Areas[area].x1,j*f1->Height()+Areas[area].y1,184-f1->Width("00:0"),evnum-j,txt,col,clrBackground); +#else + f2->Text(f1->Width("00:0"),j*f1->Height(),184-f1->Width("00:0"),evnum-j,txt,col,clrBackground,sched); +#endif } } void magazine::showScheds() @@ -344,30 +564,45 @@ void magazine::showScheds() if (s1!=NULL) { +#if VDRVERSNUM >= 10307 + showSched(s1,ev1,SCHED1_AREA); +#else showSched(s1,ev1,sched1); +#endif } if (s2!=NULL) { +#if VDRVERSNUM >= 10307 + showSched(s2,ev2,SCHED2_AREA); +#else showSched(s2,ev2,sched2); +#endif } if (s3!=NULL) { +#if VDRVERSNUM >= 10307 + showSched(s3,ev3,SCHED3_AREA); +#else showSched(s3,ev3,sched3); +#endif } } #if VDRVERSNUM >= 10300 const cEvent *magazine::getNext(const cSchedule *s,const cEvent *e) +#else +const cEventInfo *magazine::getNext(const cSchedule *s,const cEventInfo *e) +#endif { +#if VDRVERSNUM >= 10300 const cEvent *pe = NULL; time_t ref = e->StartTime(); #else -const cEventInfo *magazine::getNext(const cSchedule *s,const cEventInfo *e) -{ const cEventInfo *pe = NULL; time_t ref = e->GetTime(); #endif + time_t delta = INT_MAX; #if VDRVERSNUM >= 10306 for (int i=0;i< (s->Events())->Count();i++) @@ -400,29 +635,36 @@ const cEventInfo *magazine::getNext(const cSchedule *s,const cEventInfo *e) } #if VDRVERSNUM >= 10300 const cEvent *magazine::getPrev(const cSchedule *s,const cEvent *e) +#else +const cEventInfo *magazine::getPrev(const cSchedule *s,const cEventInfo *e) +#endif { +#if VDRVERSNUM >= 10300 const cEvent *pe = NULL; time_t ref = e->StartTime(); #else -const cEventInfo *magazine::getPrev(const cSchedule *s,const cEventInfo *e) -{ const cEventInfo *pe = NULL; time_t ref = e->GetTime(); #endif time_t delta = INT_MAX; + + #if VDRVERSNUM >= 10306 for (int i=0;i< (s->Events())->Count();i++) - { - const cEvent *p = (s->Events())->Get(i); #else for (int i=0;i<s->NumEvents();i++) +#endif { +#if VDRVERSNUM >= 10306 + const cEvent *p = (s->Events())->Get(i); +#else #if VDRVERSNUM >= 10300 const cEvent *p = s->GetEventNumber(i); #else const cEventInfo *p = s->GetEventNumber(i); #endif // VDRVERSNUM >= 10300 #endif // VDRVERSNUM >= 10306 + if (p!=e) { #if VDRVERSNUM >= 10300 @@ -441,12 +683,14 @@ const cEventInfo *magazine::getPrev(const cSchedule *s,const cEventInfo *e) } #if VDRVERSNUM >= 10300 void magazine::calcSched(const cSchedule *s,cEvent **ev) +#else +void magazine::calcSched(const cSchedule *s,cEventInfo **ev) +#endif { +#if VDRVERSNUM >= 10300 const cEvent *cev=NULL; const cEvent *cev2=NULL; #else -void magazine::calcSched(const cSchedule *s,cEventInfo **ev) -{ const cEventInfo *cev=NULL; const cEventInfo *cev2=NULL; #endif @@ -464,16 +708,13 @@ void magazine::calcSched(const cSchedule *s,cEventInfo **ev) #if VDRVERSNUM >= 10300 cc=f1->TextHeight(184-f1->Width("00:00 "),cev->Title()); time_t t=cev->StartTime(); - struct tm tm_r; - localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); #else cc=f1->TextHeight(184-f1->Width("00:00 "),cev->GetTitle()); time_t t=cev->GetTime(); +#endif struct tm tm_r; localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->GetTitle()); -#endif + fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); } } else @@ -484,29 +725,26 @@ void magazine::calcSched(const cSchedule *s,cEventInfo **ev) { #if VDRVERSNUM >= 10300 int z=(cev2->StartTime()-currentFirstTime)*6/60/60; +#else + int z=(cev2->GetTime()-currentFirstTime)*6/60/60; +#endif if (z<i) { cev=cev2; cev2=NULL; + +#if VDRVERSNUM >= 10300 cc=f1->TextHeight(184-f1->Width("00:00 "),cev->Title()); time_t t=cev->StartTime(); - struct tm tm_r; - localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); - } #else - int z=(cev2->GetTime()-currentFirstTime)*6/60/60; - if (z<i) - { - cev=cev2; - cev2=NULL; cc=f1->TextHeight(184-f1->Width("00:00 "),cev->GetTitle()); time_t t=cev->GetTime(); +#endif + struct tm tm_r; localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->GetTitle()); + fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); } -#endif } } #if VDRVERSNUM >= 10300 @@ -525,28 +763,310 @@ void magazine::calcScheds() for(int i=0;i<evnum;i++) { fullHours[i]=-1; + fullHours_tmp1[i]=-1; + fullHours_tmp2[i]=-1; + fullHours_tmp3[i]=-1; } if (s1!=NULL) { calcSched(s1,ev1); + for(int i=0;i<evnum;i++) + { + fullHours_tmp1[i]=fullHours[i]; + fullHours[i]=-1; + } } if (s2!=NULL) { calcSched(s2,ev2); + for(int i=0;i<evnum;i++) + { + fullHours_tmp2[i]=fullHours[i]; + fullHours[i]=-1; + } } if (s3!=NULL) { calcSched(s3,ev3); + for(int i=0;i<evnum;i++) + { + fullHours_tmp3[i]=fullHours[i]; + fullHours[i]=-1; + } + } + int lfh1,lfh2,lfh3; + lfh1=lfh2=lfh3=-1; + for(int i=0;i<evnum;i++) + { + if (fullHours_tmp1[i]>=0) + lfh1=fullHours_tmp1[i]; + fullHours_tmp1[i]=lfh1; + if (fullHours_tmp2[i]>=0) + lfh2=fullHours_tmp2[i]; + fullHours_tmp2[i]=lfh2; + if (fullHours_tmp3[i]>=0) + lfh3=fullHours_tmp3[i]; + fullHours_tmp3[i]=lfh3; + if (fullHours_tmp1[i]>fullHours[i]) + fullHours[i]=fullHours_tmp1[i]; + if (fullHours_tmp2[i]>fullHours[i]) + fullHours[i]=fullHours_tmp2[i]; + if (fullHours_tmp3[i]>fullHours[i]) + fullHours[i]=fullHours_tmp3[i]; } } +void magazine::output(void) +{ +#if VDRVERSNUM >= 10307 +/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + if (b) + b->Reset(); + } */ + cBitmap *b=osd->GetBitmap(NAMES_AREA); + if (b) + { + b->Reset(); + if (tvonscreenCfg.colorworkaround) + { + // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows + b->SetColor(0,clrTransparent); + b->SetColor(1,clrBlue); + b->SetColor(2,clrWhite); + b->SetColor(3,clrGrey); + b->SetColor(4,0xffff0000); + b->SetColor(5,clrCyan); + for(int i=6;i<128;i++) + { + b->SetColor(i,0x01000000|i); + } + // End work around + } + } +/* for(int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + int col; + b->Colors(col); + mzlog(5," 1. NumColors(%d):%d",i,col); + } */ +#else + if (tvonscreenCfg.colorworkaround) + { + osd->Clear(names); + // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows + osd->AddColor(clrTransparent,names); + osd->AddColor(clrBlue,names); + osd->AddColor(clrWhite,names); + osd->AddColor(clrGrey,names); + osd->AddColor((eDvbColor)0xffff0000,names); + osd->AddColor(clrCyan,names); + for(int i=6;i<128;i++) + { + osd->AddColor((eDvbColor)(0x01000000|i),names); + } + // End work around + } +#endif + + showHeads(); + showKeys(); + calcScheds(); + showScheds(); + showTimeline(); + +#if VDRVERSNUM >= 10307 +/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + int col; + const tColor *tc=b->Colors(col); + mzlog(5," 2. NumColors(%d):%d",i,col); + if (i==NAMES_AREA) + { + for(int j=0;j<col;j++) + { + mzlog(5," Col(%d): %x",j,tc[j]); + } + } + } */ +#endif + + osd->Flush(); +} +void magazine::outputLR(void) +{ +#if VDRVERSNUM >= 10307 +/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + if (b) + b->Reset(); + } */ + cBitmap *b=osd->GetBitmap(NAMES_AREA); + if (b) + { + b->Reset(); + if (tvonscreenCfg.colorworkaround) + { + // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows + b->SetColor(0,clrTransparent); + b->SetColor(1,clrBlue); + b->SetColor(2,clrWhite); + b->SetColor(3,clrGrey); + b->SetColor(4,0xffff0000); + b->SetColor(5,clrCyan); + for(int i=6;i<128;i++) + { + b->SetColor(i,0x01000000|i); + } + // End work around + } + } +#else + if (tvonscreenCfg.colorworkaround) + { + osd->Clear(names); + // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows + osd->AddColor(clrTransparent,names); + osd->AddColor(clrBlue,names); + osd->AddColor(clrWhite,names); + osd->AddColor(clrGrey,names); + osd->AddColor((eDvbColor)0xffff0000,names); + osd->AddColor(clrCyan,names); + for(int i=6;i<128;i++) + { + osd->AddColor((eDvbColor)(0x01000000|i),names); + } + // End work around + } +#endif + + showHeads(); + calcScheds(); + searchcEvt(); + showScheds(); + showTimeline(); + + osd->Flush(); +} +void magazine::gotoUsertime(int u) +{ + struct tm tm_r; + localtime_r(¤tFirstTime,&tm_r); + tm_r.tm_hour=u/100; + tm_r.tm_min=u%100; + tm_r.tm_sec=0; + currentFirstTime=mktime(&tm_r); + if (currentFirstTime<time(NULL)) + { + if (tvonscreenCfg.thenshownextday) + currentFirstTime+=(60*60*24); + else + currentFirstTime=time(NULL); + } + output(); +} +void magazine::showHelp() +{ + anyFont *usef=f2; + int j=0; + const char *txt; + int lines=384/usef->Height(); + int width=184; + + char *helptext[]={ + "NORMAL MODE:", + "arrows\n\tmove view", + "back\n\tclose TV OnScreen", + "red/blue\n\t-/+ one day", + "green/yellow\n\tone page left/right", + "7/9\n\tone page left/right", + "8\n\tgoto current channel", + "0\n\tgoto now", + "4/5/6\n\tgoto configured time", + "ok\n\tswitch to edit mode\n", + "EDIT MODE:", + "back\n\tback to normal mode", + "arrows\n\tmove selected schedule", + "record\n\tcreate timer", + "ok\n\tshow details", + NULL + }; +#if VDRVERSNUM >= 10307 + int area=SCHED1_AREA; + + osd->DrawRectangle(Areas[SCHED1_AREA].x1, Areas[SCHED1_AREA].y1+1, Areas[SCHED1_AREA].x2+1, Areas[SCHED1_AREA].y2+1, clrGrey); + osd->DrawRectangle(Areas[SCHED2_AREA].x1, Areas[SCHED2_AREA].y1+1, Areas[SCHED2_AREA].x2+1, Areas[SCHED2_AREA].y2+1, clrGrey); + osd->DrawRectangle(Areas[SCHED3_AREA].x1, Areas[SCHED3_AREA].y1+1, Areas[SCHED3_AREA].x2+1, Areas[SCHED3_AREA].y2+1, clrGrey); + + osd->DrawRectangle(Areas[SCHED1_AREA].x1+2, Areas[SCHED1_AREA].y1, Areas[SCHED1_AREA].x2+1-3, Areas[SCHED1_AREA].y2+1-3, clrGray50); + osd->DrawRectangle(Areas[SCHED2_AREA].x1+2, Areas[SCHED2_AREA].y1, Areas[SCHED2_AREA].x2+1-3, Areas[SCHED2_AREA].y2+1-3, clrGray50); + osd->DrawRectangle(Areas[SCHED3_AREA].x1+2, Areas[SCHED3_AREA].y1, Areas[SCHED3_AREA].x2+1-3, Areas[SCHED3_AREA].y2+1-3, clrGray50); + + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1+TL_YSTART,Areas[TIMELINE_AREA].x1+48,Areas[TIMELINE_AREA].y1+400+TL_YSTART,clrBlack); +#else + tWindowHandle sched=sched1; + + osd->Fill(0,0,184,384,clrGrey,sched1); + osd->Fill(0,0,184,384,clrGrey,sched2); + osd->Fill(0,0,184,384,clrGrey,sched3); + + osd->Fill(2,2,184-3,384-3,clrBackground,sched1); + osd->Fill(2,2,184-3,384-3,clrBackground,sched2); + osd->Fill(2,2,184-3,384-3,clrBackground,sched3); + + osd->Fill(0,0+TL_YSTART,48,400+TL_YSTART,clrBlack,timeline); +#endif + showHeads(true); +// osd->Flush(); + + do + { + for(int i=0;i<lines;) + { + int y=i*usef->Height(); + if (helptext[j]==NULL) + break; + txt=tr(helptext[j]); + + if (i+usef->TextHeight(width,txt)>=lines) + break; +#if VDRVERSNUM >= 10307 + i+=usef->Text(Areas[area].x1+4,y+Areas[area].y1,width-8,lines-i,txt,clrWhite,clrBackground); +#else + i+=usef->Text(4,y,width-8,lines-i,txt,clrWhite,clrBackground,sched); +#endif + j++; + } +#if VDRVERSNUM >= 10307 + if (area==SCHED1_AREA) + area=SCHED2_AREA; + else if (area==SCHED2_AREA) + area=SCHED3_AREA; + else if (area==SCHED3_AREA) + break; +#else + if (sched==sched1) + sched=sched2; + else if (sched==sched2) + sched=sched3; + else if (sched==sched3) + break; +#endif + } + while (helptext[j]); + osd->Flush(); +} #include "fontosd/fontosd-arial18.c" #include "fontosd/fontosd-verdana16.c" #include "fontosd/fontosd-tahoma16.c" -#include "fontosd/fontosd-arial16.c" +#include "fontosd/fontosd-timesNewRoman16.c" void magazine::Show(void) { @@ -563,8 +1083,13 @@ void magazine::Show(void) met=NULL; } +#if VDRVERSNUM >= 10307 + osd = cOsdProvider::NewOsd(((Setup.OSDWidth - 612) / 2) + Setup.OSDLeft, ((Setup.OSDHeight - 436) / 2) + Setup.OSDTop); + if (osd && !osd->SetAreas(Areas, sizeof(Areas)/sizeof(tArea))) +#else osd = cOsd::OpenRaw(50, 60); if (osd) +#endif { delete [] fullHours; delete [] ev1; @@ -578,15 +1103,26 @@ void magazine::Show(void) f1=new anyFont(osd,(cFont::tPixelData *)fontosd_arial18,FONTOSD_ARIAL18,1); // Sendung f2=new anyFont(osd,(cFont::tPixelData *)fontosd_verdana16,FONTOSD_VERDANA16,1); // Extra-Info - f3=new anyFont(osd,(cFont::tPixelData *)fontosd_tahoma16,FONTOSD_TAHOMA16); // Sender - f4=new anyFont(osd,(cFont::tPixelData *)fontosd_arial16,FONTOSD_ARIAL16); // Tasten - timeline=osd->Create(0, 0, 8+40, 384+24, 2, false, false); - names=osd->Create(8+45, 0, 188*2+184, 20, 2, false, false); - sched1=osd->Create(8+45, 24, 184, 384, 2, true, false); - sched2=osd->Create(8+45+188, 24, 184, 384, 2, true, false); - sched3=osd->Create(8+45+188*2, 24, 184, 384, 2, true, false); - control=osd->Create(50, 384+24+8, 8+45+188*2+184-100, 20, 1, true, false); + f3=new anyFont(osd,(cFont::tPixelData *)fontosd_tahoma16,FONTOSD_TAHOMA16,1); // Sender + f4=new anyFont(osd,(cFont::tPixelData *)fontosd_newroman16,FONTOSD_NEWROMAN16); // Tasten +#if VDRVERSNUM >= 10307 + for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { +// cBitmap *b=osd->GetBitmap(i); +// if (b) +// b->Reset(); + osd->DrawRectangle(Areas[i].x1, Areas[i].y1, Areas[i].x2+1, Areas[i].y2+1, clrGray50); + } + evnum=(Areas[SCHED1_AREA].y2-Areas[SCHED1_AREA].y1)/f1->Height(); +#else + names=osd->Create(8+45, 0, 188*2+184, 48/*20*/, 4, false, false); + timeline=osd->Create(0, 0, 8+40, 384+TL_YSTART, 2, false, false); + sched1=osd->Create(8+45, TL_YSTART, 184, 384, 2, true, false); + sched2=osd->Create(8+45+188, TL_YSTART, 184, 384, 2, true, false); + sched3=osd->Create(8+45+188*2, TL_YSTART, 184, 384, 2, true, false); + control=osd->Create(50, 384+TL_YSTART+8, 8+45+188*2+184-101, 20, 1, true, false); + osd->AddColor(clrTransparent,names); osd->AddColor(clrBackground,sched1); osd->AddColor(clrBackground,sched2); osd->AddColor(clrBackground,sched3); @@ -596,14 +1132,17 @@ void magazine::Show(void) osd->AddColor(clrWhite,sched3); osd->AddColor(clrWhite,names); osd->AddColor(clrBlack,timeline); + osd->AddColor(clrBlue,timeline); osd->AddColor(clrBlue,names); osd->AddColor(clrYellow,names); osd->AddColor(clrGrey,sched1); osd->AddColor(clrGrey,sched2); osd->AddColor(clrGrey,sched3); + osd->AddColor(clrGrey,names); osd->Clear(); - evnum=(384)/f1->Height(); +#endif + #if VDRVERSNUM >= 10300 ev1=new (cEvent*)[evnum]; ev2=new (cEvent*)[evnum]; @@ -614,14 +1153,11 @@ void magazine::Show(void) ev3=new (cEventInfo*)[evnum]; #endif fullHours=new int[evnum]; + fullHours_tmp1=new int[evnum]; + fullHours_tmp2=new int[evnum]; + fullHours_tmp3=new int[evnum]; - showHeads(); - osd->Flush(); - - showKeys(); - calcScheds(); - showScheds(); - showTimeline(); + output(); } } #if VDRVERSNUM >= 10300 @@ -663,7 +1199,7 @@ void magazine::searchcEvt(void) } eOSState magazine::ProcessKey(eKeys Key) { - mzlog(10," ProcessKey(%d)",Key); + //mzlog(10," ProcessKey(%d)",Key); eOSState state; if (me) { @@ -781,11 +1317,7 @@ eOSState magazine::ProcessKey(eKeys Key) break; } } - showKeys(); - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); } break; case kBack: @@ -794,71 +1326,47 @@ eOSState magazine::ProcessKey(eKeys Key) currentFirst--; if (currentFirst<0) currentFirst=0; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case kRight: currentFirst++; - if (currentFirst>schedArrayNum-2) - currentFirst=schedArrayNum-2; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + if (currentFirst>schedArrayNum-3) + currentFirst=schedArrayNum-3; + output(); break; case kUp: currentFirstTime-=60*30; if (currentFirstTime<time(NULL)) currentFirstTime=time(NULL); - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case kDown: currentFirstTime+=60*30; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case kRed: // -1 Tag currentFirstTime-=24*60*60; if (currentFirstTime<time(NULL)) currentFirstTime=time(NULL); - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case kBlue: // +1 Tag currentFirstTime+=24*60*60; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case k7: // -1 Seite (3 Sender) case kGreen: currentFirst-=3; if (currentFirst<0) currentFirst=0; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case k9: // +1 Seite (3 Sender) case kYellow: currentFirst+=3; - if (currentFirst>schedArrayNum-2) - currentFirst=schedArrayNum-2; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + if (currentFirst>schedArrayNum-3) + currentFirst=schedArrayNum-3; + output(); break; case k8: // zum aktuellen Sender { @@ -875,10 +1383,7 @@ eOSState magazine::ProcessKey(eKeys Key) currentFirst=i-1; if (currentFirst<0) currentFirst=0; - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; } } @@ -886,10 +1391,19 @@ eOSState magazine::ProcessKey(eKeys Key) break; case k0: // jetzt currentFirstTime=time(NULL); - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); + break; + case k1: + showHelp(); + break; + case k4: // usertime1 + gotoUsertime(tvonscreenCfg.usertime1); + break; + case k5: // usertime2 + gotoUsertime(tvonscreenCfg.usertime2); + break; + case k6: // usertime3 + gotoUsertime(tvonscreenCfg.usertime3); break; /* case k0: break; @@ -934,11 +1448,7 @@ eOSState magazine::ProcessKey(eKeys Key) case kBack: curmode=SHOW; EDIT_curEvent=0; - showKeys(); - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); break; case kLeft: EDIT_curChannel--; @@ -951,11 +1461,7 @@ eOSState magazine::ProcessKey(eKeys Key) currentFirst=0; EDIT_curChannel=currentFirst; } - showHeads(); - calcScheds(); - searchcEvt(); - showScheds(); - showTimeline(); + outputLR(); break; case kRight: EDIT_curChannel++; @@ -968,11 +1474,7 @@ eOSState magazine::ProcessKey(eKeys Key) currentFirst=schedArrayNum-3; EDIT_curChannel=currentFirst+2; } - showHeads(); - calcScheds(); - searchcEvt(); - showScheds(); - showTimeline(); + outputLR(); break; case kUp: { @@ -1019,10 +1521,7 @@ eOSState magazine::ProcessKey(eKeys Key) } while (!found); } - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); } break; case kDown: @@ -1066,10 +1565,7 @@ eOSState magazine::ProcessKey(eKeys Key) } while (!found && cc<48); } - showHeads(); - calcScheds(); - showScheds(); - showTimeline(); + output(); } break; /* case kRed: @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: magazine.h,v 1.7 2004/03/23 14:08:25 schmitzj Exp $ + * $Id: magazine.h,v 1.12 2004/07/08 10:46:44 schmitzj Exp $ * */ @@ -12,24 +12,55 @@ #include <vdr/plugin.h> #include <time.h> -#include "anyfont.h" +#include "gfxtools.h" +#include "config.h" void mzlog(int level, const char *fmt, ...); +#define TL_YSTART 48 +// else +//#define TL_YSTART 24 + +#if VDRVERSNUM >= 10307 + +// #define MULTINAMES + +typedef enum { +#ifdef MULTINAMES + NAME1_AREA = 0, + NAME2_AREA, + NAME3_AREA, +#else + NAMES_AREA = 0, +#endif + TIMELINE_AREA, + SCHED1_AREA, + SCHED2_AREA, + SCHED3_AREA, + CONTROL_AREA, + NUMBER_OF_AREAS, +} tMagazineArea; +#endif class magazine : public cOsdObject { cPlugin *parent; +#if VDRVERSNUM >= 10307 + cOsd *osd; +#else cOsdBase *osd; +#endif class cMenuEvent *me; class cMenuEditTimer *met; anyFont *f1,*f2,*f3,*f4; +#if VDRVERSNUM < 10307 tWindowHandle timeline; tWindowHandle names; tWindowHandle sched1,sched2,sched3; tWindowHandle control; +#endif #if VDRVERSNUM >= 10300 cSchedulesLock _schedulesLock; @@ -52,6 +83,9 @@ class magazine : public cOsdObject class cEventInfo **ev3; #endif int *fullHours; + int *fullHours_tmp1; + int *fullHours_tmp2; + int *fullHours_tmp3; enum modes {SHOW,EDIT}; enum modes curmode; @@ -71,13 +105,16 @@ class magazine : public cOsdObject #endif void searchcEvt(); -// void printHead(const cSchedule *s,tWindowHandle sched); + void printLogo(const cSchedule *s,int p); void printHead(const cSchedule *s,int p); void showKeys(void); void showTimeline(void); - void showHeads(void); + void showHeads(bool onlyBG=false); void showScheds(void); -#if VDRVERSNUM >= 10300 +#if VDRVERSNUM >= 10307 + void showSched(const cSchedule *s,cEvent **ev, tMagazineArea area); + void calcSched(const cSchedule *s,cEvent **ev); +#elif VDRVERSNUM >= 10300 void showSched(const cSchedule *s,cEvent **ev,tWindowHandle sched); void calcSched(const cSchedule *s,cEvent **ev); #else @@ -86,6 +123,11 @@ class magazine : public cOsdObject #endif void calcScheds(void); + void output(void); + void outputLR(void); + + void gotoUsertime(int u); + void showHelp(void); public: magazine(class cPlugin *); virtual ~magazine(); diff --git a/magazine.h.orig b/magazine.h.orig deleted file mode 100644 index ea932e1..0000000 --- a/magazine.h.orig +++ /dev/null @@ -1,97 +0,0 @@ -/* - * magazine.h - * - * See the README file for copyright information and how to reach the author. - * - * $Id: magazine.h,v 1.5 2004/03/23 09:26:46 schmitzj Exp $ - * - */ - -#ifndef MAGAZINE_H -#define MAGAZINE_H - -#include <vdr/plugin.h> -#include <time.h> -#include "anyfont.h" - -void mzlog(int level, const char *fmt, ...); - -class magazine : public cOsdObject -{ - cPlugin *parent; - cOsdBase *osd; - - class cMenuEvent *me; - class cMenuEditTimer *met; - - anyFont *f1,*f2,*f3,*f4; - - tWindowHandle timeline; - tWindowHandle names; - tWindowHandle sched1,sched2,sched3; - tWindowHandle control; - - cMutexLock _mutexLock; - const cSchedule** schedArray; - int schedArrayNum; - int currentFirst; - time_t currentFirstTime; - - int evnum; - class cEventInfo **ev1; - class cEventInfo **ev2; - class cEventInfo **ev3; - int *fullHours; - - enum modes {SHOW,EDIT}; - enum modes curmode; - - unsigned short EDIT_curEvent; - int EDIT_curChannel; - int EDIT_curEVI; - - const class cEventInfo *getNext(const cSchedule *s,const cEventInfo *e); - const class cEventInfo *getPrev(const cSchedule *s,const cEventInfo *e); - cEventInfo **ev4ch(int); - void searchcEvt(); - -// void printHead(const cSchedule *s,tWindowHandle sched); - void printHead(const cSchedule *s,int p); - void showKeys(void); - void showTimeline(void); - void showHeads(void); - void showScheds(void); - void showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched); - void calcSched(const cSchedule *s,cEventInfo **ev); - void calcScheds(void); - -public: - magazine(class cPlugin *); - virtual ~magazine(); - virtual void Show(void); - virtual eOSState ProcessKey(eKeys Key); -}; - -class cMenuEvent : public cOsdMenu { -private: - const class cEventInfo *eventInfo; -public: - cMenuEvent(const class cEventInfo *EventInfo, bool CanSwitch = false); - cMenuEvent(bool Now); - virtual eOSState ProcessKey(eKeys Key); -}; -class cMenuEditTimer : public cOsdMenu { -private: - cTimer *timer; - cTimer data; - int channel; - bool addIfConfirmed; - class cMenuEditDateItem *firstday; - void SetFirstDayItem(void); -public: - cMenuEditTimer(cTimer *Timer, bool New = false); - virtual ~cMenuEditTimer(); - virtual eOSState ProcessKey(eKeys Key); - }; - -#endif diff --git a/tvonscreen.c b/tvonscreen.c index 0c4af78..b9136ef 100644 --- a/tvonscreen.c +++ b/tvonscreen.c @@ -3,15 +3,16 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: tvonscreen.c,v 1.7 2004/03/23 09:28:47 schmitzj Exp $ + * $Id: tvonscreen.c,v 1.11 2004/07/08 10:46:44 schmitzj Exp $ * */ #include <vdr/plugin.h> #include "magazine.h" +#include "config.h" #include "i18n.h" -static const char *VERSION = "0.5.1"; +static const char *VERSION = "0.6.0"; static const char *DESCRIPTION = "Shows the EPG info in form of a typical TV magazine"; static const char *MAINMENUENTRY = "TV-OnScreen"; @@ -22,7 +23,7 @@ public: cPluginTvOnscreen(void); virtual ~cPluginTvOnscreen(); virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return DESCRIPTION; } + virtual const char *Description(void) { return tr(DESCRIPTION); } virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); virtual bool Initialize(void); @@ -49,13 +50,12 @@ cPluginTvOnscreen::~cPluginTvOnscreen() const char *cPluginTvOnscreen::CommandLineHelp(void) { // Return a string that describes all known command line options. - return NULL; + return tvonscreenCfg.CommandLineHelp(); } bool cPluginTvOnscreen::ProcessArgs(int argc, char *argv[]) { - // Implement command line argument processing here if applicable. - return true; + return tvonscreenCfg.ProcessArgs(argc,argv); } bool cPluginTvOnscreen::Initialize(void) @@ -86,23 +86,13 @@ cOsdObject *cPluginTvOnscreen::MainMenuAction(void) cMenuSetupPage *cPluginTvOnscreen::SetupMenu(void) { // Return a setup menu in case the plugin supports one. - return NULL; + return new tvonscreenConfigPage(); } bool cPluginTvOnscreen::SetupParse(const char *Name, const char *Value) { // Parse your own setup parameters and store their values. -/* if (!strcasecmp(Name, "TimeMorning")) config.TimeMorning = atoi(Value); - else if (!strcasecmp(Name, "TimeAfternoon")) config.TimeAfternoon = atoi(Value); - else if (!strcasecmp(Name, "TimeEvening")) config.TimeEvening = atoi(Value); - else if (!strcasecmp(Name, "NameUser")) strn0cpy(config.NameUser, Value, MaxFileName); - else if (!strcasecmp(Name, "TimeUser")) config.TimeUser = atoi(Value); - else if (!strcasecmp(Name, "ShowTimers")) config.ShowTimers = (eShowTimers)atoi(Value); - - else - return false; -*/ - return true; + return tvonscreenCfg.SetupParse(Name,Value); } VDRPLUGINCREATOR(cPluginTvOnscreen); // Don't touch this! diff --git a/vdr-136-tvonscreen-0.5.0-patch.diff b/vdr-136-tvonscreen-0.5.0-patch.diff deleted file mode 100755 index 60e787d..0000000 --- a/vdr-136-tvonscreen-0.5.0-patch.diff +++ /dev/null @@ -1,567 +0,0 @@ -diff -Nur tvonscreen-0.5.0/magazine.c tvonscreen-0.5.0-1.3.6/magazine.c ---- tvonscreen-0.5.0/magazine.c Fri Mar 5 13:28:30 2004 -+++ tvonscreen-0.5.0-1.3.6/magazine.c Tue Mar 23 11:40:45 2004 -@@ -14,11 +14,19 @@ - int c1nr = 9999; // there should be no one with more than 9999 channels - int c2nr = 9999; - -+#if VDRVERSNUM >= 10300 -+ cChannel* c1 = Channels.GetByChannelID((*(const cSchedule**)p1)->ChannelID(), true); -+#else - cChannel* c1 = Channels.GetByChannelID((*(const cSchedule**)p1)->GetChannelID(), true); -+#endif - if (c1) - c1nr = c1->Number(); - -+#if VDRVERSNUM >= 10300 -+ cChannel* c2 = Channels.GetByChannelID((*(const cSchedule**)p2)->ChannelID(), true); -+#else - cChannel* c2 = Channels.GetByChannelID((*(const cSchedule**)p2)->GetChannelID(), true); -+#endif - if (c2) - c2nr = c2->Number(); - -@@ -30,7 +38,11 @@ - { - parent=p; - -+#if VDRVERSNUM >= 10300 -+ const cSchedules* Schedules = cSchedules::Schedules(_schedulesLock); -+#else - const cSchedules* Schedules = cSIProcessor::Schedules(_mutexLock); -+#endif - - curmode=SHOW; - EDIT_curEvent=0; -@@ -57,7 +69,11 @@ - { // if there exist an event -> add to array - // check if we can get a channel NAME ( XXX ) - // I thougt that this must always work , but doesn't -+#if VDRVERSNUM >= 10300 -+ cChannel *c = Channels.GetByChannelID(Schedule->ChannelID(), true); -+#else - cChannel *c = Channels.GetByChannelID(Schedule->GetChannelID(), true); -+#endif - if (c) - { - schedArray[num] = Schedule; -@@ -73,7 +89,11 @@ - int currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); - for(int i=0;i<schedArrayNum;i++) - { -+#if VDRVERSNUM >= 10300 -+ cChannel *channel = Channels.GetByChannelID(schedArray[i]->ChannelID(), true); -+#else - cChannel *channel = Channels.GetByChannelID(schedArray[i]->GetChannelID(), true); -+#endif - if (channel->Number()==currentChannel) - { - currentFirst=i-1; -@@ -125,7 +145,11 @@ - osd->Fill(0,0,184,20,clrBlue,sched); - if (s!=NULL) - { -+#if VDRVERSNUM >= 10300 -+ channel = Channels.GetByChannelID(s->ChannelID(), true); -+#else - channel = Channels.GetByChannelID(s->GetChannelID(), true); -+#endif - txt=channel->Name(); - if (f3->LargeWidth(txt)>184) - f3->Text((184-f3->Width(txt))/2,0,txt,clrWhite,clrBlue,sched); -@@ -147,7 +171,11 @@ - enum eDvbColor col=clrWhite; - - currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); -+#if VDRVERSNUM >= 10300 -+ channel = Channels.GetByChannelID(s->ChannelID(), true); -+#else - channel = Channels.GetByChannelID(s->GetChannelID(), true); -+#endif - if (currentChannel==channel->Number()) - { - col=clrCyan; -@@ -229,9 +257,15 @@ - } - osd->Flush(); - } -+#if VDRVERSNUM >= 10300 -+void magazine::showSched(const cSchedule *s,cEvent **ev,tWindowHandle sched) -+{ -+ cEvent *oldev=NULL,*cev=NULL; -+#else - void magazine::showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched) - { - cEventInfo *oldev=NULL,*cev=NULL; -+#endif - int j=0; - const char *txt; - int lh=-1; -@@ -261,20 +295,32 @@ - { - if (oldev) - { -+#if VDRVERSNUM >= 10300 -+ txt=oldev->ShortText(); -+#else - txt=oldev->GetSubtitle(); -+#endif - int cc=f2->TextHeight(184-f1->Width("00:0"),txt); - if (cc<=i-j) - f2->Text(f1->Width("00:0"),(j)*f1->Height()/*+24*/,184-f1->Width("00:0"),i-j,txt,col,clrBackground,sched); - } - col=clrWhite; -+#if VDRVERSNUM >= 10300 -+ if (EDIT_curEvent==cev->EventID()) -+#else - if (EDIT_curEvent==cev->GetEventID()) -+#endif - { - col=clrYellow; - EDIT_curEVI=i; - } - txt=cev->GetTimeString(); - f1->Text(0,y,txt,col,clrBackground,sched); -+#if VDRVERSNUM >= 10300 -+ txt=cev->Title(); -+#else - txt=cev->GetTitle(); -+#endif - j=i+f1->Text(f1->Width("00:00 "),y,184-f1->Width("00:00 "),20,txt,col,clrBackground,sched); - oldev=cev; - } -@@ -282,7 +328,11 @@ - } - if (oldev) - { -+#if VDRVERSNUM >= 10300 -+ txt=oldev->ShortText(); -+#else - txt=oldev->GetSubtitle(); -+#endif - f2->Text(f1->Width("00:0"),j*f1->Height()/*+24*/,184-f1->Width("00:0"),evnum-j,txt,col,clrBackground,sched); - } - } -@@ -307,17 +357,38 @@ - showSched(s3,ev3,sched3); - } - } -+#if VDRVERSNUM >= 10300 -+const cEvent *magazine::getNext(const cSchedule *s,const cEvent *e) -+{ -+ const cEvent *pe = NULL; -+ time_t ref = e->StartTime(); -+#else - const cEventInfo *magazine::getNext(const cSchedule *s,const cEventInfo *e) - { - const cEventInfo *pe = NULL; - time_t ref = e->GetTime(); -+#endif - time_t delta = INT_MAX; -+#if VDRVERSNUM >= 10306 -+ for (int i=0;i< (s->Events())->Count();i++) -+ { -+ const cEvent *p = (s->Events())->Get(i); -+#else - for (int i=0;i<s->NumEvents();i++) - { -+#if VDRVERSNUM >= 10300 -+ const cEvent *p = s->GetEventNumber(i); -+#else - const cEventInfo *p = s->GetEventNumber(i); -+#endif // VDRVERSNUM >= 10300 -+#endif // VDRVERSNUM >= 10306 - if (p!=e) - { -+#if VDRVERSNUM >= 10300 -+ time_t dt = p->StartTime() - ref; -+#else - time_t dt = p->GetTime() - ref; -+#endif - if (dt > 0 && dt < delta) - { - delta = dt; -@@ -327,17 +398,38 @@ - } - return pe; - } -+#if VDRVERSNUM >= 10300 -+const cEvent *magazine::getPrev(const cSchedule *s,const cEvent *e) -+{ -+ const cEvent *pe = NULL; -+ time_t ref = e->StartTime(); -+#else - const cEventInfo *magazine::getPrev(const cSchedule *s,const cEventInfo *e) - { - const cEventInfo *pe = NULL; - time_t ref = e->GetTime(); -+#endif - time_t delta = INT_MAX; -+#if VDRVERSNUM >= 10306 -+ for (int i=0;i< (s->Events())->Count();i++) -+ { -+ const cEvent *p = (s->Events())->Get(i); -+#else - for (int i=0;i<s->NumEvents();i++) - { -+#if VDRVERSNUM >= 10300 -+ const cEvent *p = s->GetEventNumber(i); -+#else - const cEventInfo *p = s->GetEventNumber(i); -+#endif // VDRVERSNUM >= 10300 -+#endif // VDRVERSNUM >= 10306 - if (p!=e) - { -+#if VDRVERSNUM >= 10300 -+ time_t dt = ref - p->StartTime(); -+#else - time_t dt = ref - p->GetTime(); -+#endif - if (dt > 0 && dt < delta) - { - delta = dt; -@@ -347,10 +439,17 @@ - } - return pe; - } -+#if VDRVERSNUM >= 10300 -+void magazine::calcSched(const cSchedule *s,cEvent **ev) -+{ -+ const cEvent *cev=NULL; -+ const cEvent *cev2=NULL; -+#else - void magazine::calcSched(const cSchedule *s,cEventInfo **ev) - { - const cEventInfo *cev=NULL; - const cEventInfo *cev2=NULL; -+#endif - int cc=0; - - for(int i=0;i<evnum;i++) -@@ -362,11 +461,19 @@ - cev2=NULL; - if (cev) - { -+#if VDRVERSNUM >= 10300 -+ cc=f1->TextHeight(184-f1->Width("00:00 "),cev->Title()); -+ time_t t=cev->StartTime(); -+ struct tm tm_r; -+ localtime_r(&t,&tm_r); -+ fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); -+#else - cc=f1->TextHeight(184-f1->Width("00:00 "),cev->GetTitle()); - time_t t=cev->GetTime(); - struct tm tm_r; - localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->GetTitle()); -+#endif - } - } - else -@@ -375,6 +482,19 @@ - cev2=getNext(s,cev); - if (cev2 && cc--<=1) - { -+#if VDRVERSNUM >= 10300 -+ int z=(cev2->StartTime()-currentFirstTime)*6/60/60; -+ if (z<i) -+ { -+ cev=cev2; -+ cev2=NULL; -+ cc=f1->TextHeight(184-f1->Width("00:00 "),cev->Title()); -+ time_t t=cev->StartTime(); -+ struct tm tm_r; -+ localtime_r(&t,&tm_r); -+ fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); -+ } -+#else - int z=(cev2->GetTime()-currentFirstTime)*6/60/60; - if (z<i) - { -@@ -386,9 +506,14 @@ - localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->GetTitle()); - } -+#endif - } - } -+#if VDRVERSNUM >= 10300 -+ ev[i]=(cEvent *)cev; -+#else - ev[i]=(cEventInfo *)cev; -+#endif - } - } - void magazine::calcScheds() -@@ -479,9 +604,15 @@ - osd->Clear(); - - evnum=(384)/f1->Height(); -+#if VDRVERSNUM >= 10300 -+ ev1=new (cEvent*)[evnum]; -+ ev2=new (cEvent*)[evnum]; -+ ev3=new (cEvent*)[evnum]; -+#else - ev1=new (cEventInfo*)[evnum]; - ev2=new (cEventInfo*)[evnum]; - ev3=new (cEventInfo*)[evnum]; -+#endif - fullHours=new int[evnum]; - - showHeads(); -@@ -493,9 +624,15 @@ - showTimeline(); - } - } -+#if VDRVERSNUM >= 10300 -+cEvent **magazine::ev4ch(int p) -+{ -+ cEvent **ev=NULL; -+#else - cEventInfo **magazine::ev4ch(int p) - { - cEventInfo **ev=NULL; -+#endif - if (p==currentFirst) - ev=ev1; - else if (p==currentFirst+1) -@@ -506,12 +643,20 @@ - } - void magazine::searchcEvt(void) - { -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); -+#endif - for(int i=EDIT_curEVI;i>=0;i--) - { - if (ev[i]) - { -+#if VDRVERSNUM >= 10300 -+ EDIT_curEvent=ev[i]->EventID(); -+#else - EDIT_curEvent=ev[i]->GetEventID(); -+#endif - break; - } - } -@@ -544,8 +689,13 @@ - break; - case kBlue: // Umschalten - { -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+ cChannel *channel = Channels.GetByChannelID(ev[EDIT_curEVI]->ChannelID(), true); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); - cChannel *channel = Channels.GetByChannelID(ev[EDIT_curEVI]->GetChannelID(), true); -+#endif - if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true)) - { - delete me; -@@ -559,7 +709,11 @@ - { - delete me; - me=NULL; -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); -+#endif - cTimer *timer = new cTimer(ev[EDIT_curEVI]); - cTimer *t = Timers.GetTimer(timer); - if (t) -@@ -619,7 +773,11 @@ - { - if (ev1[i]) - { -+#if VDRVERSNUM >= 10300 -+ EDIT_curEvent=ev1[i]->EventID(); -+#else - EDIT_curEvent=ev1[i]->GetEventID(); -+#endif - break; - } - } -@@ -707,7 +865,11 @@ - int currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); - for(int i=0;i<schedArrayNum;i++) - { -+#if VDRVERSNUM >= 10300 -+ cChannel *channel = Channels.GetByChannelID(schedArray[i]->ChannelID(), true); -+#else - cChannel *channel = Channels.GetByChannelID(schedArray[i]->GetChannelID(), true); -+#endif - if (channel->Number()==currentChannel) - { - currentFirst=i-1; -@@ -757,7 +919,11 @@ - { - delete osd; - osd=NULL; -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); -+#endif - me=new cMenuEvent(ev[EDIT_curEVI], true); - me->Display(); - curmode=SHOW; -@@ -810,8 +976,13 @@ - break; - case kUp: - { -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+ const cEvent *e=getPrev(schedArray[EDIT_curChannel],ev[EDIT_curEVI]); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); - const cEventInfo *e=getPrev(schedArray[EDIT_curChannel],ev[EDIT_curEVI]); -+#endif - - if (e) - { -@@ -821,10 +992,18 @@ - found=0; - for(int i=0;i<evnum;i++) - { -+#if VDRVERSNUM >= 10300 -+ if (ev[i] && ev[i]->EventID()==e->EventID()) -+#else - if (ev[i] && ev[i]->GetEventID()==e->GetEventID()) -+#endif - { - found=1; -+#if VDRVERSNUM >= 10300 -+ EDIT_curEvent=e->EventID(); -+#else - EDIT_curEvent=e->GetEventID(); -+#endif - } - } - if (!found) -@@ -848,12 +1027,21 @@ - break; - case kDown: - { -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+ const cEvent *e=getNext(schedArray[EDIT_curChannel],ev[EDIT_curEVI]); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); - const cEventInfo *e=getNext(schedArray[EDIT_curChannel],ev[EDIT_curEVI]); -+#endif - - if (e) - { -+#if VDRVERSNUM >= 10300 -+ EDIT_curEvent=e->EventID(); -+#else - EDIT_curEvent=e->GetEventID(); -+#endif - int found,cc=0; - do - { -@@ -861,7 +1049,11 @@ - cc++; - for(int i=0;i<evnum;i++) - { -+#if VDRVERSNUM >= 10300 -+ if (ev[i] && ev[i]->EventID()==EDIT_curEvent) -+#else - if (ev[i] && ev[i]->GetEventID()==EDIT_curEvent) -+#endif - { - found=1; - } -@@ -912,7 +1104,11 @@ - { - delete osd; - osd=NULL; -+#if VDRVERSNUM >= 10300 -+ cEvent **ev=ev4ch(EDIT_curChannel); -+#else - cEventInfo **ev=ev4ch(EDIT_curChannel); -+#endif - cTimer *timer = new cTimer(ev[EDIT_curEVI]); - cTimer *t = Timers.GetTimer(timer); - if (t) -diff -Nur tvonscreen-0.5.0/magazine.h tvonscreen-0.5.0-1.3.6/magazine.h ---- tvonscreen-0.5.0/magazine.h Mon Mar 22 01:38:37 2004 -+++ tvonscreen-0.5.0-1.3.6/magazine.h Tue Mar 23 11:17:37 2004 -@@ -31,16 +31,26 @@ - tWindowHandle sched1,sched2,sched3; - tWindowHandle control; - -+#if VDRVERSNUM >= 10300 -+ cSchedulesLock _schedulesLock; -+#else - cMutexLock _mutexLock; -+#endif - const cSchedule** schedArray; - int schedArrayNum; - int currentFirst; - time_t currentFirstTime; - - int evnum; -+#if VDRVERSNUM >= 10300 -+ class cEvent **ev1; -+ class cEvent **ev2; -+ class cEvent **ev3; -+#else - class cEventInfo **ev1; - class cEventInfo **ev2; - class cEventInfo **ev3; -+#endif - int *fullHours; - - enum modes {SHOW,EDIT}; -@@ -50,9 +60,15 @@ - int EDIT_curChannel; - int EDIT_curEVI; - -+#if VDRVERSNUM >= 10300 -+ const class cEvent *getNext(const cSchedule *s,const cEvent *e); -+ const class cEvent *getPrev(const cSchedule *s,const cEvent *e); -+ cEvent **ev4ch(int); -+#else - const class cEventInfo *getNext(const cSchedule *s,const cEventInfo *e); - const class cEventInfo *getPrev(const cSchedule *s,const cEventInfo *e); - cEventInfo **ev4ch(int); -+#endif - void searchcEvt(); - - // void printHead(const cSchedule *s,tWindowHandle sched); -@@ -61,8 +77,13 @@ - void showTimeline(void); - void showHeads(void); - void showScheds(void); -+#if VDRVERSNUM >= 10300 -+ void showSched(const cSchedule *s,cEvent **ev,tWindowHandle sched); -+ void calcSched(const cSchedule *s,cEvent **ev); -+#else - void showSched(const cSchedule *s,cEventInfo **ev,tWindowHandle sched); - void calcSched(const cSchedule *s,cEventInfo **ev); -+#endif - void calcScheds(void); - - public: -@@ -74,9 +95,17 @@ - - class cMenuEvent : public cOsdMenu { - private: -+#if VDRVERSNUM >= 10300 -+ const class cEvent *eventInfo; -+#else - const class cEventInfo *eventInfo; -+#endif - public: -+#if VDRVERSNUM >= 10300 -+ cMenuEvent(const class cEvent *EventInfo, bool CanSwitch = false); -+#else - cMenuEvent(const class cEventInfo *EventInfo, bool CanSwitch = false); -+#endif - cMenuEvent(bool Now); - virtual eOSState ProcessKey(eKeys Key); - };
\ No newline at end of file |
