From 42ffbf9bbc1936e22c6bae5b5b6ce10d2a4552cf Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Mon, 15 Mar 2004 08:27:51 +0000 Subject: Second step of the voice-UI: Option values are spoken, if they are translatable strings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4383 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apps/settings.h') diff --git a/apps/settings.h b/apps/settings.h index 3634087cab..ab3cd6fca8 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -60,6 +60,9 @@ #define FF_REWIND_45000 12 #define FF_REWIND_60000 13 +/* convenience macro to have both string and ID as arguments */ +#define STR(id) str(id), id + struct user_settings { @@ -203,6 +206,11 @@ struct user_settings enum optiontype { INT, BOOL }; +struct opt_items { + char* string; + int voice_id; +}; + /* prototypes */ int settings_save(void); @@ -215,11 +223,13 @@ void settings_display(void); bool settings_load_config(char* file); bool settings_save_config(void); bool set_bool_options(char* string, bool* variable, - char* yes_str, char* no_str, void (*function)(bool)); + char* yes_str, int yes_voice, + char* no_str, int no_voice, + void (*function)(bool)); bool set_bool(char* string, bool* variable ); bool set_option(char* string, void* variable, enum optiontype type, - char* options[], int numoptions, void (*function)(int)); + struct opt_items* options, int numoptions, void (*function)(int)); bool set_int(char* string, char* unit, int* variable, void (*function)(int), int step, int min, int max ); bool set_time(char* string, int timedate[]); -- cgit v1.2.3