diff options
author | lordjaxom <lordjaxom> | 2004-12-17 19:56:21 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-12-17 19:56:21 +0000 |
commit | ac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d (patch) | |
tree | d572f41490e8949a5e7323bf94b59c4034438afe /xml | |
parent | b8f29c674cc0ccca207123342c1344bbd0f13796 (diff) | |
download | vdr-plugin-text2skin-ac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d.tar.gz vdr-plugin-text2skin-ac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d.tar.bz2 |
1.0-pre5v1.0-pre5
Diffstat (limited to 'xml')
-rw-r--r-- | xml/function.c | 5 | ||||
-rw-r--r-- | xml/object.c | 4 | ||||
-rw-r--r-- | xml/string.c | 5 | ||||
-rw-r--r-- | xml/string.h | 25 | ||||
-rw-r--r-- | xml/type.c | 5 | ||||
-rw-r--r-- | xml/type.h | 11 |
6 files changed, 37 insertions, 18 deletions
diff --git a/xml/function.c b/xml/function.c index 597bece..66bae48 100644 --- a/xml/function.c +++ b/xml/function.c @@ -1,5 +1,5 @@ /* - * $Id: function.c,v 1.7 2004/12/14 13:13:10 lordjaxom Exp $ + * $Id: function.c,v 1.8 2004/12/17 19:56:16 lordjaxom Exp $ */ #include "xml/function.h" @@ -165,11 +165,9 @@ const std::string &cxFunction::FunFile(const std::string &Param) const std::string cxFunction::FunPlugin(const std::string &Param) const { - Dprintf("FunPlugin: Get(%s)\n", Param.c_str()); cPlugin *p = cPluginManager::GetPlugin(Param.c_str()); if (p) { const char *entry = p->MainMenuEntry(); - Dprintf("Entry: |%s|\n", entry); if (entry) return entry; } @@ -200,7 +198,6 @@ std::string cxFunction::Evaluate(void) const return False; case fun_eq: - Dprintf("eq: |%s| <-> |%s|\n", mParams[0]->Evaluate().c_str(), mParams[1]->Evaluate().c_str()); return mParams[0]->Evaluate() == mParams[1]->Evaluate() ? True : False; case fun_file: diff --git a/xml/object.c b/xml/object.c index b0b8dc0..940e5a9 100644 --- a/xml/object.c +++ b/xml/object.c @@ -1,5 +1,5 @@ /* - * $Id: object.c,v 1.5 2004/12/14 20:02:31 lordjaxom Exp $ + * $Id: object.c,v 1.6 2004/12/17 19:56:16 lordjaxom Exp $ */ #include "xml/object.h" @@ -118,11 +118,9 @@ const cFont *cxObject::Font(void) const { const cFont *font; - Dprintf("trying: %s %d\n", (SkinPath() + "/fonts/" + mFontFace).c_str(), mFontSize); if ((font = cText2SkinFont::Load(SkinPath() + "/fonts", mFontFace, mFontSize)) != NULL) return font; - Dprintf("trying: %s %d\n", (SkinPath() + "/" + mSkin->Name() + "/" + mFontFace).c_str(), mFontSize); if ((font = cText2SkinFont::Load(SkinPath() + "/" + mSkin->Name(), mFontFace, mFontSize)) != NULL) return font; diff --git a/xml/string.c b/xml/string.c index 3748df2..5b573eb 100644 --- a/xml/string.c +++ b/xml/string.c @@ -1,5 +1,5 @@ /* - * $Id: string.c,v 1.7 2004/12/14 13:13:10 lordjaxom Exp $ + * $Id: string.c,v 1.8 2004/12/17 19:56:16 lordjaxom Exp $ */ #include "xml/string.h" @@ -13,6 +13,7 @@ static const char *Tokens[__COUNT_TOKEN__] = { "ChannelNumber", "ChannelName", "ChannelShortName", "ChannelBouquet", "ChannelPortal", "ChannelSource", "PresentStartDateTime", "PresentVPSDateTime", "PresentEndDateTime", "PresentDuration", "PresentProgress", + "PresentRemaining", "PresentTitle", "PresentShortText", "PresentDescription", "FollowingStartDateTime", "FollowingVPSDateTime", "FollowingEndDateTime", "FollowingDuration", "FollowingTitle", "FollowingShortText", "FollowingDescription", "Language", @@ -29,7 +30,7 @@ static const char *Tokens[__COUNT_TOKEN__] = { // Replay Display "ReplayTitle", "ReplayPositionIndex", "ReplayDurationIndex", "ReplayPrompt", "IsPlaying", "IsFastForward", "IsFastRewind", "IsSlowForward", "IsSlowRewind", "IsPausing", - "ReplayPosition", "ReplayDuration", "ReplayMode", + "ReplayPosition", "ReplayDuration", "ReplayRemaining", "ReplayMode", // Menu Page "MenuTitle", "MenuGroup", "IsMenuGroup", "MenuItem", "IsMenuItem", "MenuCurrent", "IsMenuCurrent", diff --git a/xml/string.h b/xml/string.h index 650e7f7..8e29db8 100644 --- a/xml/string.h +++ b/xml/string.h @@ -1,5 +1,5 @@ /* - * $Id: string.h,v 1.7 2004/12/14 20:02:31 lordjaxom Exp $ + * $Id: string.h,v 1.8 2004/12/17 19:56:16 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_XML_STRING_H @@ -25,6 +25,7 @@ enum exToken { tPresentEndDateTime, tPresentDuration, tPresentProgress, + tPresentRemaining, tPresentTitle, tPresentShortText, tPresentDescription, @@ -52,7 +53,7 @@ enum exToken { tVolumeTotal, tIsMute, - // Message Display + // Message Display (also in all other displays) tMessage, tMessageStatus, tMessageInfo, @@ -72,6 +73,7 @@ enum exToken { tIsPausing, tReplayPosition, tReplayDuration, + tReplayRemaining, tReplayMode, // Menu Page @@ -83,6 +85,7 @@ enum exToken { tMenuCurrent, tIsMenuCurrent, tMenuText, + // next four also in Channel and Replay display (if supported by vdr/plugin) tButtonRed, tButtonGreen, tButtonYellow, @@ -103,9 +106,27 @@ struct txToken { txToken(void): Index(-1), Tab(-1) {} txToken(exToken t, uint o, const std::string &a): Type(t), Offset(o), Attrib(a), Index(-1), Tab(-1) {} + friend bool operator< (const txToken &A, const txToken &B); + static std::string Token(const txToken &Token); }; +inline bool operator< (const txToken &A, const txToken &B) +{ + if (A.Type == B.Type) { + if (A.Attrib == B.Attrib) { + if (A.Index == B.Index) + return A.Tab < B.Tab; + else + return A.Index < B.Index; + } + else + return A.Attrib < B.Attrib; + } + else + return A.Type < B.Type; +} + class cxString { private: std::string mText; @@ -1,11 +1,14 @@ /* - * $Id: type.c,v 1.3 2004/12/12 20:26:25 lordjaxom Exp $ + * $Id: type.c,v 1.4 2004/12/17 19:56:16 lordjaxom Exp $ */ #include "xml/type.h" #include "xml/function.h" #include <stdio.h> +cxType cxType::False(false); +cxType cxType::True(true); + const std::string &cxType::String(void) { if (mType == number) { char *buffer; @@ -1,5 +1,5 @@ /* - * $Id: type.h,v 1.5 2004/12/14 20:02:31 lordjaxom Exp $ + * $Id: type.h,v 1.6 2004/12/17 19:56:16 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_XML_TYPE_H @@ -22,6 +22,9 @@ private: int mNumber; public: + static cxType True; + static cxType False; + cxType(void): mType(boolean), mNumber(0) {} cxType(const char *String): mType(string), mString(String ?: "") {} cxType(std::string String): mType(string), mString(String) {} @@ -30,15 +33,11 @@ public: cxType(bool Value): mType(boolean), mNumber(Value ? 1 : 0) {} const std::string &String(void); - int Number(void) const; + int Number(void) const { return mType == number ? mNumber : 0; } operator std::string () { return String(); } operator int () { return Number(); } operator bool () { return Number(); } }; -inline int cxType::Number(void) const { - return mType == number ? mNumber : 0; -} - #endif // VDR_TEXT2SKIN_XML_TYPE_H |