From 485ff795843597483264b1c9ce1a29a154aa6679 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 1 Mar 2011 12:31:03 +0000 Subject: 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 --- apps/gui/skin_engine/wps_internals.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'apps/gui/skin_engine/wps_internals.h') 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 { bool armed; /* A region is armed on press. Only armed regions are triggered on repeat or release. */ union { /* Extra data, action dependant */ - void* data; + struct touchsetting { + const struct settings_list *setting; /* setting being controlled */ + union { /* Value to set the setting to for ACTION_SETTING_SET */ + int number; + char* text; + } value; + } setting_data; int value; }; long last_press; /* last tick this was pressed */ }; + + struct touchregion_lastpress { struct touchregion *region; long timeout; -- cgit v1.2.3