summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/wps_internals.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/wps_internals.h')
-rw-r--r--apps/gui/skin_engine/wps_internals.h43
1 files changed, 13 insertions, 30 deletions
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index fbd18b9f73..bcc68a88f0 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -160,12 +160,16 @@ struct wps_subline {
160 Tokens of this subline end where tokens for the next subline 160 Tokens of this subline end where tokens for the next subline
161 begin. */ 161 begin. */
162 unsigned short first_token_idx; 162 unsigned short first_token_idx;
163 unsigned short last_token_idx;
163 164
164 /* Bit or'ed WPS_REFRESH_xxx */ 165 /* Bit or'ed WPS_REFRESH_xxx */
165 unsigned char line_type; 166 unsigned char line_type;
166 167
167 /* How long the subline should be displayed, in 10ths of sec */ 168 /* How long the subline should be displayed, in 10ths of sec */
168 unsigned char time_mult; 169 unsigned char time_mult;
170
171 /* pointer to the next subline in this line */
172 struct wps_subline *next;
169}; 173};
170 174
171/* Description of a line on the WPS. A line is a set of sublines. 175/* Description of a line on the WPS. A line is a set of sublines.
@@ -173,19 +177,18 @@ struct wps_subline {
173 the next subline of the line is displayed. And so on. */ 177 the next subline of the line is displayed. And so on. */
174struct wps_line { 178struct wps_line {
175 179
176 /* Number of sublines in this line */ 180 /* Linked list of all the sublines on this line,
177 signed char num_sublines; 181 * a line *must* have at least one subline so no need to add an extra pointer */
178 182 struct wps_subline sublines;
179 /* Number (0-based) of the subline within this line currently being displayed */ 183 /* pointer to the current subline */
180 signed char curr_subline; 184 struct wps_subline *curr_subline;
181
182 /* Index of the first subline of this line in the subline array.
183 Sublines for this line end where sublines for the next line begin. */
184 unsigned short first_subline_idx;
185 185
186 /* When the next subline of this line should be displayed 186 /* When the next subline of this line should be displayed
187 (absolute time value in ticks) */ 187 (absolute time value in ticks) */
188 long subline_expire_time; 188 long subline_expire_time;
189
190 /* pointer to the next line */
191 struct wps_line *next;
189}; 192};
190 193
191#define VP_DRAW_HIDEABLE 0x1 194#define VP_DRAW_HIDEABLE 0x1
@@ -196,9 +199,7 @@ struct wps_line {
196struct skin_viewport { 199struct skin_viewport {
197 struct viewport vp; /* The LCD viewport struct */ 200 struct viewport vp; /* The LCD viewport struct */
198 struct progressbar *pb; 201 struct progressbar *pb;
199 /* Indexes of the first and last lines belonging to this viewport in the 202 struct wps_line *lines;
200 lines[] array */
201 int first_line, last_line;
202 char hidden_flags; 203 char hidden_flags;
203 char label; 204 char label;
204}; 205};
@@ -259,20 +260,8 @@ struct wps_data
259 bool remote_wps; 260 bool remote_wps;
260#endif 261#endif
261 262
262 /* Number of lines in the WPS. During WPS parsing, this is
263 the index of the line being parsed. */
264 int num_lines;
265
266 /* Number of viewports in the WPS */
267 struct skin_token_list *viewports; 263 struct skin_token_list *viewports;
268 264
269 struct wps_line lines[WPS_MAX_LINES];
270
271 /* Total number of sublines in the WPS. During WPS parsing, this is
272 the index of the subline where the parsed tokens are added to. */
273 int num_sublines;
274 struct wps_subline sublines[WPS_MAX_SUBLINES];
275
276 /* Total number of tokens in the WPS. During WPS parsing, this is 265 /* Total number of tokens in the WPS. During WPS parsing, this is
277 the index of the token being parsed. */ 266 the index of the token being parsed. */
278 int num_tokens; 267 int num_tokens;
@@ -286,12 +275,6 @@ struct wps_data
286 unsigned int button_time_volume; 275 unsigned int button_time_volume;
287}; 276};
288 277
289/* Returns the index of the last subline's token in the token array.
290 line - 0-based line number
291 subline - 0-based subline number within the line
292 */
293int skin_last_token_index(struct wps_data *data, int line, int subline);
294
295/* wps_data end */ 278/* wps_data end */
296 279
297/* wps_state 280/* wps_state