summaryrefslogtreecommitdiff
path: root/apps/gui/list.h
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-03-11 10:52:36 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-03-11 10:52:36 +0000
commit2eefb5acb847eeb2d10bac860d37c4cef00be67b (patch)
treebd08d1908d01e56c10a442c0b2fd8ef224fb982f /apps/gui/list.h
parent408dfd65ad61181b3612cb11574c9ff547e42d24 (diff)
Optimized the gui list code performance, including automatic frame dropping and cpu boosting when button events are getting queued. Improved scrollwheel acceleration code is needed to notice a real change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12721 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r--apps/gui/list.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h
index f6e4a5d615..26f58761b6 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -91,6 +91,10 @@ struct gui_list
int selected_size;
/* The data that will be passed to the callback function YOU implement */
void * data;
+ /* 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;
/* The optional title, set to NULL for none */
char *title;
/* Cache the width of the title string in pixels/characters */
@@ -162,6 +166,7 @@ extern void gui_list_screen_scroll_out_of_view(bool enable);
struct gui_synclist
{
struct gui_list gui_list[NB_SCREENS];
+ struct gui_list *last_displayed[NB_SCREENS];
};
extern void gui_synclist_init(