diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-04 23:22:21 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-11-15 14:20:31 +0000 |
commit | 73b1e30bb04d87144c4106ff7a9457507d191491 (patch) | |
tree | 377a307a2ba7f3065fa60cf316c20c01d03a2725 /apps/gui/skin_engine/wps_internals.h | |
parent | 45bd4c7220280e3eafdd2722cc17c8db8617b676 (diff) | |
download | rockbox-73b1e30bb04d87144c4106ff7a9457507d191491.tar.gz rockbox-73b1e30bb04d87144c4106ff7a9457507d191491.zip |
skin engine: Reduce scope of internal wps_data struct
A bunch of public API calls take a wps_data struct argument,
but that's an internal type that doesn't have a direct getter.
Instead the skin engine provides a gui_wps struct as a way
to refer to a particular skin instance. Use that instead of
wps_data in the public API.
Change-Id: I13e1aa8df7f08ccfb789bb728d493ac8d7de1a9b
Diffstat (limited to 'apps/gui/skin_engine/wps_internals.h')
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 | ||
34 | struct wps_data; | ||
35 | |||
34 | struct skin_stats { | 36 | struct 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)) |
43 | bool skin_backdrop_get_debug(int index, char **path, int *ref_count, size_t *size); | 45 | bool 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 | */ | ||
51 | bool 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. |