diff options
-rw-r--r-- | apps/gui/backdrop.h | 5 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 28 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 34 | ||||
-rw-r--r-- | tools/checkwps/checkwps.c | 76 |
4 files changed, 35 insertions, 108 deletions
diff --git a/apps/gui/backdrop.h b/apps/gui/backdrop.h index 9281cc4045..b37071b5d4 100644 --- a/apps/gui/backdrop.h +++ b/apps/gui/backdrop.h | |||
@@ -36,10 +36,9 @@ bool backdrop_load(enum backdrop_type bdrop, const char*); | |||
36 | void backdrop_unload(enum backdrop_type bdrop); | 36 | void backdrop_unload(enum backdrop_type bdrop); |
37 | void backdrop_show(enum backdrop_type bdrop); | 37 | void backdrop_show(enum backdrop_type bdrop); |
38 | 38 | ||
39 | #else /* LCD_DEPTH > 1 */ | 39 | #else /* LCD_DEPTH <= 1 || __PCTOOL__ */ |
40 | 40 | ||
41 | static inline | 41 | static inline bool backdrop_load(enum backdrop_type bdrop, const char* filename) |
42 | bool backdrop_load(enum backdrop_type bdrop, const char* filename) | ||
43 | { | 42 | { |
44 | (void)filename; (void)bdrop; return true; | 43 | (void)filename; (void)bdrop; return true; |
45 | } | 44 | } |
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 743f1b7a35..51f86e5686 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -489,34 +489,6 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index) | |||
489 | return true; | 489 | return true; |
490 | } | 490 | } |
491 | 491 | ||
492 | #ifdef HAVE_LCD_BITMAP | ||
493 | struct gui_img* find_image(char label, struct wps_data *data) | ||
494 | { | ||
495 | struct skin_token_list *list = data->images; | ||
496 | while (list) | ||
497 | { | ||
498 | struct gui_img *img = (struct gui_img *)list->token->value.data; | ||
499 | if (img->label == label) | ||
500 | return img; | ||
501 | list = list->next; | ||
502 | } | ||
503 | return NULL; | ||
504 | } | ||
505 | #endif | ||
506 | |||
507 | struct skin_viewport* find_viewport(char label, struct wps_data *data) | ||
508 | { | ||
509 | struct skin_token_list *list = data->viewports; | ||
510 | while (list) | ||
511 | { | ||
512 | struct skin_viewport *vp = (struct skin_viewport *)list->token->value.data; | ||
513 | if (vp->label == label) | ||
514 | return vp; | ||
515 | list = list->next; | ||
516 | } | ||
517 | return NULL; | ||
518 | } | ||
519 | |||
520 | 492 | ||
521 | /* Read a (sub)line to the given alignment format buffer. | 493 | /* Read a (sub)line to the given alignment format buffer. |
522 | linebuf is the buffer where the data is actually stored. | 494 | linebuf is the buffer where the data is actually stored. |
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 7f6e80d108..c05ebca45e 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -381,6 +381,38 @@ static void add_to_ll_chain(struct skin_token_list **list, struct skin_token_lis | |||
381 | t->next = item; | 381 | t->next = item; |
382 | } | 382 | } |
383 | } | 383 | } |
384 | |||
385 | /* traverse the image linked-list for an image */ | ||
386 | #ifdef HAVE_LCD_BITMAP | ||
387 | struct gui_img* find_image(char label, struct wps_data *data) | ||
388 | { | ||
389 | struct skin_token_list *list = data->images; | ||
390 | while (list) | ||
391 | { | ||
392 | struct gui_img *img = (struct gui_img *)list->token->value.data; | ||
393 | if (img->label == label) | ||
394 | return img; | ||
395 | list = list->next; | ||
396 | } | ||
397 | return NULL; | ||
398 | } | ||
399 | #endif | ||
400 | |||
401 | /* traverse the viewport linked list for a viewport */ | ||
402 | struct skin_viewport* find_viewport(char label, struct wps_data *data) | ||
403 | { | ||
404 | struct skin_token_list *list = data->viewports; | ||
405 | while (list) | ||
406 | { | ||
407 | struct skin_viewport *vp = (struct skin_viewport *)list->token->value.data; | ||
408 | if (vp->label == label) | ||
409 | return vp; | ||
410 | list = list->next; | ||
411 | } | ||
412 | return NULL; | ||
413 | } | ||
414 | |||
415 | |||
384 | /* create and init a new wpsll item. | 416 | /* create and init a new wpsll item. |
385 | * passing NULL to token will alloc a new one. | 417 | * passing NULL to token will alloc a new one. |
386 | * You should only pass NULL for the token when the token type (table above) | 418 | * You should only pass NULL for the token when the token type (table above) |
@@ -1841,7 +1873,7 @@ bool skin_data_load(struct wps_data *wps_data, | |||
1841 | return false; | 1873 | return false; |
1842 | } | 1874 | } |
1843 | #endif | 1875 | #endif |
1844 | #ifdef HAVE_ALBUMART | 1876 | #if defined(HAVE_ALBUMART) && !defined(__PCTOOL__) |
1845 | status = audio_status(); | 1877 | status = audio_status(); |
1846 | if (status & AUDIO_STATUS_PLAY) | 1878 | if (status & AUDIO_STATUS_PLAY) |
1847 | { | 1879 | { |
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c index d426394ea6..b074457de7 100644 --- a/tools/checkwps/checkwps.c +++ b/tools/checkwps/checkwps.c | |||
@@ -127,16 +127,6 @@ int read_line(int fd, char* buffer, int buffer_size) | |||
127 | return errno ? -1 : num_read; | 127 | return errno ? -1 : num_read; |
128 | } | 128 | } |
129 | 129 | ||
130 | bool load_wps_backdrop(const char* filename) | ||
131 | { | ||
132 | return true; | ||
133 | } | ||
134 | |||
135 | bool load_remote_wps_backdrop(const char* filename) | ||
136 | { | ||
137 | return true; | ||
138 | } | ||
139 | |||
140 | int recalc_dimension(struct dim *dst, struct dim *src) | 130 | int recalc_dimension(struct dim *dst, struct dim *src) |
141 | { | 131 | { |
142 | return 0; | 132 | return 0; |
@@ -165,24 +155,6 @@ int resize_on_load(struct bitmap *bm, bool dither, | |||
165 | return 0; | 155 | return 0; |
166 | } | 156 | } |
167 | 157 | ||
168 | int audio_status(void) | ||
169 | { | ||
170 | return 0; | ||
171 | } | ||
172 | |||
173 | struct mp3entry* audio_current_track(void) | ||
174 | { | ||
175 | return NULL; | ||
176 | } | ||
177 | |||
178 | void audio_stop(void) | ||
179 | { | ||
180 | } | ||
181 | |||
182 | void audio_play(long offset) | ||
183 | { | ||
184 | } | ||
185 | |||
186 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; | 158 | static char pluginbuf[PLUGIN_BUFFER_SIZE]; |
187 | 159 | ||
188 | static unsigned dummy_func2(void) | 160 | static unsigned dummy_func2(void) |
@@ -259,54 +231,6 @@ void screen_clear_area(struct screen * display, int xstart, int ystart, | |||
259 | } | 231 | } |
260 | #endif | 232 | #endif |
261 | 233 | ||
262 | /* From skin_display.c */ | ||
263 | void skin_data_init(struct wps_data *wps_data) | ||
264 | { | ||
265 | #ifdef HAVE_LCD_BITMAP | ||
266 | wps_data->wps_sb_tag = false; | ||
267 | wps_data->show_sb_on_wps = false; | ||
268 | wps_data->peak_meter_enabled = false; | ||
269 | wps_data->images = NULL; | ||
270 | wps_data->progressbars = NULL; | ||
271 | /* progress bars */ | ||
272 | #else /* HAVE_LCD_CHARCELLS */ | ||
273 | int i; | ||
274 | for (i = 0; i < 8; i++) | ||
275 | { | ||
276 | wps_data->wps_progress_pat[i] = 0; | ||
277 | } | ||
278 | wps_data->full_line_progressbar = false; | ||
279 | #endif | ||
280 | wps_data->wps_loaded = false; | ||
281 | } | ||
282 | |||
283 | #ifdef HAVE_LCD_BITMAP | ||
284 | struct gui_img* find_image(char label, struct wps_data *data) | ||
285 | { | ||
286 | struct skin_token_list *list = data->images; | ||
287 | while (list) | ||
288 | { | ||
289 | struct gui_img *img = (struct gui_img *)list->token->value.data; | ||
290 | if (img->label == label) | ||
291 | return img; | ||
292 | list = list->next; | ||
293 | } | ||
294 | return NULL; | ||
295 | } | ||
296 | #endif | ||
297 | |||
298 | struct skin_viewport* find_viewport(char label, struct wps_data *data) | ||
299 | { | ||
300 | struct skin_token_list *list = data->viewports; | ||
301 | while (list) | ||
302 | { | ||
303 | struct skin_viewport *vp = (struct skin_viewport *)list->token->value.data; | ||
304 | if (vp->label == label) | ||
305 | return vp; | ||
306 | list = list->next; | ||
307 | } | ||
308 | return NULL; | ||
309 | } | ||
310 | 234 | ||
311 | int main(int argc, char **argv) | 235 | int main(int argc, char **argv) |
312 | { | 236 | { |