summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-27 08:01:58 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-27 08:01:58 +0000
commit87aa86cedd27445e51b0ad38dbc7cf2bdaa42364 (patch)
tree09d19881a5a48bbd3979877bfd08e5a109e6fa56 /lib
parent969381322d080a636d961a2e4505a9d88f04147d (diff)
downloadrockbox-87aa86cedd27445e51b0ad38dbc7cf2bdaa42364.tar.gz
rockbox-87aa86cedd27445e51b0ad38dbc7cf2bdaa42364.tar.bz2
rockbox-87aa86cedd27445e51b0ad38dbc7cf2bdaa42364.zip
Skin variables for touchscreen targets (origional implementation by Jens TheeƟ)
%vs(name, [set|inc|dec], value [,max]) - name is the id, set sets the value, inc increments by value, dec decrements by value %vg(name) - get the current value %vl(name [,timeout]) - 'has it changed in [timeout]'? values start at 1 and are all reset to 1 on skin load git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29655 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'lib')
-rw-r--r--lib/skin_parser/tag_table.c5
-rw-r--r--lib/skin_parser/tag_table.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/skin_parser/tag_table.c b/lib/skin_parser/tag_table.c
index 56f5df1911..dea28b63ea 100644
--- a/lib/skin_parser/tag_table.c
+++ b/lib/skin_parser/tag_table.c
@@ -225,6 +225,11 @@ static const struct tag_info legal_tags[] =
{ SKIN_TOKEN_REC_MINUTES, "Rn" , "", SKIN_REFRESH_DYNAMIC },
{ SKIN_TOKEN_REC_HOURS, "Rh" , "", SKIN_REFRESH_DYNAMIC },
+ /* Skin variables */
+ { SKIN_TOKEN_VAR_SET, "vs", "SSI|I", SKIN_REFRESH_STATIC },
+ { SKIN_TOKEN_VAR_GETVAL, "vg", "S", SKIN_REFRESH_DYNAMIC },
+ { SKIN_TOKEN_VAR_TIMEOUT, "vl", "S|D", SKIN_REFRESH_DYNAMIC },
+
{ SKIN_TOKEN_UNKNOWN, "" , "", 0 }
/* Keep this here to mark the end of the table */
};
diff --git a/lib/skin_parser/tag_table.h b/lib/skin_parser/tag_table.h
index 31a5ec215f..e52fded61e 100644
--- a/lib/skin_parser/tag_table.h
+++ b/lib/skin_parser/tag_table.h
@@ -265,7 +265,11 @@ enum skin_token_type {
SKIN_TOKEN_HAVE_RDS,
SKIN_TOKEN_RDS_NAME,
SKIN_TOKEN_RDS_TEXT,
-
+
+ /* Skin variables */
+ SKIN_TOKEN_VAR_SET,
+ SKIN_TOKEN_VAR_GETVAL,
+ SKIN_TOKEN_VAR_TIMEOUT,
};
/*