summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/wps_internals.h
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-27 08:01:58 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-27 08:01:58 +0000
commit87aa86cedd27445e51b0ad38dbc7cf2bdaa42364 (patch)
tree09d19881a5a48bbd3979877bfd08e5a109e6fa56 /apps/gui/skin_engine/wps_internals.h
parent969381322d080a636d961a2e4505a9d88f04147d (diff)
downloadrockbox-87aa86cedd27445e51b0ad38dbc7cf2bdaa42364.tar.gz
rockbox-87aa86cedd27445e51b0ad38dbc7cf2bdaa42364.zip
Skin variables for touchscreen targets (origional implementation by Jens Theeß)
%vs(name, [set|inc|dec], value [,max]) - name is the id, set sets the value, inc increments by value, dec decrements by value %vg(name) - get the current value %vl(name [,timeout]) - 'has it changed in [timeout]'? values start at 1 and are all reset to 1 on skin load git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29655 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/wps_internals.h')
-rw-r--r--apps/gui/skin_engine/wps_internals.h47
1 files changed, 36 insertions, 11 deletions
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index 0f5cb6df0c..4714609c1e 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -199,12 +199,12 @@ struct touchregion {
199 on repeat or release. */ 199 on repeat or release. */
200 union { /* Extra data, action dependant */ 200 union { /* Extra data, action dependant */
201 struct touchsetting { 201 struct touchsetting {
202 const struct settings_list *setting; /* setting being controlled */ 202 const struct settings_list *setting; /* setting being controlled */
203 union { /* Value to set the setting to for ACTION_SETTING_SET */ 203 union { /* Value to set the setting to for ACTION_SETTING_SET */
204 int number; 204 int number;
205 char* text; 205 char* text;
206 } value; 206 } value;
207 } setting_data; 207 } setting_data;
208 int value; 208 int value;
209 }; 209 };
210 long last_press; /* last tick this was pressed */ 210 long last_press; /* last tick this was pressed */
@@ -272,6 +272,24 @@ struct logical_if {
272 int num_options; 272 int num_options;
273}; 273};
274 274
275#ifdef HAVE_SKIN_VARIABLES
276struct skin_var {
277 const char *label;
278 int value;
279 long last_changed;
280};
281struct skin_var_lastchange {
282 struct skin_var *var;
283 long timeout;
284};
285struct skin_var_changer {
286 struct skin_var *var;
287 int newval;
288 bool direct; /* true to make val=newval, false for val += newval */
289 int max;
290};
291#endif
292
275/* wps_data 293/* wps_data
276 this struct holds all necessary data which describes the 294 this struct holds all necessary data which describes the
277 viewable content of a wps */ 295 viewable content of a wps */
@@ -296,6 +314,10 @@ struct wps_data
296 int playback_aa_slot; 314 int playback_aa_slot;
297#endif 315#endif
298 316
317#ifdef HAVE_SKIN_VARIABLES
318 struct skin_token_list *skinvars;
319#endif
320
299#ifdef HAVE_LCD_BITMAP 321#ifdef HAVE_LCD_BITMAP
300 bool peak_meter_enabled; 322 bool peak_meter_enabled;
301 bool wps_sb_tag; 323 bool wps_sb_tag;
@@ -364,17 +386,20 @@ const char *get_radio_token(struct wps_token *token, int preset_offset,
364#endif 386#endif
365 387
366enum skin_find_what { 388enum skin_find_what {
367 SKIN_FIND_VP = 0, 389 SKIN_FIND_VP = 0,
368 SKIN_FIND_UIVP, 390 SKIN_FIND_UIVP,
369#ifdef HAVE_LCD_BITMAP 391#ifdef HAVE_LCD_BITMAP
370 SKIN_FIND_IMAGE, 392 SKIN_FIND_IMAGE,
371#endif 393#endif
372#ifdef HAVE_TOUCHSCREEN 394#ifdef HAVE_TOUCHSCREEN
373 SKIN_FIND_TOUCHREGION, 395 SKIN_FIND_TOUCHREGION,
396#endif
397#ifdef HAVE_SKIN_VARIABLES
398 SKIN_VARIABLE,
374#endif 399#endif
375}; 400};
376void *skin_find_item(const char *label, enum skin_find_what what, 401void *skin_find_item(const char *label, enum skin_find_what what,
377 struct wps_data *data); 402 struct wps_data *data);
378#ifdef SIMULATOR 403#ifdef SIMULATOR
379#define DEBUG_SKIN_ENGINE 404#define DEBUG_SKIN_ENGINE
380extern bool debug_wps; 405extern bool debug_wps;