Set svn:keywords property on .c and .h files that didn't already have it. Correct...
[kugel-rb.git] / apps / gui / skin_engine / skin_tokens.h
blob547bc858f996bfd08c9ed3fce5b5542d821f3c38
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 {
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,
34 /* Markers */
35 WPS_TOKEN_CHARACTER,
36 WPS_TOKEN_STRING,
37 WPS_TOKEN_TRANSLATEDSTRING,
39 /* Alignment */
40 WPS_TOKEN_ALIGN_LEFT,
41 WPS_TOKEN_ALIGN_CENTER,
42 WPS_TOKEN_ALIGN_RIGHT,
44 /* Sublines */
45 WPS_TOKEN_SUBLINE_TIMEOUT,
47 /* Conditional */
48 WPS_TOKEN_CONDITIONAL,
49 WPS_TOKEN_CONDITIONAL_START,
50 WPS_TOKEN_CONDITIONAL_OPTION,
51 WPS_TOKEN_CONDITIONAL_END,
53 /* Viewport display */
54 WPS_VIEWPORT_ENABLE,
56 /* Battery */
57 TOKEN_MARKER_BATTERY,
58 WPS_TOKEN_BATTERY_PERCENT,
59 WPS_TOKEN_BATTERY_VOLTS,
60 WPS_TOKEN_BATTERY_TIME,
61 WPS_TOKEN_BATTERY_CHARGER_CONNECTED,
62 WPS_TOKEN_BATTERY_CHARGING,
63 WPS_TOKEN_BATTERY_SLEEPTIME,
64 WPS_TOKEN_USB_POWERED,
66 /* Sound */
67 TOKEN_MARKER_SOUND,
68 #if (CONFIG_CODEC != MAS3507D)
69 WPS_TOKEN_SOUND_PITCH,
70 #endif
71 #if (CONFIG_CODEC == SWCODEC)
72 WPS_TOKEN_SOUND_SPEED,
73 WPS_TOKEN_REPLAYGAIN,
74 WPS_TOKEN_CROSSFADE,
75 #endif
77 /* Time */
78 TOKEN_MARKER_RTC,
79 WPS_TOKEN_RTC_PRESENT,
81 /* The begin/end values allow us to know if a token is an RTC one.
82 New RTC tokens should be added between the markers. */
84 WPS_TOKENS_RTC_BEGIN, /* just the start marker, not an actual token */
86 WPS_TOKEN_RTC_DAY_OF_MONTH,
87 WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED,
88 WPS_TOKEN_RTC_12HOUR_CFG,
89 WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED,
90 WPS_TOKEN_RTC_HOUR_24,
91 WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED,
92 WPS_TOKEN_RTC_HOUR_12,
93 WPS_TOKEN_RTC_MONTH,
94 WPS_TOKEN_RTC_MINUTE,
95 WPS_TOKEN_RTC_SECOND,
96 WPS_TOKEN_RTC_YEAR_2_DIGITS,
97 WPS_TOKEN_RTC_YEAR_4_DIGITS,
98 WPS_TOKEN_RTC_AM_PM_UPPER,
99 WPS_TOKEN_RTC_AM_PM_LOWER,
100 WPS_TOKEN_RTC_WEEKDAY_NAME,
101 WPS_TOKEN_RTC_MONTH_NAME,
102 WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON,
103 WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN,
105 WPS_TOKENS_RTC_END, /* just the end marker, not an actual token */
107 /* Database */
108 TOKEN_MARKER_DATABASE,
109 #ifdef HAVE_TAGCACHE
110 WPS_TOKEN_DATABASE_PLAYCOUNT,
111 WPS_TOKEN_DATABASE_RATING,
112 WPS_TOKEN_DATABASE_AUTOSCORE,
113 #endif
115 /* File */
116 TOKEN_MARKER_FILE,
117 WPS_TOKEN_FILE_BITRATE,
118 WPS_TOKEN_FILE_CODEC,
119 WPS_TOKEN_FILE_FREQUENCY,
120 WPS_TOKEN_FILE_FREQUENCY_KHZ,
121 WPS_TOKEN_FILE_NAME,
122 WPS_TOKEN_FILE_NAME_WITH_EXTENSION,
123 WPS_TOKEN_FILE_PATH,
124 WPS_TOKEN_FILE_SIZE,
125 WPS_TOKEN_FILE_VBR,
126 WPS_TOKEN_FILE_DIRECTORY,
128 /* Image */
129 TOKEN_MARKER_IMAGES,
130 #ifdef HAVE_LCD_BITMAP
131 WPS_TOKEN_IMAGE_BACKDROP,
132 WPS_TOKEN_IMAGE_PROGRESS_BAR,
133 WPS_TOKEN_IMAGE_PRELOAD,
134 WPS_TOKEN_IMAGE_PRELOAD_DISPLAY,
135 WPS_TOKEN_IMAGE_DISPLAY,
136 #endif
138 #ifdef HAVE_ALBUMART
139 /* Albumart */
140 WPS_TOKEN_ALBUMART_DISPLAY,
141 WPS_TOKEN_ALBUMART_FOUND,
142 #endif
144 /* Metadata */
145 TOKEN_MARKER_METADATA,
146 WPS_TOKEN_METADATA_ARTIST,
147 WPS_TOKEN_METADATA_COMPOSER,
148 WPS_TOKEN_METADATA_ALBUM_ARTIST,
149 WPS_TOKEN_METADATA_GROUPING,
150 WPS_TOKEN_METADATA_ALBUM,
151 WPS_TOKEN_METADATA_GENRE,
152 WPS_TOKEN_METADATA_DISC_NUMBER,
153 WPS_TOKEN_METADATA_TRACK_NUMBER,
154 WPS_TOKEN_METADATA_TRACK_TITLE,
155 WPS_TOKEN_METADATA_VERSION,
156 WPS_TOKEN_METADATA_YEAR,
157 WPS_TOKEN_METADATA_COMMENT,
159 TOKEN_MARKER_PLAYBACK_INFO,
160 /* Mode */
161 WPS_TOKEN_REPEAT_MODE,
162 WPS_TOKEN_PLAYBACK_STATUS,
163 /* Progressbar */
164 WPS_TOKEN_PROGRESSBAR,
165 #ifdef HAVE_LCD_CHARCELLS
166 WPS_TOKEN_PLAYER_PROGRESSBAR,
167 #endif
168 #ifdef HAVE_LCD_BITMAP
169 /* Peakmeter */
170 WPS_TOKEN_PEAKMETER,
171 #endif
173 /* Current track */
174 WPS_TOKEN_TRACK_ELAPSED_PERCENT,
175 WPS_TOKEN_TRACK_TIME_ELAPSED,
176 WPS_TOKEN_TRACK_TIME_REMAINING,
177 WPS_TOKEN_TRACK_LENGTH,
179 /* Playlist */
180 TOKEN_MARKER_PLAYLIST,
181 WPS_TOKEN_PLAYLIST_ENTRIES,
182 WPS_TOKEN_PLAYLIST_NAME,
183 WPS_TOKEN_PLAYLIST_POSITION,
184 WPS_TOKEN_PLAYLIST_SHUFFLE,
187 /* buttons */
188 TOKEN_MARKER_MISC,
189 WPS_TOKEN_BUTTON_VOLUME,
190 WPS_TOKEN_LASTTOUCH,
191 #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
192 /* Virtual LED */
193 WPS_TOKEN_VLED_HDD,
194 #endif
195 /* Volume level */
196 WPS_TOKEN_VOLUME,
197 /* hold */
198 WPS_TOKEN_MAIN_HOLD,
199 #ifdef HAS_REMOTE_BUTTON_HOLD
200 WPS_TOKEN_REMOTE_HOLD,
201 #endif
203 /* Setting option */
204 WPS_TOKEN_SETTING,
205 WPS_TOKEN_CURRENT_SCREEN,
206 WPS_TOKEN_LANG_IS_RTL,
208 /* Recording Tokens */
209 TOKEN_MARKER_RECORDING,
210 WPS_TOKEN_HAVE_RECORDING,
211 WPS_TOKEN_REC_FREQ,
212 WPS_TOKEN_REC_ENCODER,
213 WPS_TOKEN_REC_BITRATE, /* SWCODEC: MP3 bitrate, HWCODEC: MP3 "quality" */
214 WPS_TOKEN_REC_MONO,
216 TOKEN_MARKER_END, /* this needs to be the last value in this enum */
219 struct wps_token {
220 unsigned char type; /* enough to store the token type */
222 /* Whether the tag (e.g. track name or the album) refers the
223 current or the next song (false=current, true=next) */
224 bool next;
226 union {
227 char c;
228 unsigned short i;
229 void* data;
230 } value;
233 struct skin_token_list {
234 struct wps_token *token;
235 struct skin_token_list *next;
239 #endif