summaryrefslogtreecommitdiff
path: root/apps/gui/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r--apps/gui/list.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 742e30dbaa..3bd3d25c49 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -82,7 +82,7 @@ typedef int list_speak_item(int selected_item, void * data);
82typedef int list_get_color(int selected_item, void * data); 82typedef int list_get_color(int selected_item, void * data);
83#endif 83#endif
84 84
85struct gui_list 85struct gui_synclist
86{ 86{
87 /* defines wether the list should stop when reaching the top/bottom 87 /* defines wether the list should stop when reaching the top/bottom
88 * or should continue (by going to bottom/top) */ 88 * or should continue (by going to bottom/top) */
@@ -93,15 +93,15 @@ struct gui_list
93 93
94 int nb_items; 94 int nb_items;
95 int selected_item; 95 int selected_item;
96 int start_item; /* the item that is displayed at the top of the screen */ 96 int start_item[NB_SCREENS]; /* the item that is displayed at the top of the screen */
97 /* the number of lines that are selected at the same time */ 97 /* the number of lines that are selected at the same time */
98 int selected_size; 98 int selected_size;
99 /* These are used to calculate how much of the screen content we need 99 /* These are used to calculate how much of the screen content we need
100 to redraw. */ 100 to redraw. */
101 int last_displayed_selected_item; 101 int last_displayed_selected_item;
102 int last_displayed_start_item; 102 int last_displayed_start_item[NB_SCREENS];
103#ifdef HAVE_LCD_BITMAP 103#ifdef HAVE_LCD_BITMAP
104 int offset_position; /* the list's screen scroll placement in pixels */ 104 int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */
105#endif 105#endif
106 /* Cache the width of the title string in pixels/characters */ 106 /* Cache the width of the title string in pixels/characters */
107 int title_width; 107 int title_width;
@@ -111,7 +111,6 @@ struct gui_list
111 list_get_name *callback_get_item_name; 111 list_get_name *callback_get_item_name;
112 list_speak_item *callback_speak_item; 112 list_speak_item *callback_speak_item;
113 113
114 struct screen * display;
115 /* The data that will be passed to the callback function YOU implement */ 114 /* The data that will be passed to the callback function YOU implement */
116 void * data; 115 void * data;
117 /* The optional title, set to NULL for none */ 116 /* The optional title, set to NULL for none */
@@ -195,19 +194,6 @@ extern void gui_list_screen_scroll_out_of_view(bool enable);
195#define gui_list_limit_scroll(gui_list, scroll) \ 194#define gui_list_limit_scroll(gui_list, scroll) \
196 (gui_list)->limit_scroll=scroll 195 (gui_list)->limit_scroll=scroll
197 196
198/*
199 * This part handles as many lists as there are connected screens
200 * (the api is similar to the ones above)
201 * The lists on the screens are synchronized ;
202 * theirs items and selected items are the same, but of course,
203 * they can be displayed on screens with different sizes
204 * The final aim is to let the programmer handle many lists in one
205 * function call and make its code independant from the number of screens
206 */
207struct gui_synclist
208{
209 struct gui_list gui_list[NB_SCREENS];
210};
211 197
212extern void gui_synclist_init( 198extern void gui_synclist_init(
213 struct gui_synclist * lists, 199 struct gui_synclist * lists,