diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-12-17 02:37:21 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-12-17 02:37:21 +0000 |
commit | f5ec3e49e0687eda7b9059942c23321f9878becf (patch) | |
tree | 7961798bfa368d0e0d191317b24ff0918eb981ca /apps/gui/list.h | |
parent | f6039466fb275f55be16113bbbf46872f90862c8 (diff) |
remove the duplicated gui_list struct and only duplicate the members which are actually different on each screen. should translate to a smaller bin and easier code (users shouldnt notice any difference)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15947 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r-- | apps/gui/list.h | 22 |
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); typedef int list_get_color(int selected_item, void * data); #endif -struct gui_list +struct gui_synclist { /* defines wether the list should stop when reaching the top/bottom * or should continue (by going to bottom/top) */ @@ -93,15 +93,15 @@ struct gui_list int nb_items; int selected_item; - int start_item; /* the item that is displayed at the top of the screen */ + int start_item[NB_SCREENS]; /* the item that is displayed at the top of the screen */ /* the number of lines that are selected at the same time */ int selected_size; /* These are used to calculate how much of the screen content we need to redraw. */ int last_displayed_selected_item; - int last_displayed_start_item; + int last_displayed_start_item[NB_SCREENS]; #ifdef HAVE_LCD_BITMAP - int offset_position; /* the list's screen scroll placement in pixels */ + int offset_position[NB_SCREENS]; /* the list's screen scroll placement in pixels */ #endif /* Cache the width of the title string in pixels/characters */ int title_width; @@ -111,7 +111,6 @@ struct gui_list list_get_name *callback_get_item_name; list_speak_item *callback_speak_item; - struct screen * display; /* The data that will be passed to the callback function YOU implement */ void * data; /* The optional title, set to NULL for none */ @@ -195,19 +194,6 @@ extern void gui_list_screen_scroll_out_of_view(bool enable); #define gui_list_limit_scroll(gui_list, scroll) \ (gui_list)->limit_scroll=scroll -/* - * This part handles as many lists as there are connected screens - * (the api is similar to the ones above) - * The lists on the screens are synchronized ; - * theirs items and selected items are the same, but of course, - * they can be displayed on screens with different sizes - * The final aim is to let the programmer handle many lists in one - * function call and make its code independant from the number of screens - */ -struct gui_synclist -{ - struct gui_list gui_list[NB_SCREENS]; -}; extern void gui_synclist_init( struct gui_synclist * lists, |