diff options
author | Martin Arver <martin.arver@gmail.com> | 2006-06-07 16:37:04 +0000 |
---|---|---|
committer | Martin Arver <martin.arver@gmail.com> | 2006-06-07 16:37:04 +0000 |
commit | 68e40170f2c943318cefcb4c446db846a6659a9c (patch) | |
tree | ff4d174a7f066ed07e039fc057f1e97b9ba70fe1 /manual/advanced_topics/main.tex | |
parent | 771cc4a9768483871967fbed38291689721a282d (diff) | |
download | rockbox-68e40170f2c943318cefcb4c446db846a6659a9c.tar.gz rockbox-68e40170f2c943318cefcb4c446db846a6659a9c.zip |
Some more cleanup/macrofying of the wps/config section
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10084 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'manual/advanced_topics/main.tex')
-rw-r--r-- | manual/advanced_topics/main.tex | 86 |
1 files changed, 52 insertions, 34 deletions
diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex index 8b24d8e065..4b51325715 100644 --- a/manual/advanced_topics/main.tex +++ b/manual/advanced_topics/main.tex | |||
@@ -2,7 +2,11 @@ | |||
2 | 2 | ||
3 | \section{\label{ref:CustomisingUI}Customising the userinterface} | 3 | \section{\label{ref:CustomisingUI}Customising the userinterface} |
4 | \subsection{\label{ref:GettingExtras}Getting Extras (Fonts, Languages)} | 4 | \subsection{\label{ref:GettingExtras}Getting Extras (Fonts, Languages)} |
5 | Rockbox supports custom fonts (for the Recorder and Ondio only) and a number of different languages. Rockbox comes with several fonts and languages already included. If new fonts have been created, then they will be found in the font package at \url{http://www.rockbox.org/daily.shtml}. The latest \fname{.lng} files are always included in the daily Rockbox builds. | 5 | Rockbox supports custom fonts (for the Recorder and Ondio only) and a number of |
6 | different languages. Rockbox comes with several fonts and languages already | ||
7 | included. If new fonts have been created, then they will be found in the font | ||
8 | package at \url{http://www.rockbox.org/daily.shtml}. The latest \fname{.lng} | ||
9 | files are always included in the daily Rockbox builds. | ||
6 | 10 | ||
7 | \opt{HAVE_LCD_BITMAP}{ | 11 | \opt{HAVE_LCD_BITMAP}{ |
8 | \subsection{\label{ref:Loadingfonts}Loading Fonts} | 12 | \subsection{\label{ref:Loadingfonts}Loading Fonts} |
@@ -13,8 +17,9 @@ Rockbox supports custom fonts (for the Recorder and Ondio only) and a number of | |||
13 | it must be located in the \fname{/.rockbox } folder and the filename | 17 | it must be located in the \fname{/.rockbox } folder and the filename |
14 | must be at most 24 characters long. | 18 | must be at most 24 characters long. |
15 | \warn{Advanced Users Only: Any BDF font file up to 16 pixels high should | 19 | \warn{Advanced Users Only: Any BDF font file up to 16 pixels high should |
16 | be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use the \fname{convbdf} tool. This tool can be found in the \fname{tools} directory | 20 | be usable with Rockbox. To convert from \fname{.bdf} to \fname{.fnt}, use |
17 | of the Rockbox source code.} | 21 | the \fname{convbdf} tool. This tool can be found in the \fname{tools} |
22 | directory of the Rockbox source code.} | ||
18 | } | 23 | } |
19 | 24 | ||
20 | \subsection{\label{ref:Loadinglanguages}Loading Languages} | 25 | \subsection{\label{ref:Loadinglanguages}Loading Languages} |
@@ -81,19 +86,30 @@ the tags that are available. | |||
81 | 86 | ||
82 | \begin{description} | 87 | \begin{description} |
83 | \item[If/else: ] | 88 | \item[If/else: ] |
84 | Syntax: \%?xx{\textless}true{\textbar}false{\textgreater}\\ | 89 | Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}\\ |
85 | 90 | ||
86 | If the tag specified by ``xx'' has a value, the text between the ``{\textless}'' and the ``{\textbar}'' is displayed (the true part), else the text between the ``{\textbar}'' and the ``{\textgreater}'' is displayed (the false part). | 91 | If the tag specified by ``\config{xx}'' has a value, the text between the |
87 | The else part is optional, so the ``{\textbar}'' does not have to be specified if no else part is desired. The conditionals nest, so the text in the if and else part can contain all \% commands, including conditionals. | 92 | ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true |
93 | part), else the text between the ``\config{{\textbar}}'' and the | ||
94 | ``\config{{\textgreater}}'' is displayed (the false part). | ||
95 | The else part is optional, so the ``\config{{\textbar}}'' does not have to be | ||
96 | specified if no else part is desired. The conditionals nest, so the text in the | ||
97 | if and else part can contain all \config{\%} commands, including conditionals. | ||
88 | 98 | ||
89 | \item[Enumerations: ] | 99 | \item[Enumerations: ] |
90 | Syntax: \%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}...{\textbar}else{\textgreater}\\ | 100 | Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}...{\textbar}else{\textgreater}}\\ |
91 | 101 | ||
92 | For tags with multiple values, like Play status, the conditional can hold a list of alternatives, one for each value the tag can have. | 102 | For tags with multiple values, like Play status, the conditional can hold a |
103 | list of alternatives, one for each value the tag can have. | ||
93 | 104 | ||
94 | Example: \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater}\\ | 105 | Example enumeration: |
106 | \begin{example} | ||
107 | \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater} | ||
108 | \end{example} | ||
95 | 109 | ||
96 | The last else part is optional, and will be displayed if the tag has no value. The WPS parser will always display the last part if the tag has no value, or if the list of alternatives is too short. | 110 | The last else part is optional, and will be displayed if the tag has no value. |
111 | The WPS parser will always display the last part if the tag has no value, or if | ||
112 | the list of alternatives is too short. | ||
97 | \end{description} | 113 | \end{description} |
98 | 114 | ||
99 | \subsubsection{Next Song info} | 115 | \subsubsection{Next Song info} |
@@ -102,9 +118,9 @@ about to play after the one currently playing (unless you change the | |||
102 | plan). | 118 | plan). |
103 | 119 | ||
104 | If you use the upper--case versions of the | 120 | If you use the upper--case versions of the |
105 | three tags: F, I and D, they will instead refer to the next song | 121 | three tags: \config{F}, \config{I} and \config{D}, they will instead refer to |
106 | instead of the current one. Example: \%Ig is the genre name used in the | 122 | the next song instead of the current one. Example: \config{\%Ig} is the genre |
107 | next song and \%Ff is the mp3 frequency. | 123 | name used in the next song and \config{\%Ff} is the mp3 frequency. |
108 | 124 | ||
109 | \note{The next song information WILL NOT be available at all | 125 | \note{The next song information WILL NOT be available at all |
110 | times, but will most likely be available at the end of a song. We | 126 | times, but will most likely be available at the end of a song. We |
@@ -113,25 +129,24 @@ information about the next song!} | |||
113 | 129 | ||
114 | \subsubsection{Alternating sublines} | 130 | \subsubsection{Alternating sublines} |
115 | 131 | ||
116 | It is possible to group items on each line into 2 or more groups or | 132 | It is possible to group items on each line into 2 or more groups or |
117 | ``sublines''. Each subline will be displayed | 133 | ``sublines''. Each subline will be displayed in succession on the line for a |
118 | in succession on the line for a specified time, alternating | 134 | specified time, alternating continuously through each defined subline. |
119 | continuously through each defined subline. | ||
120 | 135 | ||
121 | Items on a line are broken into sublines with the semicolon | 136 | Items on a line are broken into sublines with the semicolon |
122 | ';' character. The display time for | 137 | '\config{;}' character. The display time for |
123 | each subline defaults to 2 seconds unless modified by using the | 138 | each subline defaults to 2 seconds unless modified by using the |
124 | '\%t' tag to specify an alternate | 139 | '\config{\%t}' tag to specify an alternate |
125 | time (in seconds and optional tenths of a second) for the subline to be | 140 | time (in seconds and optional tenths of a second) for the subline to be |
126 | displayed. | 141 | displayed. |
127 | 142 | ||
128 | Subline related special characters and tags: | 143 | Subline related special characters and tags: |
129 | 144 | ||
130 | ; : Split items on a line into separate sublines | 145 | \config{;} : Split items on a line into separate sublines |
131 | 146 | ||
132 | \%t : Set the subline display time. The | 147 | \config{\%t} : Set the subline display time. The |
133 | '\%t' is followed by either integer | 148 | '\config{\%t}' is followed by either integer |
134 | seconds (\%t5), or seconds and tenths of a second (\%t3.5). | 149 | seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}). |
135 | 150 | ||
136 | Each alternating subline can still be optionally scrolled while it is | 151 | Each alternating subline can still be optionally scrolled while it is |
137 | being displayed, and scrollable formats can be displayed on the same | 152 | being displayed, and scrollable formats can be displayed on the same |
@@ -148,7 +163,8 @@ Example subline definition: | |||
148 | repeat... | 163 | repeat... |
149 | \end{example} | 164 | \end{example} |
150 | 165 | ||
151 | Conditionals can be used with sublines to display a different set and/or number of sublines on the line depending on the evaluation of the conditional. | 166 | Conditionals can be used with sublines to display a different set and/or number |
167 | of sublines on the line depending on the evaluation of the conditional. | ||
152 | 168 | ||
153 | Example subline with conditionals: | 169 | Example subline with conditionals: |
154 | 170 | ||
@@ -156,7 +172,8 @@ Example subline with conditionals: | |||
156 | %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\ | 172 | %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\ |
157 | \end{example} | 173 | \end{example} |
158 | 174 | ||
159 | The format above will do two different things depending if ID3 tags are present. If the ID3 artist and title are present: | 175 | The format above will do two different things depending if ID3 tags are |
176 | present. If the ID3 artist and title are present: | ||
160 | 177 | ||
161 | Display id3 title for 8 seconds,\\ | 178 | Display id3 title for 8 seconds,\\ |
162 | 179 | ||
@@ -176,12 +193,12 @@ a subline can be skipped (not displayed) when that condition is met. | |||
176 | You can have as many as 52 images in your WPS. There are various ways of | 193 | You can have as many as 52 images in your WPS. There are various ways of |
177 | displaying images: | 194 | displaying images: |
178 | \begin{enumerate} | 195 | \begin{enumerate} |
179 | \item Load and always show the image, using the \%x tag | 196 | \item Load and always show the image, using the \config{\%x} tag |
180 | \item Preload the image with \%xl and show it with \%xd. This way you can | 197 | \item Preload the image with \config{\%xl} and show it with \config{\%xd}. |
181 | have your images displayed conditionally. | 198 | This way you can have your images displayed conditionally. |
182 | \opt{HAVE_LCD_COLOR}{ | 199 | \opt{HAVE_LCD_COLOR}{ |
183 | \item Load an image and show as backdrop using the \%X tag. The image must be | 200 | \item Load an image and show as backdrop using the \config{\%X} tag. The |
184 | of the same exact dimensions as your display. | 201 | image must be of the same exact dimensions as your display. |
185 | } | 202 | } |
186 | \end{enumerate} | 203 | \end{enumerate} |
187 | 204 | ||
@@ -203,7 +220,7 @@ Example on bitmap preloading and use: | |||
203 | \%?mm<%xdb|%xdc|%xdd|%xde>\\ | 220 | \%?mm<%xdb|%xdc|%xdd|%xde>\\ |
204 | \end{example} | 221 | \end{example} |
205 | Four images at the same x and y position are preloaded in the example. Which | 222 | Four images at the same x and y position are preloaded in the example. Which |
206 | image to display is determined by the \%mm tag (the repeat mode). | 223 | image to display is determined by the \config{\%mm} tag (the repeat mode). |
207 | 224 | ||
208 | \subsubsection{Example File} | 225 | \subsubsection{Example File} |
209 | \begin{example} | 226 | \begin{example} |
@@ -240,13 +257,14 @@ for the full reference of available options. | |||
240 | \subsection{Format Rules} | 257 | \subsection{Format Rules} |
241 | 258 | ||
242 | \begin{itemize} | 259 | \begin{itemize} |
243 | \item Format: \verb+setting: value+ | 260 | \item Format: \config{setting: value} |
244 | \item Each setting must be on a separate line. | 261 | \item Each setting must be on a separate line. |
245 | \item Lines starting with \# are ignored. | 262 | \item Lines starting with \config{\#} are ignored. |
246 | \end{itemize} | 263 | \end{itemize} |
247 | 264 | ||
248 | \subsection{Example File} | 265 | Example of a configuration file: |
249 | \begin{example} | 266 | \begin{example} |
267 | # Example configuration file | ||
250 | volume: 70 | 268 | volume: 70 |
251 | bass: 11 | 269 | bass: 11 |
252 | treble: 12 | 270 | treble: 12 |