summaryrefslogtreecommitdiff
path: root/apps/gui/list.h
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-01-22 04:24:26 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-01-22 04:24:26 +0000
commitd3a03b679f196be076043d475b9512338fd6c8bb (patch)
treec4c57a157a46d09a7037c39e290182a8c43deb71 /apps/gui/list.h
parentbfe740712a3513dbb4143336cbc5e9aaab09d732 (diff)
downloadrockbox-d3a03b679f196be076043d475b9512338fd6c8bb.tar.gz
rockbox-d3a03b679f196be076043d475b9512338fd6c8bb.zip
Horizontal screen scrolling part 3 (by Shachar Liberman)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r--apps/gui/list.h45
1 files changed, 22 insertions, 23 deletions
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,
126 * a buffer when it's not necessary) 126 * a buffer when it's not necessary)
127 * Returns a pointer to a string that contains the text to display 127 * Returns a pointer to a string that contains the text to display
128 */ 128 */
129
130typedef char * list_get_name(int selected_item, 129typedef char * list_get_name(int selected_item,
131 void * data, 130 void * data,
132 char *buffer); 131 char *buffer);
133 132
134struct gui_list 133struct gui_list
135{ 134{
136 int offsetval; /* value of screen offset */
137 int nb_items; 135 int nb_items;
138 int selected_item; 136 int selected_item;
139 bool cursor_flash_state; 137 bool cursor_flash_state;
140 int start_item; /* the item that is displayed at the top of the screen */ 138 int start_item; /* the item that is displayed at the top of the screen */
141 139
140#ifdef HAVE_LCD_BITMAP
141 int offset_position; /* the list's screen scroll placement in pixels */
142#endif
142 list_get_icon *callback_get_item_icon; 143 list_get_icon *callback_get_item_icon;
143 list_get_name *callback_get_item_name; 144 list_get_name *callback_get_item_name;
144 145
@@ -234,13 +235,6 @@ extern void gui_list_draw(struct gui_list * gui_list);
234 * (Item 0 gets selected if the end of the list is reached) 235 * (Item 0 gets selected if the end of the list is reached)
235 * - gui_list : the list structure 236 * - gui_list : the list structure
236 */ 237 */
237
238extern void gui_list_screen_scroll_step(int ofs);
239/* parse global setting to static int */
240
241extern void gui_list_screen_scroll_out_of_view(bool enable);
242/* parse global setting to static bool */
243
244extern void gui_list_select_next(struct gui_list * gui_list); 238extern void gui_list_select_next(struct gui_list * gui_list);
245 239
246/* 240/*
@@ -250,27 +244,32 @@ extern void gui_list_select_next(struct gui_list * gui_list);
250 */ 244 */
251extern void gui_list_select_previous(struct gui_list * gui_list); 245extern void gui_list_select_previous(struct gui_list * gui_list);
252 246
253/* 247#ifdef HAVE_LCD_BITMAP
254 * Go to next page if any, else selects the last item in the list
255 * - gui_list : the list structure
256 * - nb_lines : the number of lines to try to move the cursor
257 */
258
259extern void gui_list_offset_right(struct gui_list * gui_list);
260
261/* 248/*
262 * Makes all the item in the list scroll by one step to the right. 249 * Makes all the item in the list scroll by one step to the right.
263 * Should stop increasing the value when reaching the widest item value 250 * Should stop increasing the value when reaching the widest item value
264 * in the list. 251 * in the list.
265 */ 252 */
266 253void gui_list_scroll_right(struct gui_list * gui_list);
267extern void gui_list_offset_left(struct gui_list * gui_list);
268 254
269/* 255/*
270 * Makes all the item in the list scroll by one step to the left. 256 * Makes all the item in the list scroll by one step to the left.
271 * stops at starting position. 257 * stops at starting position.
272 */ 258 */
273 259void gui_list_scroll_left(struct gui_list * gui_list);
260
261/* parse global setting to static int */
262extern void gui_list_screen_scroll_step(int ofs);
263
264/* parse global setting to static bool */
265extern void gui_list_screen_scroll_out_of_view(bool enable);
266#endif /* HAVE_LCD_BITMAP */
267
268/*
269 * Go to next page if any, else selects the last item in the list
270 * - gui_list : the list structure
271 * - nb_lines : the number of lines to try to move the cursor
272 */
274extern void gui_list_select_next_page(struct gui_list * gui_list, 273extern void gui_list_select_next_page(struct gui_list * gui_list,
275 int nb_lines); 274 int nb_lines);
276 275
@@ -347,8 +346,6 @@ extern void gui_synclist_select_item(struct gui_synclist * lists,
347 int item_number); 346 int item_number);
348extern void gui_synclist_select_next(struct gui_synclist * lists); 347extern void gui_synclist_select_next(struct gui_synclist * lists);
349extern void gui_synclist_select_previous(struct gui_synclist * lists); 348extern void gui_synclist_select_previous(struct gui_synclist * lists);
350extern void gui_synclist_offset_right(struct gui_synclist * lists);
351extern void gui_synclist_offset_left(struct gui_synclist * lists);
352extern void gui_synclist_select_next_page(struct gui_synclist * lists, 349extern void gui_synclist_select_next_page(struct gui_synclist * lists,
353 enum screen_type screen); 350 enum screen_type screen);
354extern void gui_synclist_select_previous_page(struct gui_synclist * lists, 351extern void gui_synclist_select_previous_page(struct gui_synclist * lists,
@@ -357,6 +354,8 @@ extern void gui_synclist_add_item(struct gui_synclist * lists);
357extern void gui_synclist_del_item(struct gui_synclist * lists); 354extern void gui_synclist_del_item(struct gui_synclist * lists);
358extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll); 355extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll);
359extern void gui_synclist_flash(struct gui_synclist * lists); 356extern void gui_synclist_flash(struct gui_synclist * lists);
357void gui_synclist_scroll_right(struct gui_synclist * lists);
358void gui_synclist_scroll_left(struct gui_synclist * lists);
360 359
361/* 360/*
362 * Do the action implied by the given button, 361 * Do the action implied by the given button,