From 091b7b1f7dc2f72bef51dd1037befa459010a5db Mon Sep 17 00:00:00 2001 From: mrwastl Date: Sun, 1 May 2011 22:25:36 +0200 Subject: initial upload to branch 'touchcol'. modifications for compatibility with branch touchcol from graphlcd-base; skin 'touchcol' for experimenting --- TODO | 9 +- display.c | 133 +++++-- display.h | 18 +- graphlcd/skins/touchcol/images/arrow.pbm | Bin 0 -> 59 bytes graphlcd/skins/touchcol/images/arrow_small.pbm | 4 + graphlcd/skins/touchcol/images/message.pbm | Bin 0 -> 123 bytes graphlcd/skins/touchcol/images/mute.pbm | 4 + graphlcd/skins/touchcol/symbols/dolby.pbm | 4 + graphlcd/skins/touchcol/symbols/dolby_small.pbm | 4 + graphlcd/skins/touchcol/symbols/empty.pbm | 4 + graphlcd/skins/touchcol/symbols/empty_small.pbm | 4 + graphlcd/skins/touchcol/symbols/multilanguage.pbm | 4 + .../skins/touchcol/symbols/multilanguage_small.pbm | 4 + graphlcd/skins/touchcol/symbols/mute.pbm | 4 + graphlcd/skins/touchcol/symbols/mute_small.pbm | 4 + graphlcd/skins/touchcol/symbols/recording.pbm | 4 + graphlcd/skins/touchcol/symbols/recording2.pbm | 4 + .../skins/touchcol/symbols/recording2_small.pbm | 4 + graphlcd/skins/touchcol/symbols/recording3.pbm | 4 + .../skins/touchcol/symbols/recording3_small.pbm | 4 + graphlcd/skins/touchcol/symbols/recording4.pbm | 4 + .../skins/touchcol/symbols/recording4_small.pbm | 4 + .../skins/touchcol/symbols/recording_small.pbm | 4 + .../skins/touchcol/symbols/replay-fast-fwd.pbm | Bin 0 -> 63 bytes .../skins/touchcol/symbols/replay-fast-rwd.pbm | Bin 0 -> 63 bytes graphlcd/skins/touchcol/symbols/replay-pause.pbm | Bin 0 -> 63 bytes graphlcd/skins/touchcol/symbols/replay-play.pbm | Bin 0 -> 63 bytes .../skins/touchcol/symbols/replay-slow-fwd.pbm | Bin 0 -> 63 bytes .../skins/touchcol/symbols/replay-slow-rwd.pbm | Bin 0 -> 63 bytes graphlcd/skins/touchcol/symbols/scrambled.pbm | 4 + .../skins/touchcol/symbols/scrambled_small.pbm | 4 + graphlcd/skins/touchcol/symbols/teletext.pbm | 4 + graphlcd/skins/touchcol/symbols/teletext_small.pbm | 4 + graphlcd/skins/touchcol/touchcol.skin | 389 +++++++++++++++++++++ skinconfig.c | 26 +- skinconfig.h | 9 +- 36 files changed, 633 insertions(+), 39 deletions(-) create mode 100644 graphlcd/skins/touchcol/images/arrow.pbm create mode 100644 graphlcd/skins/touchcol/images/arrow_small.pbm create mode 100644 graphlcd/skins/touchcol/images/message.pbm create mode 100644 graphlcd/skins/touchcol/images/mute.pbm create mode 100644 graphlcd/skins/touchcol/symbols/dolby.pbm create mode 100644 graphlcd/skins/touchcol/symbols/dolby_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/empty.pbm create mode 100644 graphlcd/skins/touchcol/symbols/empty_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/multilanguage.pbm create mode 100644 graphlcd/skins/touchcol/symbols/multilanguage_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/mute.pbm create mode 100644 graphlcd/skins/touchcol/symbols/mute_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording2.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording2_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording3.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording3_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording4.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording4_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/recording_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/replay-fast-fwd.pbm create mode 100644 graphlcd/skins/touchcol/symbols/replay-fast-rwd.pbm create mode 100644 graphlcd/skins/touchcol/symbols/replay-pause.pbm create mode 100644 graphlcd/skins/touchcol/symbols/replay-play.pbm create mode 100644 graphlcd/skins/touchcol/symbols/replay-slow-fwd.pbm create mode 100644 graphlcd/skins/touchcol/symbols/replay-slow-rwd.pbm create mode 100644 graphlcd/skins/touchcol/symbols/scrambled.pbm create mode 100644 graphlcd/skins/touchcol/symbols/scrambled_small.pbm create mode 100644 graphlcd/skins/touchcol/symbols/teletext.pbm create mode 100644 graphlcd/skins/touchcol/symbols/teletext_small.pbm create mode 100644 graphlcd/skins/touchcol/touchcol.skin diff --git a/TODO b/TODO index f410a98..e49b92e 100644 --- a/TODO +++ b/TODO @@ -1,8 +1 @@ -- add missing objects like textbox, scrollbar -- add dynamic behaviour to objects like scrolling and blinking -- add special objects for external data so that other plugins can draw text and bitmaps on an area of the display that will be defined in the skin. This could be used p.e. for a spectrum analyzer or displaying id3 tags. -- add service interface for external data objects -- make skin variables more dynamic, p.e. evaluate positions while displaying, not only during skin loading. This should make it easier to support several display sizes with one skin. -- DOCUMENTATION, DOCUMENTATION, DOCUMENTATION -- fix all the small bugs that were introduced -- all the stuff I forgot :-) +for skin-related TODOs: see TODO in graphlcd-base diff --git a/display.c b/display.c index ac8c169..3c4dc2f 100644 --- a/display.c +++ b/display.c @@ -7,8 +7,8 @@ * to the COPYING file distributed with this package. * * (c) 2001-2004 Carsten Siebholz - * (c) 2004 Andreas Regel - * (c) 2010 Wolfgang Astleitner + * (c) 2004-2010 Andreas Regel + * (c) 2010-2011 Wolfgang Astleitner */ #include @@ -29,6 +29,8 @@ #include #include +#include + cGraphLCDDisplay::cGraphLCDDisplay() : cThread("glcd_display"), mLcd(NULL), @@ -43,6 +45,9 @@ cGraphLCDDisplay::cGraphLCDDisplay() mState = StateNormal; mLastState = StateNormal; + + mDisplayMode = DisplayModeNormal; + LastTimeDisplayMode = 0; mShowVolume = false; @@ -119,7 +124,8 @@ void cGraphLCDDisplay::Action(void) } skinFileName = mSkinConfig->SkinPath() + "/" + mSkinConfig->SkinName() + ".skin"; - mSkin = GLCD::XmlParse(*mSkinConfig, mSkinConfig->SkinName(), skinFileName); + std::string errorString = ""; + mSkin = GLCD::XmlParse(*mSkinConfig, mSkinConfig->SkinName(), skinFileName, errorString); if (!mSkin) { int skipx = mLcd->Width() >> 3; @@ -127,13 +133,42 @@ void cGraphLCDDisplay::Action(void) esyslog("graphlcd plugin: ERROR loading skin\n"); - // draw an 'X' to inform the user that there was a problem with loading the skin - // (better than just leaving an empty screen ...) mLcd->Clear(); + // clear the screen with a filled rectangle using a defined colour to guarantee visible text or 'X' +#ifdef GRAPHLCD_CBITMAP_ARGB + mScreen->DrawRectangle(0, 0, mLcd->Width()-1, mLcd->Height()-1, GLCD::cColor::Black, true); +#else mScreen->DrawRectangle(0, 0, mLcd->Width()-1, mLcd->Height()-1, GLCD::clrBlack, true); - mScreen->DrawLine(skipx, skipy, mLcd->Width()-1-skipx, mLcd->Height()-1-skipy, GLCD::clrWhite); - mScreen->DrawLine(mLcd->Width()-1-skipx, skipy, skipx, mLcd->Height()-1-skipy, GLCD::clrWhite); +#endif + + GLCD::cFont * font = new GLCD::cFont(); + if ( font->LoadFNT( mSkinConfig->FontPath() + "/" + "f8n.fnt") ) { + std::vector lines; + font->WrapText(mLcd->Width()-10, mLcd->Height()-1, errorString, lines); + int lh = font->LineHeight(); + for (size_t i = 0; i < lines.size(); i++) { +#ifdef GRAPHLCD_CBITMAP_ARGB + mScreen->DrawText(3, 1+i*lh, mLcd->Width()-1, lines[i], font, GLCD::cColor::White); +#else + mScreen->DrawText(3, 1+i*lh, mLcd->Width()-1, lines[i], font, GLCD::clrWhite); +#endif + } + } else { + // draw an 'X' to inform the user that there was a problem with loading the skin + // (better than just leaving an empty screen ...) +#ifdef GRAPHLCD_CBITMAP_ARGB + mScreen->DrawLine(skipx, skipy, mLcd->Width()-1-skipx, mLcd->Height()-1-skipy, GLCD::cColor::White); + mScreen->DrawLine(mLcd->Width()-1-skipx, skipy, skipx, mLcd->Height()-1-skipy, GLCD::cColor::White); +#else + mScreen->DrawLine(skipx, skipy, mLcd->Width()-1-skipx, mLcd->Height()-1-skipy, GLCD::clrWhite); + mScreen->DrawLine(mLcd->Width()-1-skipx, skipy, skipx, mLcd->Height()-1-skipy, GLCD::clrWhite); +#endif + } +#ifdef GRAPHLCD_CBITMAP_ARGB + mLcd->SetScreen(mScreen->Data(), mScreen->Width(), mScreen->Height()); +#else mLcd->SetScreen(mScreen->Data(), mScreen->Width(), mScreen->Height(), mScreen->LineSize()); +#endif mLcd->Refresh(true); return; } @@ -143,11 +178,15 @@ void cGraphLCDDisplay::Action(void) mLcd->Refresh(true); mUpdate = true; + uint64_t lastEventMs = 0; +#define MIN_EVENT_DELAY 500 + while (Running()) { if (GraphLCDSetup.PluginActive) { uint64_t currTimeMs = cTimeMs::Now(); + GLCD::cSkinDisplay * display = NULL; if (mUpdateAt != 0) { @@ -185,27 +224,31 @@ void cGraphLCDDisplay::Action(void) } } - { - GLCD::cSkinDisplay * display = NULL; + /* display mode (normal or interactive): reset after 10 secs if not normal */ + if ( (mDisplayMode != DisplayModeNormal) && ( (uint32_t)(currTimeMs - LastTimeDisplayMode) > (uint32_t)(10000)) ) { + mDisplayMode = DisplayModeNormal; + LastTimeDisplayMode = currTimeMs; + mUpdate = true; + } + + if (mState == StateNormal) + display = mSkin->GetDisplay("normal"); + else if (mState == StateReplay) + display = mSkin->GetDisplay("replay"); + else if (mState == StateMenu) + display = mSkin->GetDisplay("menu"); + if (display && display->NeedsUpdate(currTimeMs ) ) + mUpdate = true; - if (mState == StateNormal) - display = mSkin->GetDisplay("normal"); - else if (mState == StateReplay) - display = mSkin->GetDisplay("replay"); - else if (mState == StateMenu) - display = mSkin->GetDisplay("menu"); - if (display && display->NeedsUpdate(currTimeMs ) ) - mUpdate = true; - } // update Display every minute - if (mState == StateNormal && currTimeMs/60000 != mLastTimeMs/60000) + if (mState == StateNormal && (currTimeMs/60000 != mLastTimeMs/60000)) { mUpdate = true; } // update Display every second in replay state - if (mState == StateReplay && currTimeMs/1000 != mLastTimeMs/1000) + if (mState == StateReplay && (currTimeMs/1000 != mLastTimeMs/1000)) { mUpdate = true; } @@ -219,7 +262,7 @@ void cGraphLCDDisplay::Action(void) // update display if BrightnessDelay is exceeded if (bActive && (nCurrentBrightness == GraphLCDSetup.BrightnessActive) && - ((int)((cTimeMs::Now() - LastTimeBrightness)) > (GraphLCDSetup.BrightnessDelay*1000))) + ((uint32_t)((cTimeMs::Now() - LastTimeBrightness)) > (uint32_t)(GraphLCDSetup.BrightnessDelay*1000))) { mUpdate = true; } @@ -232,6 +275,29 @@ void cGraphLCDDisplay::Action(void) } + // check event + GLCD::cGLCDEvent * ev = mSkin->Config().GetDriver()->GetEvent(); + if (ev && display && ((uint32_t)(currTimeMs-lastEventMs) > (uint32_t)(MIN_EVENT_DELAY) )) { + std::string rv = ""; + + if ( (rv = display->CheckAction(ev) ) != "") { + if (rv.substr(0,4) == "Key.") { + cRemote::Put(cKey::FromString(rv.substr(4).c_str()), true); + LastTimeDisplayMode = currTimeMs; /* if interactive mode: extend it */ + } else if (rv.substr(0,5) == "Mode.") { + if (rv.substr(5) == "Interactive") { + mDisplayMode = DisplayModeInteractive; + LastTimeDisplayMode = currTimeMs; + } else if (rv.substr(5) == "Normal") { + mDisplayMode = DisplayModeNormal; + LastTimeDisplayMode = currTimeMs; + } + mUpdate = true; + } + lastEventMs = currTimeMs; + } + } + if (mUpdate) { mUpdateAt = 0; @@ -239,7 +305,8 @@ void cGraphLCDDisplay::Action(void) mGraphLCDState->Update(); - mScreen->Clear(); + mScreen->Clear(mSkin->GetBackgroundColor()); + GLCD::cSkinDisplay * display = NULL; if (mState == StateNormal) @@ -262,13 +329,33 @@ void cGraphLCDDisplay::Action(void) if (display) display->Render(mScreen); } +#ifdef GRAPHLCD_CBITMAP_ARGB + mLcd->SetScreen(mScreen->Data(), mScreen->Width(), mScreen->Height()); +#else mLcd->SetScreen(mScreen->Data(), mScreen->Width(), mScreen->Height(), mScreen->LineSize()); +#endif mLcd->Refresh(false); mLastTimeMs = currTimeMs; SetBrightness(); + + // flush events + mSkin->Config().GetDriver()->GetEvent(); } else { +#if 0 + GLCD::cGLCDEvent * ev = mSkin->Config().GetDriver()->GetEvent(); + if (ev && display && ((uint32_t)(currTimeMs-lastEventMs) > (uint32_t)(MIN_EVENT_DELAY) )) { + std::string rv = ""; + + if ( (rv = display->CheckAction(ev) ) != "") { + if (rv.substr(0,4) == "Key.") { + cRemote::Put(cKey::FromString(rv.substr(4).c_str()), true); + } + lastEventMs = currTimeMs; + } + } +#endif cCondWait::SleepMs(100); } } @@ -381,7 +468,7 @@ void cGraphLCDDisplay::SetBrightness() else { if (GraphLCDSetup.BrightnessDelay < 1 - || ((int)(cTimeMs::Now() - LastTimeBrightness) > (GraphLCDSetup.BrightnessDelay*1000))) + || ((unsigned int)(cTimeMs::Now() - LastTimeBrightness) > (unsigned int)(GraphLCDSetup.BrightnessDelay*1000))) { mLcd->SetBrightness(GraphLCDSetup.BrightnessIdle); nCurrentBrightness = GraphLCDSetup.BrightnessIdle; diff --git a/display.h b/display.h index 261ad55..6f5c8e6 100644 --- a/display.h +++ b/display.h @@ -7,8 +7,8 @@ * to the COPYING file distributed with this package. * * (c) 2001-2004 Carsten Siebholz - * (c) 2004 Andreas Regel - * (c) 2010 Wolfgang Astleitner + * (c) 2004-2010 Andreas Regel + * (c) 2010-2011 Wolfgang Astleitner */ #ifndef _GRAPHLCD_DISPLAY_H_ @@ -40,6 +40,13 @@ enum eThreadState StateMenu }; +// state of current display mode (interesting for displays w/ touchpads) +enum eDisplayMode +{ + DisplayModeNormal, + DisplayModeInteractive +}; + // Display update Thread class cGraphLCDDisplay : public cThread { @@ -59,6 +66,10 @@ public: void ForceUpdateBrightness(); const cGraphLCDService * GetServiceObject() const { return mService; } + + GLCD::cDriver * GetDriver() const { return mLcd; } + + const eDisplayMode GetDisplayMode() const { return mDisplayMode; } protected: virtual void Action(); @@ -89,6 +100,9 @@ private: bool bBrightnessActive; /* external services */ cGraphLCDService * mService; + /* display mode (normal or interactive) */ + eDisplayMode mDisplayMode; + uint64_t LastTimeDisplayMode; }; #endif diff --git a/graphlcd/skins/touchcol/images/arrow.pbm b/graphlcd/skins/touchcol/images/arrow.pbm new file mode 100644 index 0000000..2ea2c0f Binary files /dev/null and b/graphlcd/skins/touchcol/images/arrow.pbm differ diff --git a/graphlcd/skins/touchcol/images/arrow_small.pbm b/graphlcd/skins/touchcol/images/arrow_small.pbm new file mode 100644 index 0000000..b02a42b --- /dev/null +++ b/graphlcd/skins/touchcol/images/arrow_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +8 7 +  \ No newline at end of file diff --git a/graphlcd/skins/touchcol/images/message.pbm b/graphlcd/skins/touchcol/images/message.pbm new file mode 100644 index 0000000..a8ff675 Binary files /dev/null and b/graphlcd/skins/touchcol/images/message.pbm differ diff --git a/graphlcd/skins/touchcol/images/mute.pbm b/graphlcd/skins/touchcol/images/mute.pbm new file mode 100644 index 0000000..f19b0fa --- /dev/null +++ b/graphlcd/skins/touchcol/images/mute.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +23 22 +`00 `a }Al88l}A @ `a00` \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/dolby.pbm b/graphlcd/skins/touchcol/symbols/dolby.pbm new file mode 100644 index 0000000..7273c86 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/dolby.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +†‚†ž \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/dolby_small.pbm b/graphlcd/skins/touchcol/symbols/dolby_small.pbm new file mode 100644 index 0000000..a4a72f9 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/dolby_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +??? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/empty.pbm b/graphlcd/skins/touchcol/symbols/empty.pbm new file mode 100644 index 0000000..2fbee34 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/empty.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 + \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/empty_small.pbm b/graphlcd/skins/touchcol/symbols/empty_small.pbm new file mode 100644 index 0000000..fe8389b --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/empty_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +???97 \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/multilanguage.pbm b/graphlcd/skins/touchcol/symbols/multilanguage.pbm new file mode 100644 index 0000000..0b6c317 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/multilanguage.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +rڢڜr \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/multilanguage_small.pbm b/graphlcd/skins/touchcol/symbols/multilanguage_small.pbm new file mode 100644 index 0000000..3435bfd --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/multilanguage_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +?? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/mute.pbm b/graphlcd/skins/touchcol/symbols/mute.pbm new file mode 100644 index 0000000..d88a206 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/mute.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +v 0  0 v \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/mute_small.pbm b/graphlcd/skins/touchcol/symbols/mute_small.pbm new file mode 100644 index 0000000..f86fc93 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/mute_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +G_)%)G_ \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording.pbm b/graphlcd/skins/touchcol/symbols/recording.pbm new file mode 100644 index 0000000..b13c220 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +ff \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording2.pbm b/graphlcd/skins/touchcol/symbols/recording2.pbm new file mode 100644 index 0000000..569dc17 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording2.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +n~ \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording2_small.pbm b/graphlcd/skins/touchcol/symbols/recording2_small.pbm new file mode 100644 index 0000000..b52adb7 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording2_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording3.pbm b/graphlcd/skins/touchcol/symbols/recording3.pbm new file mode 100644 index 0000000..af1e5da --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording3.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +nn \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording3_small.pbm b/graphlcd/skins/touchcol/symbols/recording3_small.pbm new file mode 100644 index 0000000..1383772 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording3_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 + \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording4.pbm b/graphlcd/skins/touchcol/symbols/recording4.pbm new file mode 100644 index 0000000..cfc18b7 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording4.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +~^ \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording4_small.pbm b/graphlcd/skins/touchcol/symbols/recording4_small.pbm new file mode 100644 index 0000000..33300e6 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording4_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/recording_small.pbm b/graphlcd/skins/touchcol/symbols/recording_small.pbm new file mode 100644 index 0000000..b378aae --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/recording_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +?? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/replay-fast-fwd.pbm b/graphlcd/skins/touchcol/symbols/replay-fast-fwd.pbm new file mode 100644 index 0000000..a5dfa47 Binary files /dev/null and b/graphlcd/skins/touchcol/symbols/replay-fast-fwd.pbm differ diff --git a/graphlcd/skins/touchcol/symbols/replay-fast-rwd.pbm b/graphlcd/skins/touchcol/symbols/replay-fast-rwd.pbm new file mode 100644 index 0000000..bccfb9c Binary files /dev/null and b/graphlcd/skins/touchcol/symbols/replay-fast-rwd.pbm differ diff --git a/graphlcd/skins/touchcol/symbols/replay-pause.pbm b/graphlcd/skins/touchcol/symbols/replay-pause.pbm new file mode 100644 index 0000000..5a45410 Binary files /dev/null and b/graphlcd/skins/touchcol/symbols/replay-pause.pbm differ diff --git a/graphlcd/skins/touchcol/symbols/replay-play.pbm b/graphlcd/skins/touchcol/symbols/replay-play.pbm new file mode 100644 index 0000000..9808fa2 Binary files /dev/null and b/graphlcd/skins/touchcol/symbols/replay-play.pbm differ diff --git a/graphlcd/skins/touchcol/symbols/replay-slow-fwd.pbm b/graphlcd/skins/touchcol/symbols/replay-slow-fwd.pbm new file mode 100644 index 0000000..5187921 Binary files /dev/null and b/graphlcd/skins/touchcol/symbols/replay-slow-fwd.pbm differ diff --git a/graphlcd/skins/touchcol/symbols/replay-slow-rwd.pbm b/graphlcd/skins/touchcol/symbols/replay-slow-rwd.pbm new file mode 100644 index 0000000..a069fa4 Binary files /dev/null and b/graphlcd/skins/touchcol/symbols/replay-slow-rwd.pbm differ diff --git a/graphlcd/skins/touchcol/symbols/scrambled.pbm b/graphlcd/skins/touchcol/symbols/scrambled.pbm new file mode 100644 index 0000000..50d6fd1 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/scrambled.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 +rڿژr \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/scrambled_small.pbm b/graphlcd/skins/touchcol/symbols/scrambled_small.pbm new file mode 100644 index 0000000..56c7af7 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/scrambled_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +?? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/teletext.pbm b/graphlcd/skins/touchcol/symbols/teletext.pbm new file mode 100644 index 0000000..c1bfccd --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/teletext.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +15 11 + \ No newline at end of file diff --git a/graphlcd/skins/touchcol/symbols/teletext_small.pbm b/graphlcd/skins/touchcol/symbols/teletext_small.pbm new file mode 100644 index 0000000..825ce98 --- /dev/null +++ b/graphlcd/skins/touchcol/symbols/teletext_small.pbm @@ -0,0 +1,4 @@ +P4 +# Created by Paint Shop Pro 5 +11 7 +??? \ No newline at end of file diff --git a/graphlcd/skins/touchcol/touchcol.skin b/graphlcd/skins/touchcol/touchcol.skin new file mode 100644 index 0000000..a6d7141 --- /dev/null +++ b/graphlcd/skins/touchcol/touchcol.skin @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skinconfig.c b/skinconfig.c index 8537eaf..89ff8a4 100644 --- a/skinconfig.c +++ b/skinconfig.c @@ -6,7 +6,8 @@ * This file is released under the GNU General Public License. Refer * to the COPYING file distributed with this package. * - * (c) 2004 Andreas Regel + * (c) 2004-2010 Andreas Regel + * (c) 2010-2011 Wolfgang Astleitner */ #include @@ -136,6 +137,7 @@ typedef enum _eTokenId tokBrightnessActive, tokBrightnessIdle, tokBrightnessDelay, + tokDisplayMode, tokPrivateSettingEnd, // external services @@ -260,6 +262,7 @@ static const std::string Tokens[tokCountToken] = "BrightnessActive", "BrightnessIdle", "BrightnessDelay", + "DisplayMode", "privateSettingEnd", // external services @@ -647,6 +650,16 @@ GLCD::cType cGraphLCDSkinConfig::GetToken(const GLCD::tSkinToken & Token) return GraphLCDSetup.BrightnessIdle; case tokBrightnessDelay: return GraphLCDSetup.BrightnessDelay; + case tokDisplayMode: + switch (mDisplay->GetDisplayMode()) + { + case DisplayModeNormal: + return "Normal"; + case DisplayModeInteractive: + return "Interactive"; + default: + return "Normal"; + } default: break; @@ -765,13 +778,18 @@ int cGraphLCDSkinConfig::GetTabPosition(int Index, int MaxWidth, const GLCD::cFo return 0; } +void cGraphLCDSkinConfig::SetMenuClear() +{ + mTabs.clear(); +} + + uint64_t cGraphLCDSkinConfig::Now(void) { return cTimeMs::Now(); } - -void cGraphLCDSkinConfig::SetMenuClear() +GLCD::cDriver * cGraphLCDSkinConfig::GetDriver(void) const { - mTabs.clear(); + return (mDisplay) ? (mDisplay)->GetDriver() : NULL; } diff --git a/skinconfig.h b/skinconfig.h index 97bde72..3e901d5 100644 --- a/skinconfig.h +++ b/skinconfig.h @@ -6,7 +6,8 @@ * This file is released under the GNU General Public License. Refer * to the COPYING file distributed with this package. * - * (c) 2004 Andreas Regel + * (c) 2004-2010 Andreas Regel + * (c) 2010-2011 Wolfgang Astleitner */ #ifndef _GRAPHLCD_SKINCONFIG_H_ @@ -14,6 +15,8 @@ #include "alias.h" +#include + class cGraphLCDSkinConfig : public GLCD::cSkinConfig { private: @@ -37,9 +40,11 @@ public: virtual GLCD::cType GetToken(const GLCD::tSkinToken & Token); virtual int GetTokenId(const std::string & Name); virtual int GetTabPosition(int Index, int MaxWidth, const GLCD::cFont & Font); - virtual uint64_t Now(void); const std::string & SkinName(void) const { return mSkinName; } + + virtual uint64_t Now(void); + virtual GLCD::cDriver * GetDriver(void) const; }; #endif -- cgit v1.2.3