diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.h')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.h | 238 |
1 files changed, 3 insertions, 235 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.h b/apps/gui/skin_engine/skin_tokens.h index 47311312db..d259fe431c 100644 --- a/apps/gui/skin_engine/skin_tokens.h +++ b/apps/gui/skin_engine/skin_tokens.h | |||
@@ -23,243 +23,11 @@ | |||
23 | #define _SKIN_TOKENS_H_ | 23 | #define _SKIN_TOKENS_H_ |
24 | 24 | ||
25 | #include <stdbool.h> | 25 | #include <stdbool.h> |
26 | 26 | #include "tag_table.h" | |
27 | |||
28 | enum wps_token_type { | ||
29 | |||
30 | TOKEN_MARKER_CONTROL_TOKENS = -1, | ||
31 | WPS_NO_TOKEN = 0, /* for WPS tags we don't want to save as tokens */ | ||
32 | WPS_TOKEN_UNKNOWN, | ||
33 | |||
34 | /* Markers */ | ||
35 | WPS_TOKEN_CHARACTER, | ||
36 | WPS_TOKEN_STRING, | ||
37 | WPS_TOKEN_TRANSLATEDSTRING, | ||
38 | |||
39 | /* Alignment */ | ||
40 | WPS_TOKEN_ALIGN_LEFT, | ||
41 | WPS_TOKEN_ALIGN_LEFT_RTL, | ||
42 | WPS_TOKEN_ALIGN_CENTER, | ||
43 | WPS_TOKEN_ALIGN_RIGHT, | ||
44 | WPS_TOKEN_ALIGN_RIGHT_RTL, | ||
45 | |||
46 | /* Sublines */ | ||
47 | WPS_TOKEN_SUBLINE_TIMEOUT, | ||
48 | |||
49 | /* Conditional */ | ||
50 | WPS_TOKEN_CONDITIONAL, | ||
51 | WPS_TOKEN_CONDITIONAL_START, | ||
52 | WPS_TOKEN_CONDITIONAL_OPTION, | ||
53 | WPS_TOKEN_CONDITIONAL_END, | ||
54 | |||
55 | /* Viewport display */ | ||
56 | WPS_VIEWPORT_ENABLE, | ||
57 | WPS_VIEWPORT_CUSTOMLIST, | ||
58 | WPS_TOKEN_UIVIEWPORT_ENABLE, | ||
59 | WPS_TOKEN_VIEWPORT_FGCOLOUR, | ||
60 | WPS_TOKEN_VIEWPORT_BGCOLOUR, | ||
61 | |||
62 | /* Battery */ | ||
63 | TOKEN_MARKER_BATTERY, | ||
64 | WPS_TOKEN_BATTERY_PERCENT, | ||
65 | WPS_TOKEN_BATTERY_PERCENTBAR, | ||
66 | WPS_TOKEN_BATTERY_VOLTS, | ||
67 | WPS_TOKEN_BATTERY_TIME, | ||
68 | WPS_TOKEN_BATTERY_CHARGER_CONNECTED, | ||
69 | WPS_TOKEN_BATTERY_CHARGING, | ||
70 | WPS_TOKEN_BATTERY_SLEEPTIME, | ||
71 | WPS_TOKEN_USB_POWERED, | ||
72 | |||
73 | /* Sound */ | ||
74 | TOKEN_MARKER_SOUND, | ||
75 | #if (CONFIG_CODEC != MAS3507D) | ||
76 | WPS_TOKEN_SOUND_PITCH, | ||
77 | #endif | ||
78 | #if (CONFIG_CODEC == SWCODEC) | ||
79 | WPS_TOKEN_SOUND_SPEED, | ||
80 | WPS_TOKEN_REPLAYGAIN, | ||
81 | WPS_TOKEN_CROSSFADE, | ||
82 | #endif | ||
83 | |||
84 | /* Time */ | ||
85 | TOKEN_MARKER_RTC, | ||
86 | WPS_TOKEN_RTC_PRESENT, | ||
87 | |||
88 | /* The begin/end values allow us to know if a token is an RTC one. | ||
89 | New RTC tokens should be added between the markers. */ | ||
90 | |||
91 | WPS_TOKENS_RTC_BEGIN, /* just the start marker, not an actual token */ | ||
92 | |||
93 | WPS_TOKEN_RTC_DAY_OF_MONTH, | ||
94 | WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED, | ||
95 | WPS_TOKEN_RTC_12HOUR_CFG, | ||
96 | WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED, | ||
97 | WPS_TOKEN_RTC_HOUR_24, | ||
98 | WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED, | ||
99 | WPS_TOKEN_RTC_HOUR_12, | ||
100 | WPS_TOKEN_RTC_MONTH, | ||
101 | WPS_TOKEN_RTC_MINUTE, | ||
102 | WPS_TOKEN_RTC_SECOND, | ||
103 | WPS_TOKEN_RTC_YEAR_2_DIGITS, | ||
104 | WPS_TOKEN_RTC_YEAR_4_DIGITS, | ||
105 | WPS_TOKEN_RTC_AM_PM_UPPER, | ||
106 | WPS_TOKEN_RTC_AM_PM_LOWER, | ||
107 | WPS_TOKEN_RTC_WEEKDAY_NAME, | ||
108 | WPS_TOKEN_RTC_MONTH_NAME, | ||
109 | WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON, | ||
110 | WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN, | ||
111 | |||
112 | WPS_TOKENS_RTC_END, /* just the end marker, not an actual token */ | ||
113 | |||
114 | /* Database */ | ||
115 | TOKEN_MARKER_DATABASE, | ||
116 | #ifdef HAVE_TAGCACHE | ||
117 | WPS_TOKEN_DATABASE_PLAYCOUNT, | ||
118 | WPS_TOKEN_DATABASE_RATING, | ||
119 | WPS_TOKEN_DATABASE_AUTOSCORE, | ||
120 | #endif | ||
121 | |||
122 | /* File */ | ||
123 | TOKEN_MARKER_FILE, | ||
124 | WPS_TOKEN_FILE_BITRATE, | ||
125 | WPS_TOKEN_FILE_CODEC, | ||
126 | WPS_TOKEN_FILE_FREQUENCY, | ||
127 | WPS_TOKEN_FILE_FREQUENCY_KHZ, | ||
128 | WPS_TOKEN_FILE_NAME, | ||
129 | WPS_TOKEN_FILE_NAME_WITH_EXTENSION, | ||
130 | WPS_TOKEN_FILE_PATH, | ||
131 | WPS_TOKEN_FILE_SIZE, | ||
132 | WPS_TOKEN_FILE_VBR, | ||
133 | WPS_TOKEN_FILE_DIRECTORY, | ||
134 | |||
135 | /* Image */ | ||
136 | TOKEN_MARKER_IMAGES, | ||
137 | #ifdef HAVE_LCD_BITMAP | ||
138 | WPS_TOKEN_IMAGE_BACKDROP, | ||
139 | WPS_TOKEN_IMAGE_PROGRESS_BAR, | ||
140 | WPS_TOKEN_IMAGE_PRELOAD, | ||
141 | WPS_TOKEN_IMAGE_PRELOAD_DISPLAY, | ||
142 | WPS_TOKEN_IMAGE_DISPLAY, | ||
143 | #endif | ||
144 | |||
145 | #ifdef HAVE_ALBUMART | ||
146 | /* Albumart */ | ||
147 | WPS_TOKEN_ALBUMART_DISPLAY, | ||
148 | WPS_TOKEN_ALBUMART_FOUND, | ||
149 | #endif | ||
150 | |||
151 | /* Metadata */ | ||
152 | TOKEN_MARKER_METADATA, | ||
153 | WPS_TOKEN_METADATA_ARTIST, | ||
154 | WPS_TOKEN_METADATA_COMPOSER, | ||
155 | WPS_TOKEN_METADATA_ALBUM_ARTIST, | ||
156 | WPS_TOKEN_METADATA_GROUPING, | ||
157 | WPS_TOKEN_METADATA_ALBUM, | ||
158 | WPS_TOKEN_METADATA_GENRE, | ||
159 | WPS_TOKEN_METADATA_DISC_NUMBER, | ||
160 | WPS_TOKEN_METADATA_TRACK_NUMBER, | ||
161 | WPS_TOKEN_METADATA_TRACK_TITLE, | ||
162 | WPS_TOKEN_METADATA_VERSION, | ||
163 | WPS_TOKEN_METADATA_YEAR, | ||
164 | WPS_TOKEN_METADATA_COMMENT, | ||
165 | |||
166 | TOKEN_MARKER_PLAYBACK_INFO, | ||
167 | /* Mode */ | ||
168 | WPS_TOKEN_REPEAT_MODE, | ||
169 | WPS_TOKEN_PLAYBACK_STATUS, | ||
170 | /* Progressbar */ | ||
171 | WPS_TOKEN_PROGRESSBAR, | ||
172 | #ifdef HAVE_LCD_CHARCELLS | ||
173 | WPS_TOKEN_PLAYER_PROGRESSBAR, | ||
174 | #endif | ||
175 | #ifdef HAVE_LCD_BITMAP | ||
176 | /* Peakmeter */ | ||
177 | WPS_TOKEN_PEAKMETER, | ||
178 | #endif | ||
179 | |||
180 | /* Current track */ | ||
181 | WPS_TOKEN_TRACK_ELAPSED_PERCENT, | ||
182 | WPS_TOKEN_TRACK_TIME_ELAPSED, | ||
183 | WPS_TOKEN_TRACK_TIME_REMAINING, | ||
184 | WPS_TOKEN_TRACK_LENGTH, | ||
185 | WPS_TOKEN_TRACK_STARTING, | ||
186 | WPS_TOKEN_TRACK_ENDING, | ||
187 | |||
188 | /* Playlist */ | ||
189 | TOKEN_MARKER_PLAYLIST, | ||
190 | WPS_TOKEN_PLAYLIST_ENTRIES, | ||
191 | WPS_TOKEN_PLAYLIST_NAME, | ||
192 | WPS_TOKEN_PLAYLIST_POSITION, | ||
193 | WPS_TOKEN_PLAYLIST_SHUFFLE, | ||
194 | |||
195 | |||
196 | /* buttons */ | ||
197 | TOKEN_MARKER_MISC, | ||
198 | WPS_TOKEN_DRAW_INBUILTBAR, | ||
199 | WPS_TOKEN_LIST_TITLE_TEXT, | ||
200 | WPS_TOKEN_LIST_TITLE_ICON, | ||
201 | WPS_TOKEN_BUTTON_VOLUME, | ||
202 | WPS_TOKEN_LASTTOUCH, | ||
203 | #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) | ||
204 | /* Virtual LED */ | ||
205 | WPS_TOKEN_VLED_HDD, | ||
206 | #endif | ||
207 | /* Volume level */ | ||
208 | WPS_TOKEN_VOLUME, | ||
209 | WPS_TOKEN_VOLUMEBAR, | ||
210 | /* hold */ | ||
211 | WPS_TOKEN_MAIN_HOLD, | ||
212 | #ifdef HAS_REMOTE_BUTTON_HOLD | ||
213 | WPS_TOKEN_REMOTE_HOLD, | ||
214 | #endif | ||
215 | |||
216 | /* Setting option */ | ||
217 | WPS_TOKEN_SETTING, | ||
218 | WPS_TOKEN_CURRENT_SCREEN, | ||
219 | WPS_TOKEN_LANG_IS_RTL, | ||
220 | |||
221 | /* Recording Tokens */ | ||
222 | TOKEN_MARKER_RECORDING, | ||
223 | WPS_TOKEN_HAVE_RECORDING, | ||
224 | WPS_TOKEN_IS_RECORDING, | ||
225 | WPS_TOKEN_REC_FREQ, | ||
226 | WPS_TOKEN_REC_ENCODER, | ||
227 | WPS_TOKEN_REC_BITRATE, /* SWCODEC: MP3 bitrate, HWCODEC: MP3 "quality" */ | ||
228 | WPS_TOKEN_REC_MONO, | ||
229 | WPS_TOKEN_REC_SECONDS, | ||
230 | WPS_TOKEN_REC_MINUTES, | ||
231 | WPS_TOKEN_REC_HOURS, | ||
232 | |||
233 | |||
234 | /* Radio Tokens */ | ||
235 | TOKEN_MARKER_TUNER, | ||
236 | WPS_TOKEN_HAVE_TUNER, | ||
237 | #if CONFIG_TUNER | ||
238 | WPS_TOKEN_TUNER_TUNED, | ||
239 | WPS_TOKEN_TUNER_SCANMODE, | ||
240 | WPS_TOKEN_TUNER_STEREO, | ||
241 | WPS_TOKEN_TUNER_MINFREQ, /* changes based on "region" */ | ||
242 | WPS_TOKEN_TUNER_MAXFREQ, /* changes based on "region" */ | ||
243 | WPS_TOKEN_TUNER_CURFREQ, | ||
244 | WPS_TOKEN_PRESET_ID, /* "id" of this preset.. really the array element number */ | ||
245 | WPS_TOKEN_PRESET_NAME, | ||
246 | WPS_TOKEN_PRESET_FREQ, | ||
247 | WPS_TOKEN_PRESET_COUNT, | ||
248 | /* RDS tokens */ | ||
249 | WPS_TOKEN_HAVE_RDS, | ||
250 | #ifdef HAVE_RDS_CAP | ||
251 | WPS_TOKEN_RDS_NAME, | ||
252 | WPS_TOKEN_RDS_TEXT, | ||
253 | #endif | ||
254 | #endif /* CONFIG_TUNER */ | ||
255 | |||
256 | |||
257 | TOKEN_MARKER_END, /* this needs to be the last value in this enum */ | ||
258 | }; | ||
259 | 27 | ||
260 | struct wps_token { | 28 | struct wps_token { |
261 | unsigned char type; /* enough to store the token type */ | 29 | enum skin_token_type type; /* enough to store the token type */ |
262 | 30 | ||
263 | /* Whether the tag (e.g. track name or the album) refers the | 31 | /* Whether the tag (e.g. track name or the album) refers the |
264 | current or the next song (false=current, true=next) */ | 32 | current or the next song (false=current, true=next) */ |
265 | bool next; | 33 | bool next; |