fix the manual also
[kugel-rb.git] / manual / appendix / wps_tags.tex
blob7b1c5cd907b29e8938b482ee1f20df1387de3e79
1 % $Id$ %
2 \chapter{\label{ref:wps_tags}Theme Tags}
3 Themeing is discussed in detail in section \reference{ref:ConfiguringtheWPS},
4 what follows is a list of the available tags.
6 \section{Status Bar}
7 \begin{tagmap}
8 \config{\%we} & Display Status Bar\\
9 \config{\%wd} & Hide Status Bar\\
10 \config{\%wi} & Display the inbuilt Status Bar in the current viewport\\
11 \end{tagmap}
12 These tags override the player setting for the display of the status bar.
13 They must be noted on their own line (which will not be shown in the WPS).
15 \section{Information from the track tags}
16 \begin{tagmap}
17 \config{\%ia} & Artist\\
18 \config{\%ic} & Composer\\
19 \config{\%iA} & Album Artist\\
20 \config{\%id} & Album Name\\
21 \config{\%iG} & Grouping\\
22 \config{\%ig} & Genre Name\\
23 \config{\%in} & Track Number\\
24 \config{\%it} & Track Title\\
25 \config{\%iC} & Comment\\
26 \config{\%iv} & ID3 version (1.0, 1.1, 2.2, 2.3, 2.4, or empty if not an ID3 tag)\\
27 \config{\%iy} & Year\\
28 \config{\%ik} & Disc Number\\
29 \end{tagmap}
30 Remember that this information is not always available, so use the
31 conditionals to show alternate information in preference to assuming.
33 These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}),
34 show the information for the next song to be played.
36 \nopt{lcd_charcell}{
37 \section{Viewports}
38 \begin{tagmap}
39 \nopt{lcd_non-mono}{%
40 \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}%
41 [height]{\textbar}[font]{\textbar}}
42 & See section \ref{ref:Viewports}\\}
44 \nopt{lcd_color}{\opt{lcd_non-mono}{%
45 \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}%
46 [height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}}
47 & See section \ref{ref:Viewports}\\}}
49 \opt{lcd_color}{%
50 \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}%
51 [height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}}
52 & See section \ref{ref:Viewports}\\}
54 \config{\%Vd'identifier'} & Display the `identifier' viewport. E.g.
55 \config{\%?C{\textless}\%Vda{\textbar}\%Vdb{\textgreater}}
56 will show viewport `a' if album art is found, and `b' if it isn't.\\
58 \config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}} &
59 Declare a Custom UI Viewport. The `\dots' parameters use the same logic as
60 the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\
62 \config{\%VI'label'} & Set the Info Viewport to use the viewport called
63 label, as declared with the previous tag.\\
64 \end{tagmap}
67 \section{Power Related Information}
68 \begin{tagmap}
69 \config{\%bl} & Numeric battery level in percents\\
70 & Can also be used in a conditional:
71 \config{\%?bl{\textless}-1{\textbar}0{\textbar}1{\textbar}%
72 2{\textbar}\ldots{\textbar}N{\textgreater}},
73 where the value $-1$ is used when the battery level isn't
74 known (it usually is)\\
75 \config{\%bv} & The battery level in volts\\
76 \config{\%bt} & Estimated battery time left\\
77 \config{\%bp} & ``p'' if the charger is connected (only on targets
78 that can charge batteries)\\
79 \config{\%bc} & ``c'' if the unit is currently charging the battery (only on
80 targets that have software charge control or monitoring)\\
81 \config{\%bs} & Remaining time of the sleep timer (if it is set)\\
82 \end{tagmap}
84 \section{Information about the file}
85 \begin{tagmap}
86 \config{\%fb} & File Bitrate (in kbps)\\
87 \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC''). %
88 This tag can also be used in a conditional tag, %
89 \config{\%?fc{\textless}mp1\-{\textbar}mp2\-{\textbar}mp3\-%
90 {\textbar}aiff\-{\textbar}wav\-{\textbar}ogg\-{\textbar}flac\-%
91 {\textbar}mpc\-{\textbar}a52\-{\textbar}wavpack\-{\textbar}alac\-%
92 {\textbar}aac\-{\textbar}shn\-{\textbar}sid\-{\textbar}adx\-%
93 {\textbar}nsf\-{\textbar}speex\-{\textbar}spc\-{\textbar}ape\-%
94 {\textbar}wma\-{\textbar}mod\-{\textbar}sap%
95 {\textbar}unknown{\textgreater}}.\\
96 & The codec order is as follows: MP1, MP2, MP3, AIFF, WAV,
97 Ogg Vorbis (OGG), FLAC, MPC, AC3, WavPack (WV), ALAC, AAC,
98 Shorten (SHN), SID, ADX, NSF, Speex, SPC, APE, WMA, MOD, SAP.\\
99 \config{\%ff} & File Frequency (in Hz)\\
100 \config{\%fk} & File Frequency (in kHz)\\
101 \config{\%fm} & File Name\\
102 \config{\%fn} & File Name (without extension)\\
103 \config{\%fp} & File Path\\
104 \config{\%fs} & File Size (in Kilobytes)\\
105 \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\
106 \config{\%d1} & First directory from the end of the file path\\
107 \config{\%d2} & Second directory from the end of the file path\\
108 \config{\%d3} & Third directory from the end of the file path\\
109 \end{tagmap}
110 Example for the \config{\%dN} commands: If the path is
111 ``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d1} is ``Isola'',
112 \config{\%d2} is ``Kent'' and \config{\%d3} is ``Rock''.
114 These tags, when written with the first letter capitalized (e.g. \config{\%Fn} or \config{\%D2}),
115 produce the information for the next file to be played.
117 \section{Playlist/Song Info}
118 \begin{tagmap}
119 \config{\%pb} & Progress Bar\\
120 \opt{player}{
121 & This will display a one character ``cup''
122 that empties as the time progresses.}
123 \opt{lcd_bitmap}{
124 & This will replace the entire line with a progress bar. \\
125 & You can set the position, width and height of the progressbar %
126 (in pixels) and load a custom image for it: %
127 \config{\%pb{\textbar}image.bmp{\textbar}x{\textbar}y{\textbar}width{\textbar}height{\textbar}}} \\
128 \opt{player}{%
129 \config{\%pf} & Full-line progress bar \& time display\\
131 \config{\%px} & Percentage Played In Song\\
132 \config{\%pc} & Current Time In Song\\
133 \config{\%pe} & Total Number of Playlist Entries\\
134 \nopt{player}{%
135 \config{\%pm} & Peak Meter. The entire line is used as %
136 volume peak meter.\\%
138 \config{\%pn} & Playlist Name (without path or extension)\\
139 \config{\%pp} & Playlist Position\\
140 \config{\%pr} & Remaining Time In Song\\
141 \config{\%ps} & ``s'' if shuffle mode is enabled\\
142 \config{\%pt} & Total Track Time\\
143 \config{\%pv} & Current volume (in dB). Can also be used in a conditional: \\
144 & \config{\%?pv{\textless}0{\textbar}1{\textbar}2{\textbar}\ldots%
145 {\textbar}N{\textgreater}}\\
146 & 0 is used for mute, the last option is used for values greater than zero.\\
147 \opt{lcd_bitmap}{& This can also be used like \%pb to provide a continuous scale:
148 \config{\%pv{\textbar}image.bmp{\textbar}x{\textbar}y{\textbar}width{\textbar}height{\textbar}}} \\
149 \config{\%pS} & Track is starting. An optional number gives how many seconds
150 the tag remains true for after the start of the track. The default is
151 10 seconds if no number is specified.\\
152 & \config{\%pS7{\textless}in the first 7 seconds of track{\textbar}in
153 the rest of the track{\textgreater}}\\
154 \config{\%pE} & Track is ending. An optional number gives how many seconds
155 before the end of the track the tag becomes true. The default is
156 10 seconds if no number is specified.\\
157 & \config{\%pE7{\textless}in the last 7 seconds of track{\textbar}in
158 the rest of the track{\textgreater}}\\
159 \config{\%Sp} & Current Playback Pitch\\
160 \end{tagmap}
162 \section{Runtime Database}
163 \begin{tagmap}
164 \config{\%rp} & Song playcount\\
165 \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag: %
166 \config{\%?rr{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}%
167 4{\textbar}5{\textbar}6{\textbar}7{\textbar}8{\textbar}9{\textbar}%
168 10{\textgreater}}\\
169 \config{\%ra} & Autoscore for the song\\
170 \end{tagmap}
172 \opt{swcodec}{
173 \section{Sound (DSP) settings}
174 \begin{tagmap}
175 \config{\%Sp} & Current playback pitch \\
176 \opt{swcodec}{
177 \config{\%xf} & Crossfade setting, in the order: Off, Auto Skip, Man Skip,
178 Shuffle, Shuffle and Man Skip, Always\\
179 \config{\%rg} & ReplayGain value in use (x.y~dB). If used as a conditional,
180 Replaygain type in use: \config{\%?rg{\textless}Off{\textbar}Track%
181 {\textbar}Album{\textbar}TrackShuffle{\textbar}AlbumShuffle%
182 {\textbar}No tag{\textgreater}}\\
184 \end{tagmap}
187 % this will not include the "remote hold switch" tag for targets lacking
188 % a main unit hold switch
189 \opt{hold_button}{
190 \opt{remote_button_hold}{
191 \section{Hold Switches}
192 \begin{tagmap}
193 \config{\%mh} & ``h'' if the main unit hold switch is on\\
194 \config{\%mr} & ``r'' if the remote hold switch is on\\
195 \end{tagmap}
197 \nopt{remote_button_hold}{
198 \section{Hold Switch}
199 \begin{tagmap}
200 \config{\%mh} & ``h'' if the hold switch is on\\
201 \end{tagmap}
205 \section{Virtual LED}
206 \begin{tagmap}
207 \config{\%lh} & ``h'' if the \disk\ is accessed\\
208 \end{tagmap}
210 \section{Repeat Mode}
211 \begin{tagmap}
212 \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B\\
213 \end{tagmap}
214 Example: \config{\%?mm{\textless}Off{\textbar}All{\textbar}One{\textbar}Shuffle%
215 {\textbar}A-B{\textgreater}}
217 \section{Playback Mode}
218 \begin{tagmap}
219 \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause,
220 Fast Forward, Rewind, Recording, Recording paused, FM Radio playing,
221 FM Radio muted\\
222 \end{tagmap}
223 Example: \config{\%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}%
224 Ffwd{\textbar}Rew{\textbar}Rec{\textbar}Rec pause{\textbar}FM{\textbar}%
225 FM pause{\textgreater}}
227 \section{Current Screen}
228 \begin{tagmap}
229 \config{\%cs} & The current screen, 1-5, in the order:
230 Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen\\
231 \end{tagmap}
232 The tag can also be used as the switch in a conditional tag. For players without
233 some capabilities (e.g. having no FM radio) some values will be never yielded.
235 Example: \config{You are in the \%?cs{\textless}Main menu{\textbar}WPS{\textbar}%
236 Recording screen{\textbar}FM Radio screen{\textgreater}}
238 \section{List Title (\fname{.sbs} only)}
239 \begin{tagmap}
240 \config{\%Lt} & Title text. Should be used in a conditional so that non-list
241 screens don't show a title when they shouldn't\\
242 \config{\%Li} & Title icon. This uses the same order as custom icons (see
243 \wikilink{CustomIcons} in the wiki) except that here \config{0} is ``no
244 icon''\\
245 \end{tagmap}
247 This tag can be used to give custom formatting to list titles.
248 Define a viewport with the font and formatting desired, and then use
249 \config{\%?Lt{\textless}\%Lt{\textgreater}} to display the title within the
250 viewport. If \config{\%Lt} is present anywhere in the \fname{.sbs}, then the
251 \config{\%Vi} viewport will not show the title.
253 \section{Changing Volume}
254 \begin{tagmap}
255 \config{\%mv[t]} & ``v'' if the volume is being changed\\
256 \end{tagmap}
258 The tag produces the letter ``v'' while the volume is being changed and some
259 amount of time after that, i.e. after the volume button has been released. The
260 optional parameter \config{t} specifies that amount of time, in seconds. If it
261 is not specified, 1 second is assumed.
263 The tag can be used as the switch in a conditional tag to display different things
264 depending on whether the volume is being changed. It can produce neat effects
265 when used with conditional viewports.
267 Example: \config{\%?mv2.5{\textless}Volume changing{\textbar}\%pv{\textgreater}}
269 The example above will display the text ``Volume changing'' if the volume is
270 being changed and 2.5 seconds after the volume button has been released. After
271 that, it will display the volume value.
273 \section{Settings}
274 \begin{tagmap}
275 \config{\%St{\textbar}<setting name>{\textbar}} & The value of the Rockbox
276 setting with the specified name. See \reference{ref:config_file_options}
277 for the list of the available settings.\\
278 \end{tagmap}
280 Examples:
281 \begin{enumerate}
282 \item As a simple tag: \config{\%St{\textbar}skip length{\textbar}}
283 \item As a conditional: \config{\%?St{\textbar}eq enabled{\textbar}{\textless}Eq is enabled{\textbar}Eq is disabled{\textgreater}}
284 \end{enumerate}
287 \opt{lcd_bitmap}{
288 \section{\label{ref:wps_images}Images}
289 \begin{tagmap}
290 \nopt{archos}{%
291 \config{\%X{\textbar}filename.bmp{\textbar}}
292 & Load and set a backdrop image for the WPS.
293 This image must be exactly the same size as your LCD.\\
295 \config{\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}}
296 & Load and display an image\\
297 & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\
298 & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\
299 & \config{x}: x coordinate\\
300 & \config{y}: y coordinate.\\
301 \config{\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}[nimages{\textbar}]}
302 & Preload an image for later display (useful for when your images are displayed conditionally)\\
303 & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\
304 & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\
305 & \config{x}: x coordinate\\
306 & \config{y}: y coordinate\\
307 & \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height)
308 contained in the bitmap. Default is 1.\\
309 \config{\%xdn[i]} & Display a preloaded image\\
310 & \config{n}: image ID (a-z and A-Z) as it was specified in \config{\%x} or \config{\%xl}\\
311 & \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52).
312 By default the first (i.e. top most) sub-image will be used.\\
313 \end{tagmap}
315 Examples:
316 \begin{enumerate}
317 \item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\
318 \config{\%x{\textbar}a{\textbar}bg.bmp{\textbar}37{\textbar}109{\textbar}}
319 \item Load a bitmap strip containing 5 volume icon images (all the same size)
320 with image ID ``M'', and then reference the individual sub-images in a conditional:\\
321 \config{\%xl{\textbar}M{\textbar}volume.bmp{\textbar}134{\textbar}153{\textbar}5{\textbar}}\\
322 \config{\%?pv<\%xdMa{\textbar}\%xdMb{\textbar}\%xdMc{\textbar}\%xdMd{\textbar}%
323 \%xdMe>}
324 \end{enumerate}
327 \note{
328 \begin{itemize}
329 \item The images must be in BMP format
330 \item The image tag must be on its own line
331 \item The ID is case sensitive, giving 52 different ID's
332 \item The size of the LCD screen for each player varies. See table below
333 for appropriate sizes of each device. The x and y coordinates must
334 repect each of the players' limits.
335 \end{itemize}
339 \opt{albumart}{
340 \section{\label{ref:album_art}Album Art}
341 Rockbox allows you to put the album art, or another image related to the music
342 on your \dap{} to display it in the PictureFlow plugin\opt{albumart}{ or in the
343 theme}. For this feature to work, there are a few requirements.
345 \subsection{Limitations}
347 Rockbox does not support album art embedded in your files' tags, and will
348 instead look for a picture located on disk. In addition to this, the
349 pictures must be in either BMP or JPEG format. Rockbox does not support
350 RLE-compressed BMP files, nor does it support progressive and multi-scan
351 JPEG files. JPEG files must consist of a single scan with interleaved components,
352 as progessive and multi-scan images require much more memory to decode.
354 \subsection{Where to put album art}
356 The pictures can be named a number of different ways, and placed to a number of
357 different locations. You can have pictures specific to the file or the album
358 or use a generic picture. You can place the picture in the same directory
359 as the file, in the parent directory or in a fixed directory named
360 \fname{/.rockbox/albumart/}. The order Rockbox uses when looking for a picture
361 is as follows (a list in braces means that those file extensions are tried in
362 that order):
364 \begin{enumerate}
365 \item \fname{./filename.\{jpeg,jpg,bmp\}}
366 \item \fname{./albumtitle.\{jpeg,jpg,bmp\}}
367 \item \fname{./cover.\{jpeg,jpg,bmp\}}
368 \item \fname{./folder.jpg}
369 \item \fname{/.rockbox/albumart/artist-albumtitle.\{jpeg,jpg,bmp\}}
370 \item \fname{../albumtitle.\{jpeg,jpg,bmp\}}
371 \item \fname{../cover.\{jpeg,jpg,bmp\}}
372 \end{enumerate}
374 The following characters will be replaced with an underscore (\_) when looking
375 for albumtitle.bmp or artist-albumtitle.bmp: \textbackslash{} / : \textless{}
376 \textgreater{} ? * \textbar{}. Doublequotes will be replaced by single quotes.
377 See \wikilink{AlbumArt} in the wiki for programs that will
378 help you automate the process of putting album art on your \dap{}.
380 \subsection{How to display the album art}
382 Once the album art files are present on your \dap, they can be displayed as
383 follows.
385 \begin{tagmap}
386 \config{\%Cl{\textbar}x{\textbar}y{\textbar}[[l{\textbar}c{\textbar}r]maxwidth]{\textbar}[[t{\textbar}c{\textbar}b]maxheight]{\textbar}}
387 & Define the settings for albumart\\
388 & \config{x}: x coordinate\\
389 & \config{y}: y coordinate\\
390 & \config{maxwidth}: Maximum height\\
391 & \config{maxheight}: Maximum width\\
392 \config{\%Cd} & Display the album art as configured. This tag can also be used as a conditional.\\
393 \end{tagmap}
395 The picture will be rescaled, preserving aspect ratio to fit the given
396 \config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the
397 configured values, the picture will be placed according to the flags to the
398 \config{maxwidth} and \config{maxheight} parameters:
399 \begin{itemize}
400 \item \config{maxwidth}:
401 \begin{description}
402 \item[\config{l}.] Align left
403 \item[\config{c}.] Align centre (default)
404 \item[\config{r}.] Align right
405 \end{description}
406 \item \config{maxheight}:
407 \begin{description}
408 \item[\config{t}.] Align top
409 \item[\config{c}.] Align centre (default)
410 \item[\config{b}.] Align bottom
411 \end{description}
412 \end{itemize}
414 Examples:
415 \begin{enumerate}
416 \item Load albumart at position 20,40 and display it without resizing:\\
417 \config{\%Cl{\textbar}20{\textbar}40{\textbar}{\textbar}{\textbar}}
418 \item Load albumart at position 0,20 and resize it to be at most 100$\times$100
419 pixels. If the image isn't square, align it to the bottom-right
420 corner:\\
421 \config{\%CL{\textbar}0{\textbar}20{\textbar}r100{\textbar}b100{\textbar}}
422 \end{enumerate}
425 \opt{radio}{
426 \section{FM Radio}
427 \begin{tagmap}
428 \config{\%tp} & Does this target have a radio? If it doesn't, the ``true''
429 branch of this conditional is completly ignored so you don't need to
430 worry about tags which are not recognized on non radio targets.\\
431 \config{\%tt} & Is the tuner tuned?\\
432 \config{\%tm} & Scan or preset mode? Scan is ``true'', preset is ``false''.\\
433 \config{\%ts} & Is the station in stereo?\\
434 \config{\%ta} & Minimum frequency (region specific) in MHz.\\
435 \config{\%tb} & Maximum frequency (region specific) in MHz.\\
436 \config{\%tf} & Current frequency in MHz.\\
437 \config{\%Ti} & Current preset id, i.e. 1-based number of the preset
438 within the presets list (usable in playlist viewer).\\
439 \config{\%Tn} & Current preset name (usable in playlist viewer).\\
440 \config{\%Tf} & Current preset frequency (usable in playlist viewer).\\
441 \config{\%Tc} & Preset count, i.e. the number of stations in the current
442 preset list.\\
443 \config{\%tx} & Is RDS available?\\
444 \config{\%ty} & RDS name.\\
445 \config{\%tz} & RDS text.\\
446 \end{tagmap}
448 It is also possible to show ``Radio Art'' which can be used to display images
449 associated with presets. The tags are exactly the same as for album art,
450 described above. Images need to be placed in \fname{/.rockbox/fmpresets/},
451 and must have the same name as the preset. They need to be in either
452 \fname{.bmp} or \fname{.jpg} format, and the radio must be in preset mode
453 and tuned to a preset (and not recording) in order for them to be shown.
456 \section{Alignment}
457 \begin{tagmap}
458 \config{\%al} & Align the text left\\
459 \config{\%aL} & Align the text left, or to the right if RTL language is in use\\
460 \config{\%ac} & Centre the text\\
461 \config{\%ar} & Align the text right\\
462 \config{\%aR} & Align the text right, or to the left if RTL language is in use\\
463 \end{tagmap}
464 All alignment tags may be present in one line, but they need to be in the
465 order left -- centre -- right. If the aligned texts overlap, they are merged.
467 \section{Conditional Tags}
469 \begin{tagmap}
470 \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
471 & If / Else: Evaluate for true or false case \\
472 \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
473 & Enumerations: Evaluate for first / second / third / \dots / last condition \\
474 \end{tagmap}
476 \section{Subline Tags}
478 \begin{tagmap}
479 \config{\%t{\textless}time{\textgreater}}
480 & Set the subline display cycle time (\%t5 or \%t3.4 formats) \\
481 \config{;}
482 & Split items on a line into separate sublines \\
483 \end{tagmap}
485 Allows grouping of several items (sublines) onto one line, with the
486 display cycling round the defined sublines. See
487 \reference{ref:AlternatingSublines} for details.
490 \section{Time and Date}
491 \begin{tagmap}
492 \opt{rtc}{
493 \config{\%cd} & Day of month from 01 to 31\\
494 \config{\%ce} & Zero padded day of month from 1 to 31\\
495 \config{\%cf} & A conditional for 12/24 hour format. \%?cf{\textless}24 hour stuff{\textbar}12 hour stuff{\textgreater}\\
496 \config{\%cH} & Zero padded hour from 00 to 23 (24 hour format)\\
497 \config{\%ck} & Hour from 0 to 23 (24 hour format)\\
498 \config{\%cI} & Zero padded hour from 01 to 12 (am/pm format)\\
499 \config{\%cl} & Hour from 1 to 12 (am/pm format)\\
500 \config{\%cm} & Month from 01 to 12\\
501 \config{\%cM} & Minutes\\
502 \config{\%cS} & Seconds\\
503 \config{\%cy} & 2-digit year\\
504 \config{\%cY} & 4-digit year\\
505 \config{\%cP} & Capital AM/PM\\
506 \config{\%cp} & Lowercase am/pm\\
507 \config{\%ca} & Weekday name\\
508 \config{\%cb} & Month name\\
509 \config{\%cu} & Day of week from 1 to 7, 1 is Monday\\
510 \config{\%cw} & Day of week from 0 to 6, 0 is Sunday\\
512 \config{\%cc} & Check for presence of the clock hardware\\
513 \end{tagmap}
514 The \%cc tag returns ``c'' if the necessary hardware is present and can also be
515 used as a conditional. This can be very useful for designing a WPS that works on
516 multiple targets, some with and some without a clock. By using this tag as a
517 conditional it is possible to display current date and time on those targets that
518 support this
519 \opt{rtc}{ (like the \playertype)},
520 or alternate information on those that do not
521 \nopt{rtc}{ (like the \playertype)}%
524 Example:
525 \config{\%?cc{\textless}\%cH:\%cM{\textbar}No clock detected{\textgreater}}
527 \section{Text Translation}
528 \begin{tagmap}
529 \config{\%Sx{\textbar}{\textless}English{\textgreater}{\textbar}}
530 & Display the translation of ``English'' in the current language\\
531 \end{tagmap}
533 \begin{itemize}
534 \item ``English'' must be a phrase used in the language file.
535 \item It should match the \config{Source:} line in the language file.
536 \end{itemize}
538 \note{checkwps cannot verify that the string is correct, so please check on
539 either the simulator or on target.}
542 \opt{touchscreen}{
543 \section{Touchscreen Areas (WPS only)}
544 \begin{tagmap}
545 \config{\%T{\textbar}x{\textbar}y{\textbar}width{\textbar}height%
546 {\textbar}action{\textbar}}
547 & Invoke the action specified when the user presses in the defined
548 touchscreen area.\\
549 \end{tagmap}
550 If the action starts with \& then the area must be held. Possible actions are:
552 \begin{description}
553 \item[play] -- Play/pause playback.
554 \item[stop] -- Stop playback and exit the WPS.
555 \item[prev] -- Previous track.
556 \item[next] -- Next track.
557 \item[ffwd] -- Seek forwards in the track.
558 \item[rwd] -- Seek backwards in the track.
559 \item[menu] -- Go to the main menu.
560 \item[browse] -- Go back to the file browser or database.
561 \item[shuffle] -- Toggle shuffle mode.
562 \item[repmode] -- Cycle through the repeat modes.
563 \item[quickscreen] -- Go to the quickscreen.
564 \item[contextmenu] -- Open the context menu.
565 \item[playlist] -- Go to the playlist viewer.
566 \item[progressbar] -- Seek to the appropriate position in the track based on the touch.
567 \item[volume] -- Set the volume to the appropriate level based on the touch.
568 \item[pitch] -- Open the pitchscreen.
569 \item[voldown] -- Decrease the volume by one step.
570 \item[volup] -- Increase the volume by one step.
571 \end{description}
573 \section{Last Touchscreen Press (WPS only)}
574 \begin{tagmap}
575 \config{\%Tl} & Indicates that the touchscreen is pressed.\\
576 \end{tagmap}
577 This tag can be used to display text or images or a viewport when the
578 touchscreen is pressed (like an On Screen Display). If you put a number
579 straight after \%Tl it will be used as a timeout in seconds
580 (e.g \%Tl2.5 will give a 2.5 second timeout) between the touchscreen press
581 being released and the tag going false. If no number is specified it will
582 use a 1 second timeout. It can also be used as a conditional, and can be
583 used with conditional viewports.
586 \section{Other Tags}
587 \begin{tagmap}
588 \config{\%\%} & The character `\%'\\
589 \config{\%{\textless}} & The character `{\textless}'\\
590 \config{\%{\textbar}} & The character `{\textbar}'\\
591 \config{\%{\textgreater}} & The character `{\textgreater}'\\
592 \config{\%;} & The character `;'\\
593 \config{\%s} & Indicate that the line should scroll. Can occur
594 anywhere in a line (given that the text is
595 displayed; see conditionals above). You can specify
596 up to ten scrolling lines. Scrolling lines can not
597 contain dynamic content such as timers, peak meters
598 or progress bars.\\
599 \end{tagmap}