diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-03-01 12:31:03 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-03-01 12:31:03 +0000 |
commit | 485ff795843597483264b1c9ce1a29a154aa6679 (patch) | |
tree | 63d99c6a73c55f9fb2159633264355209e186b38 /apps/gui/skin_engine/wps_internals.h | |
parent | 735ea2fd1f746bed999e488eee129ff5b3af059a (diff) | |
download | rockbox-485ff795843597483264b1c9ce1a29a154aa6679.tar.gz rockbox-485ff795843597483264b1c9ce1a29a154aa6679.zip |
Add an ability to set a setting to a specific value with a touchscreen action.
example: %T(0,0,20,12, setting_set, repeat, off)
That will set the repeat mode to "off" when it is pressed.
"setting_set" is the action name
"repeat" is the name of the setting in the config files
"off" is the value to set it to (same values as the legal values in the config files)
Not all settings are supported, outright unsupported settings will fail to parse. Some settings might not work too well if they don't apply instantly (Any that work well int he quickscreen should work well here)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29483 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/wps_internals.h')
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index 28697c8b69..86d191f687 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -199,12 +199,20 @@ struct touchregion { | |||
199 | bool armed; /* A region is armed on press. Only armed regions are triggered | 199 | bool armed; /* A region is armed on press. Only armed regions are triggered |
200 | on repeat or release. */ | 200 | on repeat or release. */ |
201 | union { /* Extra data, action dependant */ | 201 | union { /* Extra data, action dependant */ |
202 | void* data; | 202 | struct touchsetting { |
203 | const struct settings_list *setting; /* setting being controlled */ | ||
204 | union { /* Value to set the setting to for ACTION_SETTING_SET */ | ||
205 | int number; | ||
206 | char* text; | ||
207 | } value; | ||
208 | } setting_data; | ||
203 | int value; | 209 | int value; |
204 | }; | 210 | }; |
205 | long last_press; /* last tick this was pressed */ | 211 | long last_press; /* last tick this was pressed */ |
206 | }; | 212 | }; |
207 | 213 | ||
214 | |||
215 | |||
208 | struct touchregion_lastpress { | 216 | struct touchregion_lastpress { |
209 | struct touchregion *region; | 217 | struct touchregion *region; |
210 | long timeout; | 218 | long timeout; |