summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChiwen Chang <rock1104.tw@yahoo.com.tw>2014-07-21 12:31:01 +1000
committerJonathan Gordon <rockbox@jdgordon.info>2014-07-21 04:54:53 +0200
commit9fb65294fb8bd9cfcf3e830f82bf01c3afdbbcce (patch)
treef9aae029a682d0eb2154891c1b791a22769d14d2 /lib
parent78478076a3e5ce1bde54e9085f2910284fd8bacd (diff)
downloadrockbox-9fb65294fb8bd9cfcf3e830f82bf01c3afdbbcce.tar.gz
rockbox-9fb65294fb8bd9cfcf3e830f82bf01c3afdbbcce.tar.bz2
rockbox-9fb65294fb8bd9cfcf3e830f82bf01c3afdbbcce.zip
add supports for x,y value in percentage to several tags.
including BAR_PARAMS, %xl, %dr, %T,%St, %xl and %Cl Change-Id: I0811ebfff5f83085481dcbf08f97b7223f677bfe Reviewed-on: http://gerrit.rockbox.org/900 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Diffstat (limited to 'lib')
-rw-r--r--lib/skin_parser/tag_table.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/skin_parser/tag_table.c b/lib/skin_parser/tag_table.c
index 24dcf181d4..2cea048548 100644
--- a/lib/skin_parser/tag_table.c
+++ b/lib/skin_parser/tag_table.c
@@ -22,7 +22,7 @@
#include "tag_table.h"
#include <string.h>
-#define BAR_PARAMS "?iiii|s*"
+#define BAR_PARAMS "?[iP][iP][iP][iP]|s*"
/* The tag definition table */
static const struct tag_info legal_tags[] =
{
@@ -176,13 +176,13 @@ static const struct tag_info legal_tags[] =
{ SKIN_TOKEN_DISABLE_THEME, "wd", "", 0|NOBREAK },
{ SKIN_TOKEN_DRAW_INBUILTBAR, "wi", "", SKIN_REFRESH_STATIC|NOBREAK },
- { SKIN_TOKEN_IMAGE_PRELOAD, "xl", "SF|III", 0|NOBREAK },
+ { SKIN_TOKEN_IMAGE_PRELOAD, "xl", "SF|[IP][IP]I", 0|NOBREAK },
{ SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY, "xd", "S|[IT]I", 0 },
{ SKIN_TOKEN_IMAGE_DISPLAY, "x", "SF|II", SKIN_REFRESH_STATIC|NOBREAK },
{ SKIN_TOKEN_IMAGE_DISPLAY_9SEGMENT, "x9", "S", 0 },
{ SKIN_TOKEN_LOAD_FONT, "Fl" , "IF|I", 0|NOBREAK },
- { SKIN_TOKEN_ALBUMART_LOAD, "Cl" , "IIII|ss", 0|NOBREAK },
+ { SKIN_TOKEN_ALBUMART_LOAD, "Cl" , "[iP][iP][iP][iP]|ss", 0|NOBREAK },
{ SKIN_TOKEN_ALBUMART_DISPLAY, "Cd" , "", SKIN_REFRESH_STATIC },
{ SKIN_TOKEN_ALBUMART_FOUND, "C" , "", SKIN_REFRESH_STATIC },
@@ -214,7 +214,7 @@ static const struct tag_info legal_tags[] =
{ SKIN_TOKEN_IMAGE_BACKDROP, "X" , "f", SKIN_REFRESH_STATIC|NOBREAK },
/* This uses the bar tag params also but the first item can be a string
* and we don't allow no params. */
- { SKIN_TOKEN_SETTING, "St" , "[Si]|iiis*", SKIN_REFRESH_DYNAMIC },
+ { SKIN_TOKEN_SETTING, "St" , "[Sip]|[ip][ip][ip]s*", SKIN_REFRESH_DYNAMIC },
{ SKIN_TOKEN_TRANSLATEDSTRING, "Sx" , "S", SKIN_REFRESH_STATIC },
{ SKIN_TOKEN_LANG_IS_RTL, "Sr" , "", SKIN_REFRESH_STATIC },
@@ -224,8 +224,7 @@ static const struct tag_info legal_tags[] =
* [SI]III[SI]|SN <- SIIIIS|S or IIIIS|S
* keep in sync with parse_touchregion() and parse_lasttouch() */
{ SKIN_TOKEN_LASTTOUCH, "Tl" , "|[SD]D", SKIN_REFRESH_DYNAMIC },
- { SKIN_TOKEN_TOUCHREGION, "T" , "[SI]III[SI]|S*", 0|NOBREAK },
-
+ { SKIN_TOKEN_TOUCHREGION, "T" , "[Sip][ip][ip][ip][Sip]|S*", 0|NOBREAK },
{ SKIN_TOKEN_HAVE_TOUCH, "Tp", "", FEATURE_TAG },
{ SKIN_TOKEN_CURRENT_SCREEN, "cs", "", SKIN_REFRESH_DYNAMIC },
@@ -246,7 +245,7 @@ static const struct tag_info legal_tags[] =
{ SKIN_TOKEN_VAR_TIMEOUT, "vl", "S|D", SKIN_REFRESH_DYNAMIC },
{ SKIN_TOKEN_SUBSTRING, "ss", "IiT|s", SKIN_REFRESH_DYNAMIC },
- { SKIN_TOKEN_DRAWRECTANGLE, "dr", "IIii|ss", SKIN_REFRESH_STATIC },
+ { SKIN_TOKEN_DRAWRECTANGLE, "dr", "[IP][IP][ip][ip]|ss", SKIN_REFRESH_STATIC },
{ SKIN_TOKEN_UNKNOWN, "" , "", 0 }
/* Keep this here to mark the end of the table */
};