diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/list.c | 7 | ||||
-rw-r--r-- | apps/gui/list.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index b0d7829f9a..425cab9a0f 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -880,6 +880,13 @@ bool list_do_action(int context, int timeout, | |||
880 | return gui_synclist_do_button(lists, action, wrap); | 880 | return gui_synclist_do_button(lists, action, wrap); |
881 | } | 881 | } |
882 | 882 | ||
883 | bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, | ||
884 | enum screen_type screen, int item) | ||
885 | { | ||
886 | int nb_lines = list_get_nb_lines(lists, screen); | ||
887 | return (unsigned)(item - lists->start_item[screen]) < (unsigned) nb_lines; | ||
888 | } | ||
889 | |||
883 | /* Simple use list implementation */ | 890 | /* Simple use list implementation */ |
884 | static int simplelist_line_count = 0, simplelist_line_remaining; | 891 | static int simplelist_line_count = 0, simplelist_line_remaining; |
885 | static int simplelist_line_pos; | 892 | static int simplelist_line_pos; |
diff --git a/apps/gui/list.h b/apps/gui/list.h index ef08a9e220..1be9da496a 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h | |||
@@ -167,6 +167,8 @@ extern void gui_synclist_set_title(struct gui_synclist * lists, char * title, | |||
167 | enum themable_icons icon); | 167 | enum themable_icons icon); |
168 | extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, | 168 | extern void gui_synclist_hide_selection_marker(struct gui_synclist *lists, |
169 | bool hide); | 169 | bool hide); |
170 | extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, | ||
171 | enum screen_type screen, int item); | ||
170 | 172 | ||
171 | #if CONFIG_CODEC == SWCODEC | 173 | #if CONFIG_CODEC == SWCODEC |
172 | extern bool gui_synclist_keyclick_callback(int action, void* data); | 174 | extern bool gui_synclist_keyclick_callback(int action, void* data); |