diff options
Diffstat (limited to 'apps/settings_list.h')
-rw-r--r-- | apps/settings_list.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/apps/settings_list.h b/apps/settings_list.h index 8aa7863e55..b738076607 100644 --- a/apps/settings_list.h +++ b/apps/settings_list.h | |||
@@ -78,13 +78,24 @@ struct choice_setting { | |||
78 | void (*option_callback)(int); | 78 | void (*option_callback)(int); |
79 | int count; | 79 | int count; |
80 | union { | 80 | union { |
81 | unsigned char **desc; | 81 | const unsigned char **desc; |
82 | int *talks; | 82 | const int *talks; |
83 | }; | 83 | }; |
84 | }; | 84 | }; |
85 | #define F_CHOICE_SETTING 0x100 | 85 | #define F_CHOICE_SETTING 0x100 |
86 | #define F_CHOICETALKS 0x200 /* uses .talks in the above struct for the talks */ | 86 | #define F_CHOICETALKS 0x200 /* uses .talks in the above struct for the talks */ |
87 | /* and cfg_vals for the strings to display */ | 87 | /* and cfg_vals for the strings to display */ |
88 | |||
89 | struct table_setting { | ||
90 | void (*option_callback)(int); | ||
91 | void (*formatter)(char*, size_t, int, const char*); | ||
92 | long (*get_talk_id)(int); | ||
93 | int unit; | ||
94 | int count; | ||
95 | const int * values; | ||
96 | }; | ||
97 | #define F_TABLE_SETTING 0x2000 | ||
98 | #define F_ALLOW_ARBITRARY_VALS 0x4000 | ||
88 | /* these use the _isfunc_type type for the function */ | 99 | /* these use the _isfunc_type type for the function */ |
89 | /* typedef int (*_isfunc_type)(void); */ | 100 | /* typedef int (*_isfunc_type)(void); */ |
90 | #define F_MIN_ISFUNC 0x100000 /* min(above) is function pointer to above type */ | 101 | #define F_MIN_ISFUNC 0x100000 /* min(above) is function pointer to above type */ |
@@ -94,8 +105,8 @@ struct choice_setting { | |||
94 | #define F_THEMESETTING 0x0800000 | 105 | #define F_THEMESETTING 0x0800000 |
95 | #define F_RECSETTING 0x1000000 | 106 | #define F_RECSETTING 0x1000000 |
96 | 107 | ||
97 | #define F_NVRAM_BYTES_MASK 0xE000 /*0-4 bytes can be stored */ | 108 | #define F_NVRAM_BYTES_MASK 0xE0000 /*0-4 bytes can be stored */ |
98 | #define F_NVRAM_MASK_SHIFT 13 | 109 | #define F_NVRAM_MASK_SHIFT 17 |
99 | #define NVRAM_CONFIG_VERSION 4 | 110 | #define NVRAM_CONFIG_VERSION 4 |
100 | /* Above define should be bumped if | 111 | /* Above define should be bumped if |
101 | - a new NVRAM setting is added between 2 other NVRAM settings | 112 | - a new NVRAM setting is added between 2 other NVRAM settings |
@@ -107,7 +118,7 @@ struct choice_setting { | |||
107 | #define F_NO_WRAP 0x1000 /* used if the list should not wrap */ | 118 | #define F_NO_WRAP 0x1000 /* used if the list should not wrap */ |
108 | 119 | ||
109 | struct settings_list { | 120 | struct settings_list { |
110 | uint32_t flags; /* ____ ___R TFFF ____ NNN_ PTVC IFRB STTT */ | 121 | uint32_t flags; /* ____ ___R TFFF NNN_ _ATW PTVC IFRB STTT */ |
111 | void *setting; | 122 | void *setting; |
112 | int lang_id; /* -1 for none */ | 123 | int lang_id; /* -1 for none */ |
113 | union storage_type default_val; | 124 | union storage_type default_val; |
@@ -115,12 +126,13 @@ struct settings_list { | |||
115 | const char *cfg_vals; /*comma seperated legal values, or NULL */ | 126 | const char *cfg_vals; /*comma seperated legal values, or NULL */ |
116 | /* used with F_T_UCHARPTR this is the folder prefix */ | 127 | /* used with F_T_UCHARPTR this is the folder prefix */ |
117 | union { | 128 | union { |
118 | void *RESERVED; /* to stop compile errors, will be removed */ | 129 | const void *RESERVED; /* to stop compile errors, will be removed */ |
119 | struct sound_setting *sound_setting; /* use F_T_SOUND for this */ | 130 | const struct sound_setting *sound_setting; /* use F_T_SOUND for this */ |
120 | struct bool_setting *bool_setting; /* F_BOOL_SETTING */ | 131 | const struct bool_setting *bool_setting; /* F_BOOL_SETTING */ |
121 | struct filename_setting *filename_setting; /* use F_FILENAME */ | 132 | const struct filename_setting *filename_setting; /* use F_FILENAME */ |
122 | struct int_setting *int_setting; /* use F_INT_SETTING */ | 133 | const struct int_setting *int_setting; /* use F_INT_SETTING */ |
123 | struct choice_setting *choice_setting; /* F_CHOICE_SETTING */ | 134 | const struct choice_setting *choice_setting; /* F_CHOICE_SETTING */ |
135 | const struct table_setting *table_setting; /* F_TABLE_SETTING */ | ||
124 | }; | 136 | }; |
125 | }; | 137 | }; |
126 | 138 | ||