new skin token: %cx - 24 hour time format enabled in the setting.. e.g %?cx<24 hour...
[kugel-rb.git] / apps / gui / skin_engine / skin_tokens.h
blob5f35afc2743b3a7154dce14f905190e642a5dd98
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: wps_internals.h 22223 2009-08-09 17:30:05Z jdgordon $
10 * Copyright (C) 2007 Nicolas Pennequin
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _SKIN_TOKENS_H_
23 #define _SKIN_TOKENS_H_
25 #include <stdbool.h>
28 enum wps_token_type {
29 WPS_NO_TOKEN, /* for WPS tags we don't want to save as tokens */
30 WPS_TOKEN_UNKNOWN,
32 /* Markers */
33 WPS_TOKEN_CHARACTER,
34 WPS_TOKEN_STRING,
35 WPS_TOKEN_TRANSLATEDSTRING,
37 /* Alignment */
38 WPS_TOKEN_ALIGN_LEFT,
39 WPS_TOKEN_ALIGN_CENTER,
40 WPS_TOKEN_ALIGN_RIGHT,
42 /* Sublines */
43 WPS_TOKEN_SUBLINE_TIMEOUT,
45 /* Battery */
46 WPS_TOKEN_BATTERY_PERCENT,
47 WPS_TOKEN_BATTERY_VOLTS,
48 WPS_TOKEN_BATTERY_TIME,
49 WPS_TOKEN_BATTERY_CHARGER_CONNECTED,
50 WPS_TOKEN_BATTERY_CHARGING,
51 WPS_TOKEN_BATTERY_SLEEPTIME,
53 /* Sound */
54 #if (CONFIG_CODEC != MAS3507D)
55 WPS_TOKEN_SOUND_PITCH,
56 #endif
57 #if (CONFIG_CODEC == SWCODEC)
58 WPS_TOKEN_REPLAYGAIN,
59 WPS_TOKEN_CROSSFADE,
60 #endif
62 /* Time */
64 WPS_TOKEN_RTC_PRESENT,
65 WPS_TOKEN_RTC_24HR_SETTING_MODE,
67 /* The begin/end values allow us to know if a token is an RTC one.
68 New RTC tokens should be added between the markers. */
70 WPS_TOKENS_RTC_BEGIN, /* just the start marker, not an actual token */
72 WPS_TOKEN_RTC_DAY_OF_MONTH,
73 WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED,
74 WPS_TOKEN_RTC_12HOUR_CFG,
75 WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED,
76 WPS_TOKEN_RTC_HOUR_24,
77 WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED,
78 WPS_TOKEN_RTC_HOUR_12,
79 WPS_TOKEN_RTC_MONTH,
80 WPS_TOKEN_RTC_MINUTE,
81 WPS_TOKEN_RTC_SECOND,
82 WPS_TOKEN_RTC_YEAR_2_DIGITS,
83 WPS_TOKEN_RTC_YEAR_4_DIGITS,
84 WPS_TOKEN_RTC_AM_PM_UPPER,
85 WPS_TOKEN_RTC_AM_PM_LOWER,
86 WPS_TOKEN_RTC_WEEKDAY_NAME,
87 WPS_TOKEN_RTC_MONTH_NAME,
88 WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON,
89 WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN,
91 WPS_TOKENS_RTC_END, /* just the end marker, not an actual token */
93 /* Conditional */
94 WPS_TOKEN_CONDITIONAL,
95 WPS_TOKEN_CONDITIONAL_START,
96 WPS_TOKEN_CONDITIONAL_OPTION,
97 WPS_TOKEN_CONDITIONAL_END,
99 /* Database */
100 #ifdef HAVE_TAGCACHE
101 WPS_TOKEN_DATABASE_PLAYCOUNT,
102 WPS_TOKEN_DATABASE_RATING,
103 WPS_TOKEN_DATABASE_AUTOSCORE,
104 #endif
106 /* File */
107 WPS_TOKEN_FILE_BITRATE,
108 WPS_TOKEN_FILE_CODEC,
109 WPS_TOKEN_FILE_FREQUENCY,
110 WPS_TOKEN_FILE_FREQUENCY_KHZ,
111 WPS_TOKEN_FILE_NAME,
112 WPS_TOKEN_FILE_NAME_WITH_EXTENSION,
113 WPS_TOKEN_FILE_PATH,
114 WPS_TOKEN_FILE_SIZE,
115 WPS_TOKEN_FILE_VBR,
116 WPS_TOKEN_FILE_DIRECTORY,
118 #ifdef HAVE_LCD_BITMAP
119 /* Image */
120 WPS_TOKEN_IMAGE_BACKDROP,
121 WPS_TOKEN_IMAGE_PROGRESS_BAR,
122 WPS_TOKEN_IMAGE_PRELOAD,
123 WPS_TOKEN_IMAGE_PRELOAD_DISPLAY,
124 WPS_TOKEN_IMAGE_DISPLAY,
125 #endif
127 #ifdef HAVE_ALBUMART
128 /* Albumart */
129 WPS_TOKEN_ALBUMART_DISPLAY,
130 WPS_TOKEN_ALBUMART_FOUND,
131 #endif
133 /* Metadata */
134 WPS_TOKEN_METADATA_ARTIST,
135 WPS_TOKEN_METADATA_COMPOSER,
136 WPS_TOKEN_METADATA_ALBUM_ARTIST,
137 WPS_TOKEN_METADATA_GROUPING,
138 WPS_TOKEN_METADATA_ALBUM,
139 WPS_TOKEN_METADATA_GENRE,
140 WPS_TOKEN_METADATA_DISC_NUMBER,
141 WPS_TOKEN_METADATA_TRACK_NUMBER,
142 WPS_TOKEN_METADATA_TRACK_TITLE,
143 WPS_TOKEN_METADATA_VERSION,
144 WPS_TOKEN_METADATA_YEAR,
145 WPS_TOKEN_METADATA_COMMENT,
147 /* Mode */
148 WPS_TOKEN_REPEAT_MODE,
149 WPS_TOKEN_PLAYBACK_STATUS,
151 WPS_TOKEN_MAIN_HOLD,
153 #ifdef HAS_REMOTE_BUTTON_HOLD
154 WPS_TOKEN_REMOTE_HOLD,
155 #endif
157 /* Progressbar */
158 WPS_TOKEN_PROGRESSBAR,
159 #ifdef HAVE_LCD_CHARCELLS
160 WPS_TOKEN_PLAYER_PROGRESSBAR,
161 #endif
163 #ifdef HAVE_LCD_BITMAP
164 /* Peakmeter */
165 WPS_TOKEN_PEAKMETER,
166 #endif
168 /* Volume level */
169 WPS_TOKEN_VOLUME,
171 /* Current track */
172 WPS_TOKEN_TRACK_ELAPSED_PERCENT,
173 WPS_TOKEN_TRACK_TIME_ELAPSED,
174 WPS_TOKEN_TRACK_TIME_REMAINING,
175 WPS_TOKEN_TRACK_LENGTH,
177 /* Playlist */
178 WPS_TOKEN_PLAYLIST_ENTRIES,
179 WPS_TOKEN_PLAYLIST_NAME,
180 WPS_TOKEN_PLAYLIST_POSITION,
181 WPS_TOKEN_PLAYLIST_SHUFFLE,
182 #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
183 /* Virtual LED */
184 WPS_TOKEN_VLED_HDD,
185 #endif
187 /* Viewport display */
188 WPS_VIEWPORT_ENABLE,
190 /* buttons */
191 WPS_TOKEN_BUTTON_VOLUME,
192 WPS_TOKEN_LASTTOUCH,
194 /* Setting option */
195 WPS_TOKEN_SETTING,
196 WPS_TOKEN_CURRENT_SCREEN,
199 struct wps_token {
200 unsigned char type; /* enough to store the token type */
202 /* Whether the tag (e.g. track name or the album) refers the
203 current or the next song (false=current, true=next) */
204 bool next;
206 union {
207 char c;
208 unsigned short i;
209 void* data;
210 } value;
213 struct skin_token_list {
214 struct wps_token *token;
215 struct skin_token_list *next;
219 #endif