summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-08-03 04:43:34 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-08-03 04:43:34 +0000
commit3e7444ff8770678b563af6b3f9f6b05521cac959 (patch)
tree2cc650b7726639b51eee53d75a51515a255614a2
parent48b7e8ca2748afbf429dc691a37cb3f6f1252246 (diff)
downloadrockbox-3e7444ff8770678b563af6b3f9f6b05521cac959.tar.gz
rockbox-3e7444ff8770678b563af6b3f9f6b05521cac959.zip
part two of the grand overall wps/skinning engine cleanup work:
* rename wps_engine to skin_engine as that was agreed on * rename music_screen back to wps * clean up the skin display/update functions a bit * make skin_data_load setup the hardcoded default if a skin cant be loaded for whatever reason instead of doing it when it is first displayed ignore any gui_wps or wps_ or gwps_ nameing in skin_engine/ ... these will be renamed as this work gets finished git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22135 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/SOURCES10
-rw-r--r--apps/filetree.c6
-rw-r--r--apps/gui/skin_engine/wps_debug.c (renamed from apps/gui/wps_engine/wps_debug.c)0
-rw-r--r--apps/gui/skin_engine/wps_display.c (renamed from apps/gui/wps_engine/wps_display.c)89
-rw-r--r--apps/gui/skin_engine/wps_internals.h (renamed from apps/gui/wps_engine/wps_internals.h)11
-rw-r--r--apps/gui/skin_engine/wps_parser.c (renamed from apps/gui/wps_engine/wps_parser.c)106
-rw-r--r--apps/gui/skin_engine/wps_tokens.c (renamed from apps/gui/wps_engine/wps_tokens.c)2
-rw-r--r--apps/gui/wps_engine/wps_engine.h49
-rw-r--r--apps/iap.c2
-rw-r--r--apps/main.c2
-rw-r--r--apps/menus/main_menu.c2
-rw-r--r--apps/misc.c2
-rw-r--r--apps/recorder/albumart.h2
-rw-r--r--apps/root_menu.c2
-rw-r--r--apps/settings.c8
-rw-r--r--apps/tree.c2
16 files changed, 115 insertions, 180 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index e1d85a75f0..12ac54f38d 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -77,17 +77,17 @@ gui/pitchscreen.c
77gui/quickscreen.c 77gui/quickscreen.c
78#endif 78#endif
79 79
80gui/music_screen.c 80gui/wps.c
81gui/scrollbar.c 81gui/scrollbar.c
82gui/splash.c 82gui/splash.c
83gui/statusbar.c 83gui/statusbar.c
84gui/yesno.c 84gui/yesno.c
85gui/viewport.c 85gui/viewport.c
86 86
87gui/wps_engine/wps_debug.c 87gui/skin_engine/wps_debug.c
88gui/wps_engine/wps_display.c 88gui/skin_engine/wps_display.c
89gui/wps_engine/wps_parser.c 89gui/skin_engine/wps_parser.c
90gui/wps_engine/wps_tokens.c 90gui/skin_engine/wps_tokens.c
91 91
92#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) 92#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
93gui/backdrop.c 93gui/backdrop.c
diff --git a/apps/filetree.c b/apps/filetree.c
index 458d553e27..8e97a0d13c 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -51,7 +51,7 @@
51#if CONFIG_TUNER 51#if CONFIG_TUNER
52#include "radio.h" 52#include "radio.h"
53#endif 53#endif
54#include "wps_engine/wps_internals.h" /* FIXME: REMOVE ME */ 54#include "skin_engine/skin_engine.h"
55#include "backdrop.h" 55#include "backdrop.h"
56 56
57static int compare_sort_dir; /* qsort key for sorting directories */ 57static int compare_sort_dir; /* qsort key for sorting directories */
@@ -484,7 +484,7 @@ int ft_enter(struct tree_context* c)
484#if LCD_DEPTH > 1 484#if LCD_DEPTH > 1
485 unload_wps_backdrop(); 485 unload_wps_backdrop();
486#endif 486#endif
487 wps_data_load(gui_wps[0].data, &screens[0], buf, true); 487 skin_data_load(gui_wps[0].data, &screens[0], buf, true);
488 set_file(buf, (char *)global_settings.wps_file, 488 set_file(buf, (char *)global_settings.wps_file,
489 MAX_FILENAME); 489 MAX_FILENAME);
490 break; 490 break;
@@ -496,7 +496,7 @@ int ft_enter(struct tree_context* c)
496#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 496#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
497 unload_remote_wps_backdrop(); 497 unload_remote_wps_backdrop();
498#endif 498#endif
499 wps_data_load(gui_wps[1].data, &screens[1], buf, true); 499 skin_data_load(gui_wps[1].data, &screens[1], buf, true);
500 set_file(buf, (char *)global_settings.rwps_file, 500 set_file(buf, (char *)global_settings.rwps_file,
501 MAX_FILENAME); 501 MAX_FILENAME);
502 break; 502 break;
diff --git a/apps/gui/wps_engine/wps_debug.c b/apps/gui/skin_engine/wps_debug.c
index a89f61af9d..a89f61af9d 100644
--- a/apps/gui/wps_engine/wps_debug.c
+++ b/apps/gui/skin_engine/wps_debug.c
diff --git a/apps/gui/wps_engine/wps_display.c b/apps/gui/skin_engine/wps_display.c
index c74e2cedfa..98050093c4 100644
--- a/apps/gui/wps_engine/wps_display.c
+++ b/apps/gui/skin_engine/wps_display.c
@@ -63,89 +63,52 @@
63 63
64 64
65#include "wps_internals.h" 65#include "wps_internals.h"
66#include "wps_engine.h" 66#include "skin_engine.h"
67
68static bool gui_wps_redraw(struct gui_wps *gwps, unsigned refresh_mode);
69
67 70
68bool gui_wps_display(struct gui_wps *gwps) 71bool gui_wps_display(struct gui_wps *gwps)
69{ 72{
70 struct screen *display = gwps->display; 73 struct screen *display = gwps->display;
71 struct wps_data *data = gwps->data;
72 int screen = display->screen_type;
73 74
74 /* Update the values in the first (default) viewport - in case the user 75 /* Update the values in the first (default) viewport - in case the user
75 has modified the statusbar or colour settings */ 76 has modified the statusbar or colour settings */
76#if LCD_DEPTH > 1 77#if LCD_DEPTH > 1
77 if (display->depth > 1) 78 if (display->depth > 1)
78 { 79 {
79 data->viewports[0].vp.fg_pattern = display->get_foreground(); 80 gwps->data->viewports[0].vp.fg_pattern = display->get_foreground();
80 data->viewports[0].vp.bg_pattern = display->get_background(); 81 gwps->data->viewports[0].vp.bg_pattern = display->get_background();
81 } 82 }
82#endif 83#endif
83 display->clear_display(); 84 display->clear_display();
84 if (!data->wps_loaded) {
85 if ( !data->num_tokens ) {
86 /* set the default wps for the main-screen */
87 if(screen == SCREEN_MAIN)
88 {
89#if LCD_DEPTH > 1
90 unload_wps_backdrop();
91#endif
92 wps_data_load(data,
93 display,
94#ifdef HAVE_LCD_BITMAP
95 "%s%?it<%?in<%in. |>%it|%fn>\n"
96 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
97 "%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>\n"
98 "\n"
99 "%al%pc/%pt%ar[%pp:%pe]\n"
100 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
101 "%pb\n"
102 "%pm\n", false);
103#else
104 "%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>\n"
105 "%pc%?ps<*|/>%pt\n", false);
106#endif
107 }
108#ifdef HAVE_REMOTE_LCD
109 /* set the default wps for the remote-screen */
110 else if(screen == SCREEN_REMOTE)
111 {
112#if LCD_REMOTE_DEPTH > 1
113 unload_remote_wps_backdrop();
114#endif
115 wps_data_load(data,
116 display,
117 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
118 "%s%?it<%?in<%in. |>%it|%fn>\n"
119 "%al%pc/%pt%ar[%pp:%pe]\n"
120 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
121 "%pb\n", false);
122 }
123#endif
124 }
125 }
126 else
127 {
128#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 85#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
129 if (screen == SCREEN_REMOTE) 86 if (display->screen_type == SCREEN_REMOTE)
130 show_remote_wps_backdrop(); 87 show_remote_wps_backdrop();
131 else if (screen == SCREEN_MAIN) 88 else if (display->screen_type == SCREEN_MAIN)
132#endif 89#endif
133#if LCD_DEPTH > 1 90#if LCD_DEPTH > 1
134 show_wps_backdrop(); 91 show_wps_backdrop();
135#endif 92#endif
136 } 93 return gui_wps_redraw(gwps, WPS_REFRESH_ALL);
137 return gui_wps_redraw(gwps, 0, WPS_REFRESH_ALL);
138} 94}
139 95
140bool gui_wps_update(struct gui_wps *gwps) 96/* update a skinned screen, update_type is WPS_REFRESH_* values.
97 * Usually it should only be WPS_REFRESH_NON_STATIC
98 * A full update will be done if required (state.do_full_update == true)
99 */
100bool skin_update(struct gui_wps *gwps, unsigned int update_type)
141{ 101{
142 struct mp3entry *id3 = gwps->state->id3;
143 bool retval; 102 bool retval;
103 /* This maybe shouldnt be here, but while the skin is only used to
104 * display the music screen this is better than whereever we are being
105 * called from. This is also safe for skined screen which dont use the id3 */
106 struct mp3entry *id3 = gwps->state->id3;
144 bool cuesheet_update = (id3 != NULL ? cuesheet_subtrack_changed(id3) : false); 107 bool cuesheet_update = (id3 != NULL ? cuesheet_subtrack_changed(id3) : false);
145 gwps->state->do_full_update = cuesheet_update || gwps->state->do_full_update; 108 gwps->state->do_full_update = cuesheet_update || gwps->state->do_full_update;
146 retval = gui_wps_redraw(gwps, 0, 109
147 gwps->state->do_full_update ? 110 retval = gui_wps_redraw(gwps, gwps->state->do_full_update ?
148 WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC); 111 WPS_REFRESH_ALL : update_type);
149 return retval; 112 return retval;
150} 113}
151 114
@@ -883,9 +846,7 @@ static void write_line(struct screen *display,
883 } 846 }
884} 847}
885 848
886bool gui_wps_redraw(struct gui_wps *gwps, 849static bool gui_wps_redraw(struct gui_wps *gwps, unsigned refresh_mode)
887 int ffwd_offset,
888 unsigned refresh_mode)
889{ 850{
890 struct wps_data *data = gwps->data; 851 struct wps_data *data = gwps->data;
891 struct screen *display = gwps->display; 852 struct screen *display = gwps->display;
@@ -943,8 +904,6 @@ bool gui_wps_redraw(struct gui_wps *gwps,
943 } 904 }
944#endif 905#endif
945 906
946 state->ff_rewind_count = ffwd_offset;
947
948 /* disable any viewports which are conditionally displayed */ 907 /* disable any viewports which are conditionally displayed */
949 for (v = 0; v < data->num_viewports; v++) 908 for (v = 0; v < data->num_viewports; v++)
950 { 909 {
diff --git a/apps/gui/wps_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index ce9b4d3d46..2dcaa504bb 100644
--- a/apps/gui/wps_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -390,11 +390,6 @@ struct touchregion {
390 short int y; /* y-pos */ 390 short int y; /* y-pos */
391 short int width; /* width */ 391 short int width; /* width */
392 short int height; /* height */ 392 short int height; /* height */
393 enum {
394 WPS_TOUCHREGION_ACTION,
395 WPS_TOUCHREGION_SCROLLBAR,
396 WPS_TOUCHREGION_VOLUME
397 } type; /* type of touch region */
398 bool repeat; /* requires the area be held for the action */ 393 bool repeat; /* requires the area be held for the action */
399 int action; /* action this button will return */ 394 int action; /* action this button will return */
400}; 395};
@@ -478,12 +473,6 @@ struct wps_data
478/* initial setup of wps_data */ 473/* initial setup of wps_data */
479void wps_data_init(struct wps_data *wps_data); 474void wps_data_init(struct wps_data *wps_data);
480 475
481/* to setup up the wps-data from a format-buffer (isfile = false)
482 from a (wps-)file (isfile = true)*/
483bool wps_data_load(struct wps_data *wps_data,
484 struct screen *display,
485 const char *buf,
486 bool isfile);
487 476
488/* Redraw statusbars if necessary */ 477/* Redraw statusbars if necessary */
489void gwps_draw_statusbars(void); 478void gwps_draw_statusbars(void);
diff --git a/apps/gui/wps_engine/wps_parser.c b/apps/gui/skin_engine/wps_parser.c
index 91c63059b0..a3e5f6861d 100644
--- a/apps/gui/wps_engine/wps_parser.c
+++ b/apps/gui/skin_engine/wps_parser.c
@@ -1173,8 +1173,6 @@ static int parse_touchregion(const char *wps_bufptr,
1173 struct touchregion *region; 1173 struct touchregion *region;
1174 const char *ptr = wps_bufptr; 1174 const char *ptr = wps_bufptr;
1175 const char *action; 1175 const char *action;
1176 const char pb_string[] = "progressbar";
1177 const char vol_string[] = "volume";
1178 int x,y,w,h; 1176 int x,y,w,h;
1179 1177
1180 /* format: %T|x|y|width|height|action| 1178 /* format: %T|x|y|width|height|action|
@@ -1205,7 +1203,7 @@ static int parse_touchregion(const char *wps_bufptr,
1205 /* Check there is a terminating | */ 1203 /* Check there is a terminating | */
1206 if (*ptr != '|') 1204 if (*ptr != '|')
1207 return WPS_ERROR_INVALID_PARAM; 1205 return WPS_ERROR_INVALID_PARAM;
1208 1206
1209 /* should probably do some bounds checking here with the viewport... but later */ 1207 /* should probably do some bounds checking here with the viewport... but later */
1210 region = &wps_data->touchregion[wps_data->touchregion_count]; 1208 region = &wps_data->touchregion[wps_data->touchregion_count];
1211 region->action = ACTION_NONE; 1209 region->action = ACTION_NONE;
@@ -1214,41 +1212,28 @@ static int parse_touchregion(const char *wps_bufptr,
1214 region->width = w; 1212 region->width = w;
1215 region->height = h; 1213 region->height = h;
1216 region->wvp = &wps_data->viewports[wps_data->num_viewports]; 1214 region->wvp = &wps_data->viewports[wps_data->num_viewports];
1217 1215 i = 0;
1218 if(!strncmp(pb_string, action, sizeof(pb_string)-1) 1216 if (*action == '&')
1219 && *(action + sizeof(pb_string)-1) == '|')
1220 region->type = WPS_TOUCHREGION_SCROLLBAR;
1221 else if(!strncmp(vol_string, action, sizeof(vol_string)-1)
1222 && *(action + sizeof(vol_string)-1) == '|')
1223 region->type = WPS_TOUCHREGION_VOLUME;
1224 else
1225 { 1217 {
1226 region->type = WPS_TOUCHREGION_ACTION; 1218 action++;
1227 1219 region->repeat = true;
1228 if (*action == '&')
1229 {
1230 action++;
1231 region->repeat = true;
1232 }
1233 else
1234 region->repeat = false;
1235
1236 i = 0;
1237 imax = ARRAYLEN(touchactions);
1238 while ((region->action == ACTION_NONE) &&
1239 (i < imax))
1240 {
1241 /* try to match with one of our touchregion screens */
1242 int len = strlen(touchactions[i].s);
1243 if (!strncmp(touchactions[i].s, action, len)
1244 && *(action+len) == '|')
1245 region->action = touchactions[i].action;
1246 i++;
1247 }
1248 if (region->action == ACTION_NONE)
1249 return WPS_ERROR_INVALID_PARAM;
1250 } 1220 }
1221 else
1222 region->repeat = false;
1251 1223
1224 imax = ARRAYLEN(touchactions);
1225 while ((region->action == ACTION_NONE) &&
1226 (i < imax))
1227 {
1228 /* try to match with one of our touchregion screens */
1229 int len = strlen(touchactions[i].s);
1230 if (!strncmp(touchactions[i].s, action, len)
1231 && *(action+len) == '|')
1232 region->action = touchactions[i].action;
1233 i++;
1234 }
1235 if (region->action == ACTION_NONE)
1236 return WPS_ERROR_INVALID_PARAM;
1252 wps_data->touchregion_count++; 1237 wps_data->touchregion_count++;
1253 return skip_end_of_line(wps_bufptr); 1238 return skip_end_of_line(wps_bufptr);
1254} 1239}
@@ -1681,7 +1666,7 @@ static bool load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
1681 1666
1682/* to setup up the wps-data from a format-buffer (isfile = false) 1667/* to setup up the wps-data from a format-buffer (isfile = false)
1683 from a (wps-)file (isfile = true)*/ 1668 from a (wps-)file (isfile = true)*/
1684bool wps_data_load(struct wps_data *wps_data, 1669static bool wps_data_load(struct wps_data *wps_data,
1685 struct screen *display, 1670 struct screen *display,
1686 const char *buf, 1671 const char *buf,
1687 bool isfile) 1672 bool isfile)
@@ -1830,6 +1815,55 @@ bool wps_data_load(struct wps_data *wps_data,
1830 } 1815 }
1831} 1816}
1832 1817
1818void skin_data_load(struct wps_data *wps_data,
1819 struct screen *display,
1820 const char *buf,
1821 bool isfile)
1822{
1823 bool loaded_ok = buf && wps_data_load(wps_data, display, buf, isfile);
1824 if (!loaded_ok) /* load the hardcoded default */
1825 {
1826 /* set the default wps for the main-screen */
1827 if(display->screen_type == SCREEN_MAIN)
1828 {
1829#if LCD_DEPTH > 1
1830 unload_wps_backdrop();
1831#endif
1832 wps_data_load(wps_data,
1833 display,
1834#ifdef HAVE_LCD_BITMAP
1835 "%s%?it<%?in<%in. |>%it|%fn>\n"
1836 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
1837 "%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>\n"
1838 "\n"
1839 "%al%pc/%pt%ar[%pp:%pe]\n"
1840 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
1841 "%pb\n"
1842 "%pm\n", false);
1843#else
1844 "%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>\n"
1845 "%pc%?ps<*|/>%pt\n", false);
1846#endif
1847 }
1848#ifdef HAVE_REMOTE_LCD
1849 /* set the default wps for the remote-screen */
1850 else if(display->screen_type == SCREEN_REMOTE)
1851 {
1852#if LCD_REMOTE_DEPTH > 1
1853 unload_remote_wps_backdrop();
1854#endif
1855 wps_data_load(wps_data,
1856 display,
1857 "%s%?ia<%ia|%?d2<%d2|(root)>>\n"
1858 "%s%?it<%?in<%in. |>%it|%fn>\n"
1859 "%al%pc/%pt%ar[%pp:%pe]\n"
1860 "%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>\n"
1861 "%pb\n", false);
1862 }
1863#endif
1864 }
1865}
1866
1833int wps_subline_index(struct wps_data *data, int line, int subline) 1867int wps_subline_index(struct wps_data *data, int line, int subline)
1834{ 1868{
1835 return data->lines[line].first_subline_idx + subline; 1869 return data->lines[line].first_subline_idx + subline;
diff --git a/apps/gui/wps_engine/wps_tokens.c b/apps/gui/skin_engine/wps_tokens.c
index 3852251916..b1163aa88a 100644
--- a/apps/gui/wps_engine/wps_tokens.c
+++ b/apps/gui/skin_engine/wps_tokens.c
@@ -55,7 +55,7 @@
55#include "viewport.h" 55#include "viewport.h"
56 56
57#include "wps_internals.h" 57#include "wps_internals.h"
58#include "music_screen.h" 58#include "wps.h"
59 59
60static char* get_codectype(const struct mp3entry* id3) 60static char* get_codectype(const struct mp3entry* id3)
61{ 61{
diff --git a/apps/gui/wps_engine/wps_engine.h b/apps/gui/wps_engine/wps_engine.h
deleted file mode 100644
index fe034f9138..0000000000
--- a/apps/gui/wps_engine/wps_engine.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: gwps.h 22003 2009-07-22 22:10:25Z kugel $
9 *
10 * Copyright (C) 2007 Nicolas Pennequin
11 *
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.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22 /** Use this for stuff which external code needs to include **/
23
24#ifndef _WPS_ENGINE_H
25#define _WPS_ENGINE_H
26#include <stdbool.h>
27#include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */
28
29
30#ifdef HAVE_TOUCHSCREEN
31int wps_get_touchaction(struct wps_data *data);
32#endif
33
34#ifdef HAVE_ALBUMART
35/* gives back if WPS contains an albumart tag */
36bool gui_sync_wps_uses_albumart(void);
37#endif
38
39/* setup and display a WPS for the first time */
40bool gui_wps_display(struct gui_wps *gwps);
41/* do a requested redraw */
42bool gui_wps_redraw(struct gui_wps *gwps,
43 int ffwd_offset,
44 unsigned refresh_mode);
45/* do a partial redraw, or full if required, also do any housekeeping
46 * which might be needed */
47bool gui_wps_update(struct gui_wps *gwps);
48
49#endif
diff --git a/apps/iap.c b/apps/iap.c
index f7a808d8b2..8dfef9516f 100644
--- a/apps/iap.c
+++ b/apps/iap.c
@@ -36,7 +36,7 @@
36#include "audio.h" 36#include "audio.h"
37#include "settings.h" 37#include "settings.h"
38#include "metadata.h" 38#include "metadata.h"
39#include "wps_engine/wps_engine.h" 39#include "skin_engine/skin_engine.h"
40 40
41#include "action.h" 41#include "action.h"
42 42
diff --git a/apps/main.c b/apps/main.c
index 2cf9ce7175..d0fba3fcce 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -52,7 +52,7 @@
52#include "sprintf.h" 52#include "sprintf.h"
53#include "font.h" 53#include "font.h"
54#include "language.h" 54#include "language.h"
55#include "music_screen.h" 55#include "wps.h"
56#include "playlist.h" 56#include "playlist.h"
57#include "buffer.h" 57#include "buffer.h"
58#include "rolo.h" 58#include "rolo.h"
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 4009566c44..b535662f13 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -50,7 +50,7 @@
50#endif 50#endif
51#include "version.h" 51#include "version.h"
52#include "time.h" 52#include "time.h"
53#include "gui/wps_engine/wps_engine.h" 53#include "skin_engine/skin_engine.h"
54 54
55static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG}; 55static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG};
56 56
diff --git a/apps/misc.c b/apps/misc.c
index 2e7051cbd3..b091cc6a6f 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -76,7 +76,7 @@
76#include "icons.h" 76#include "icons.h"
77#endif /* End HAVE_LCD_BITMAP */ 77#endif /* End HAVE_LCD_BITMAP */
78#include "bookmark.h" 78#include "bookmark.h"
79#include "music_screen.h" 79#include "wps.h"
80#include "playback.h" 80#include "playback.h"
81 81
82#ifdef BOOTFILE 82#ifdef BOOTFILE
diff --git a/apps/recorder/albumart.h b/apps/recorder/albumart.h
index 82e0b79aec..d1c2dfa7bd 100644
--- a/apps/recorder/albumart.h
+++ b/apps/recorder/albumart.h
@@ -26,7 +26,7 @@
26 26
27#include <stdbool.h> 27#include <stdbool.h>
28#include "metadata.h" 28#include "metadata.h"
29#include "wps_engine/wps_engine.h" 29#include "skin_engine/skin_engine.h"
30 30
31/* Look for albumart bitmap in the same dir as the track and in its parent dir. 31/* Look for albumart bitmap in the same dir as the track and in its parent dir.
32 * Stores the found filename in the buf parameter. 32 * Stores the found filename in the buf parameter.
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 1c86b6fe23..03e63f9077 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -53,7 +53,7 @@
53#ifdef HAVE_RECORDING 53#ifdef HAVE_RECORDING
54#include "recording.h" 54#include "recording.h"
55#endif 55#endif
56#include "music_screen.h" 56#include "wps.h"
57#include "bookmark.h" 57#include "bookmark.h"
58#include "playlist.h" 58#include "playlist.h"
59#include "tagtree.h" 59#include "tagtree.h"
diff --git a/apps/settings.c b/apps/settings.c
index 800cc59a56..8835b95b12 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -69,7 +69,7 @@
69#if CONFIG_TUNER 69#if CONFIG_TUNER
70#include "radio.h" 70#include "radio.h"
71#endif 71#endif
72#include "wps_engine/wps_engine.h" 72#include "skin_engine/skin_engine.h"
73 73
74#if CONFIG_CODEC == MAS3507D 74#if CONFIG_CODEC == MAS3507D
75void dac_line_in(bool enable); 75void dac_line_in(bool enable);
@@ -848,11 +848,12 @@ void settings_apply(bool read_disk)
848 global_settings.wps_file[0] != 0xff ) { 848 global_settings.wps_file[0] != 0xff ) {
849 snprintf(buf, sizeof buf, WPS_DIR "/%s.wps", 849 snprintf(buf, sizeof buf, WPS_DIR "/%s.wps",
850 global_settings.wps_file); 850 global_settings.wps_file);
851 wps_data_load(gui_wps[0].data, &screens[0], buf, true); 851 skin_data_load(gui_wps[0].data, &screens[0], buf, true);
852 } 852 }
853 else 853 else
854 { 854 {
855 wps_data_init(gui_wps[0].data); 855 wps_data_init(gui_wps[0].data);
856 skin_data_load(gui_wps[0].data, &screens[0], NULL, true);
856#ifdef HAVE_REMOTE_LCD 857#ifdef HAVE_REMOTE_LCD
857 gui_wps[0].data->remote_wps = false; 858 gui_wps[0].data->remote_wps = false;
858#endif 859#endif
@@ -877,11 +878,12 @@ void settings_apply(bool read_disk)
877 if ( global_settings.rwps_file[0]) { 878 if ( global_settings.rwps_file[0]) {
878 snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps", 879 snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps",
879 global_settings.rwps_file); 880 global_settings.rwps_file);
880 wps_data_load(gui_wps[1].data, &screens[1], buf, true); 881 skin_data_load(gui_wps[1].data, &screens[1], buf, true);
881 } 882 }
882 else 883 else
883 { 884 {
884 wps_data_init(gui_wps[1].data); 885 wps_data_init(gui_wps[1].data);
886 skin_data_load(gui_wps[1].data, &screens[1], NULL, true);
885 gui_wps[1].data->remote_wps = true; 887 gui_wps[1].data->remote_wps = true;
886 } 888 }
887#endif 889#endif
diff --git a/apps/tree.c b/apps/tree.c
index 71ec83ed1a..667aea0572 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -36,7 +36,7 @@
36#include "audio.h" 36#include "audio.h"
37#include "playlist.h" 37#include "playlist.h"
38#include "menu.h" 38#include "menu.h"
39#include "wps_engine/wps_engine.h" 39#include "skin_engine/skin_engine.h"
40#include "settings.h" 40#include "settings.h"
41#include "debug.h" 41#include "debug.h"
42#include "storage.h" 42#include "storage.h"