From 46e597df44402086edd010b69702c2de52b75fc8 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Sun, 1 May 2011 22:22:32 +0200 Subject: initial upload to branch 'touchcol'. see file 'HISTORY' for changes --- glcdskin/function.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'glcdskin/function.c') diff --git a/glcdskin/function.c b/glcdskin/function.c index 8582ad5..0fe39b3 100644 --- a/glcdskin/function.c +++ b/glcdskin/function.c @@ -33,6 +33,7 @@ static const char * Internals[] = "FontTextHeight", "ImageWidth", "ImageHeight", + "QueryFeature", NULL }; @@ -247,6 +248,10 @@ bool cSkinFunction::Parse(const std::string & Text) params = 1; break; + case funQueryFeature: + params = 1; + break; + default: break; } @@ -443,6 +448,15 @@ cType cSkinFunction::Evaluate(void) const case funImageHeight: return FunImage(mType, mParams[0]->Evaluate()); + case funQueryFeature: { + int value; + if (mSkin->Config().GetDriver()->GetFeature((const std::string)(mParams[0]->Evaluate()), value)) { + return (value) ? true : false; + } else { + return false; + } + } + default: //Dprintf("unknown function code\n"); syslog(LOG_ERR, "ERROR: Unknown function code called (this shouldn't happen)"); -- cgit v1.2.3