diff options
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r-- | apps/gui/list.h | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h index 253dd9bdbf..7b9ef94ba8 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -243,7 +243,19 @@ extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, | |||
243 | extern bool gui_synclist_do_button(struct gui_synclist * lists, | 243 | extern bool gui_synclist_do_button(struct gui_synclist * lists, |
244 | unsigned *action, | 244 | unsigned *action, |
245 | enum list_wrap); | 245 | enum list_wrap); |
246 | 246 | ||
247 | /* If the list has a pending postponed scheduled announcement, that | ||
248 | may become due before the next get_action tmieout. This function | ||
249 | adjusts the get_action timeout appropriately. */ | ||
250 | extern int list_do_action_timeout(struct gui_synclist *lists, int timeout); | ||
251 | /* This one combines a get_action call (with timeout overridden by | ||
252 | list_do_action_timeout) with the gui_synclist_do_button call, for | ||
253 | convenience. */ | ||
254 | extern bool list_do_action(int context, int timeout, | ||
255 | struct gui_synclist *lists, int *action, | ||
256 | enum list_wrap wrap); | ||
257 | |||
258 | |||
247 | /** Simplelist implementation. | 259 | /** Simplelist implementation. |
248 | USe this if you dont need to reimplement the list code, | 260 | USe this if you dont need to reimplement the list code, |
249 | and just need to show a list | 261 | and just need to show a list |
@@ -262,6 +274,7 @@ struct simplelist_info { | |||
262 | lists == the lists sturct so the callack can get selection and count etc. */ | 274 | lists == the lists sturct so the callack can get selection and count etc. */ |
263 | list_get_icon *get_icon; /* can be NULL */ | 275 | list_get_icon *get_icon; /* can be NULL */ |
264 | list_get_name *get_name; /* NULL if you're using simplelist_addline() */ | 276 | list_get_name *get_name; /* NULL if you're using simplelist_addline() */ |
277 | list_speak_item *get_talk; /* can be NULL to not speak */ | ||
265 | void *callback_data; /* data for callbacks */ | 278 | void *callback_data; /* data for callbacks */ |
266 | }; | 279 | }; |
267 | 280 | ||
@@ -281,20 +294,21 @@ int simplelist_get_line_count(void); | |||
281 | #define SIMPLELIST_ADD_LINE (SIMPLELIST_MAX_LINES+1) | 294 | #define SIMPLELIST_ADD_LINE (SIMPLELIST_MAX_LINES+1) |
282 | void simplelist_addline(int line_number, const char *fmt, ...); | 295 | void simplelist_addline(int line_number, const char *fmt, ...); |
283 | 296 | ||
297 | /* setup the info struct. members not setup in this function need to be assigned manually | ||
298 | members set in this function: | ||
299 | info.hide_selection = false; | ||
300 | info.scroll_all = false; | ||
301 | info.action_callback = NULL; | ||
302 | info.get_icon = NULL; | ||
303 | info.get_name = NULL; | ||
304 | info.get_voice = NULL; | ||
305 | */ | ||
306 | void simplelist_info_init(struct simplelist_info *info, char* title, | ||
307 | int selection_size, int count, void* data); | ||
308 | |||
284 | /* show a list. | 309 | /* show a list. |
285 | if list->action_callback != NULL it is called with the action ACTION_REDRAW | 310 | if list->action_callback != NULL it is called with the action ACTION_REDRAW |
286 | before the list is dislplayed for the first time */ | 311 | before the list is dislplayed for the first time */ |
287 | bool simplelist_show_list(struct simplelist_info *info); | 312 | bool simplelist_show_list(struct simplelist_info *info); |
288 | 313 | ||
289 | /* If the list has a pending postponed scheduled announcement, that | ||
290 | may become due before the next get_action tmieout. This function | ||
291 | adjusts the get_action timeout appropriately. */ | ||
292 | extern int list_do_action_timeout(struct gui_synclist *lists, int timeout); | ||
293 | /* This one combines a get_action call (with timeout overridden by | ||
294 | list_do_action_timeout) with the gui_synclist_do_button call, for | ||
295 | convenience. */ | ||
296 | extern bool list_do_action(int context, int timeout, | ||
297 | struct gui_synclist *lists, int *action, | ||
298 | enum list_wrap wrap); | ||
299 | |||
300 | #endif /* _GUI_LIST_H_ */ | 314 | #endif /* _GUI_LIST_H_ */ |