From d3a03b679f196be076043d475b9512338fd6c8bb Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Sun, 22 Jan 2006 04:24:26 +0000 Subject: Horizontal screen scrolling part 3 (by Shachar Liberman) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8414 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/list.h | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'apps/gui/list.h') diff --git a/apps/gui/list.h b/apps/gui/list.h index e177f5ef75..8643c4d047 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h @@ -126,19 +126,20 @@ typedef void list_get_icon(int selected_item, * a buffer when it's not necessary) * Returns a pointer to a string that contains the text to display */ - typedef char * list_get_name(int selected_item, void * data, char *buffer); struct gui_list { - int offsetval; /* value of screen offset */ int nb_items; int selected_item; bool cursor_flash_state; int start_item; /* the item that is displayed at the top of the screen */ +#ifdef HAVE_LCD_BITMAP + int offset_position; /* the list's screen scroll placement in pixels */ +#endif list_get_icon *callback_get_item_icon; list_get_name *callback_get_item_name; @@ -234,13 +235,6 @@ extern void gui_list_draw(struct gui_list * gui_list); * (Item 0 gets selected if the end of the list is reached) * - gui_list : the list structure */ - -extern void gui_list_screen_scroll_step(int ofs); -/* parse global setting to static int */ - -extern void gui_list_screen_scroll_out_of_view(bool enable); -/* parse global setting to static bool */ - extern void gui_list_select_next(struct gui_list * gui_list); /* @@ -250,27 +244,32 @@ extern void gui_list_select_next(struct gui_list * gui_list); */ extern void gui_list_select_previous(struct gui_list * gui_list); -/* - * Go to next page if any, else selects the last item in the list - * - gui_list : the list structure - * - nb_lines : the number of lines to try to move the cursor - */ - -extern void gui_list_offset_right(struct gui_list * gui_list); - +#ifdef HAVE_LCD_BITMAP /* * Makes all the item in the list scroll by one step to the right. * Should stop increasing the value when reaching the widest item value * in the list. */ - -extern void gui_list_offset_left(struct gui_list * gui_list); +void gui_list_scroll_right(struct gui_list * gui_list); /* * Makes all the item in the list scroll by one step to the left. * stops at starting position. - */ - + */ +void gui_list_scroll_left(struct gui_list * gui_list); + +/* parse global setting to static int */ +extern void gui_list_screen_scroll_step(int ofs); + +/* parse global setting to static bool */ +extern void gui_list_screen_scroll_out_of_view(bool enable); +#endif /* HAVE_LCD_BITMAP */ + +/* + * Go to next page if any, else selects the last item in the list + * - gui_list : the list structure + * - nb_lines : the number of lines to try to move the cursor + */ extern void gui_list_select_next_page(struct gui_list * gui_list, int nb_lines); @@ -347,8 +346,6 @@ extern void gui_synclist_select_item(struct gui_synclist * lists, int item_number); extern void gui_synclist_select_next(struct gui_synclist * lists); extern void gui_synclist_select_previous(struct gui_synclist * lists); -extern void gui_synclist_offset_right(struct gui_synclist * lists); -extern void gui_synclist_offset_left(struct gui_synclist * lists); extern void gui_synclist_select_next_page(struct gui_synclist * lists, enum screen_type screen); extern void gui_synclist_select_previous_page(struct gui_synclist * lists, @@ -357,6 +354,8 @@ extern void gui_synclist_add_item(struct gui_synclist * lists); extern void gui_synclist_del_item(struct gui_synclist * lists); extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll); extern void gui_synclist_flash(struct gui_synclist * lists); +void gui_synclist_scroll_right(struct gui_synclist * lists); +void gui_synclist_scroll_left(struct gui_synclist * lists); /* * Do the action implied by the given button, -- cgit v1.2.3