summaryrefslogtreecommitdiff
path: root/glcdskin/function.c
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2011-05-01 22:22:32 +0200
committermrwastl <mrwastl@users.sourceforge.net>2011-05-01 22:22:32 +0200
commit46e597df44402086edd010b69702c2de52b75fc8 (patch)
treefa9528f19f951b765b071c239b09547cf69bd169 /glcdskin/function.c
parent57729cf285b058d192a60bd7fce1b2d29bdd9650 (diff)
downloadgraphlcd-base-46e597df44402086edd010b69702c2de52b75fc8.tar.gz
graphlcd-base-46e597df44402086edd010b69702c2de52b75fc8.tar.bz2
initial upload to branch 'touchcol'. see file 'HISTORY' for changes
Diffstat (limited to 'glcdskin/function.c')
-rw-r--r--glcdskin/function.c14
1 files changed, 14 insertions, 0 deletions
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)");