summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_display.c8
-rw-r--r--apps/gui/skin_engine/skin_engine.h15
-rw-r--r--apps/gui/skin_engine/skin_touchsupport.c8
-rw-r--r--apps/gui/skin_engine/wps_internals.h9
4 files changed, 22 insertions, 18 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 3ff804263b..1a012dc1a6 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -709,14 +709,14 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
709} 709}
710#endif 710#endif
711 711
712bool skin_has_sbs(enum screen_type screen, struct wps_data *data) 712bool skin_has_sbs(struct gui_wps *gwps)
713{ 713{
714 (void)screen; 714 struct wps_data *data = gwps->data;
715 (void)data; 715
716 bool draw = false; 716 bool draw = false;
717 if (data->wps_sb_tag) 717 if (data->wps_sb_tag)
718 draw = data->show_sb_on_wps; 718 draw = data->show_sb_on_wps;
719 else if (statusbar_position(screen) != STATUSBAR_OFF) 719 else if (statusbar_position(gwps->display->screen_type) != STATUSBAR_OFF)
720 draw = true; 720 draw = true;
721 return draw; 721 return draw;
722} 722}
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h
index b56674112c..d04c873e84 100644
--- a/apps/gui/skin_engine/skin_engine.h
+++ b/apps/gui/skin_engine/skin_engine.h
@@ -40,25 +40,18 @@ enum skinnable_screens {
40 40
41struct skin_stats; 41struct skin_stats;
42struct skin_viewport; 42struct skin_viewport;
43struct wps_data; 43struct gui_wps;
44 44
45#ifdef HAVE_TOUCHSCREEN 45#ifdef HAVE_TOUCHSCREEN
46int skin_get_touchaction(struct wps_data *data, int* edge_offset); 46int skin_get_touchaction(struct gui_wps *gwps, int* edge_offset);
47void skin_disarm_touchregions(struct wps_data *data); 47void skin_disarm_touchregions(struct gui_wps *gwps);
48#endif 48#endif
49 49
50/* Do a update_type update of the skinned screen */ 50/* Do a update_type update of the skinned screen */
51void skin_update(enum skinnable_screens skin, enum screen_type screen, 51void skin_update(enum skinnable_screens skin, enum screen_type screen,
52 unsigned int update_type); 52 unsigned int update_type);
53 53
54/* 54bool skin_has_sbs(struct gui_wps *gwps);
55 * setup up the skin-data from a format-buffer (isfile = false)
56 * or from a skinfile (isfile = true)
57 */
58bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
59 const char *buf, bool isfile, struct skin_stats *stats);
60
61bool skin_has_sbs(enum screen_type screen, struct wps_data *data);
62 55
63 56
64/* load a backdrop into the skin buffer. 57/* load a backdrop into the skin buffer.
diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c
index eba6b82f5b..77ab30d675 100644
--- a/apps/gui/skin_engine/skin_touchsupport.c
+++ b/apps/gui/skin_engine/skin_touchsupport.c
@@ -35,8 +35,9 @@
35#include "dsp_misc.h" 35#include "dsp_misc.h"
36 36
37/** Disarms all touchregions. */ 37/** Disarms all touchregions. */
38void skin_disarm_touchregions(struct wps_data *data) 38void skin_disarm_touchregions(struct gui_wps *gwps)
39{ 39{
40 struct wps_data *data = gwps->data;
40 char* skin_buffer = get_skin_buffer(data); 41 char* skin_buffer = get_skin_buffer(data);
41 struct skin_token_list *regions = SKINOFFSETTOPTR(skin_buffer, data->touchregions); 42 struct skin_token_list *regions = SKINOFFSETTOPTR(skin_buffer, data->touchregions);
42 while (regions) 43 while (regions)
@@ -52,8 +53,9 @@ void skin_disarm_touchregions(struct wps_data *data)
52 * egde_offset is a percentage value for the position of the touch 53 * egde_offset is a percentage value for the position of the touch
53 * inside the bar for regions which arnt WPS_TOUCHREGION_ACTION type. 54 * inside the bar for regions which arnt WPS_TOUCHREGION_ACTION type.
54 */ 55 */
55int skin_get_touchaction(struct wps_data *data, int* edge_offset) 56int skin_get_touchaction(struct gui_wps *gwps, int* edge_offset)
56{ 57{
58 struct wps_data *data = gwps->data;
57 int returncode = ACTION_NONE; 59 int returncode = ACTION_NONE;
58 short x,y; 60 short x,y;
59 short vx, vy; 61 short vx, vy;
@@ -161,7 +163,7 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset)
161 163
162 /* On release, all regions are disarmed. */ 164 /* On release, all regions are disarmed. */
163 if (released) 165 if (released)
164 skin_disarm_touchregions(data); 166 skin_disarm_touchregions(gwps);
165 if (temp && temp->press_length == LONG_PRESS) 167 if (temp && temp->press_length == LONG_PRESS)
166 temp->armed = false; 168 temp->armed = false;
167 169
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index 2506688659..f3e4577cc2 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -31,6 +31,8 @@
31#include "core_alloc.h" 31#include "core_alloc.h"
32#endif 32#endif
33 33
34struct wps_data;
35
34struct skin_stats { 36struct skin_stats {
35 size_t buflib_handles; 37 size_t buflib_handles;
36 size_t tree_size; 38 size_t tree_size;
@@ -42,6 +44,13 @@ struct skin_stats *skin_get_stats(int number, int screen);
42#define skin_clear_stats(stats) memset(stats, 0, sizeof(struct skin_stats)) 44#define skin_clear_stats(stats) memset(stats, 0, sizeof(struct skin_stats))
43bool skin_backdrop_get_debug(int index, char **path, int *ref_count, size_t *size); 45bool skin_backdrop_get_debug(int index, char **path, int *ref_count, size_t *size);
44 46
47/*
48 * setup up the skin-data from a format-buffer (isfile = false)
49 * or from a skinfile (isfile = true)
50 */
51bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
52 const char *buf, bool isfile, struct skin_stats *stats);
53
45/* Timeout unit expressed in HZ. In WPS, all timeouts are given in seconds 54/* Timeout unit expressed in HZ. In WPS, all timeouts are given in seconds
46 (possibly with a decimal fraction) but stored as integer values. 55 (possibly with a decimal fraction) but stored as integer values.
47 E.g. 2.5 is stored as 25. This means 25 tenth of a second, i.e. 25 units. 56 E.g. 2.5 is stored as 25. This means 25 tenth of a second, i.e. 25 units.