diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-01-22 04:24:26 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-01-22 04:24:26 +0000 |
commit | d3a03b679f196be076043d475b9512338fd6c8bb (patch) | |
tree | c4c57a157a46d09a7037c39e290182a8c43deb71 /apps/gui/list.h | |
parent | bfe740712a3513dbb4143336cbc5e9aaab09d732 (diff) | |
download | rockbox-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.h | 45 |
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 | |||
130 | typedef char * list_get_name(int selected_item, | 129 | typedef char * list_get_name(int selected_item, |
131 | void * data, | 130 | void * data, |
132 | char *buffer); | 131 | char *buffer); |
133 | 132 | ||
134 | struct gui_list | 133 | struct 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 | |||
238 | extern void gui_list_screen_scroll_step(int ofs); | ||
239 | /* parse global setting to static int */ | ||
240 | |||
241 | extern void gui_list_screen_scroll_out_of_view(bool enable); | ||
242 | /* parse global setting to static bool */ | ||
243 | |||
244 | extern void gui_list_select_next(struct gui_list * gui_list); | 238 | extern 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 | */ |
251 | extern void gui_list_select_previous(struct gui_list * gui_list); | 245 | extern 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 | |||
259 | extern 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 | 253 | void gui_list_scroll_right(struct gui_list * gui_list); | |
267 | extern 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 | 259 | void gui_list_scroll_left(struct gui_list * gui_list); | |
260 | |||
261 | /* parse global setting to static int */ | ||
262 | extern void gui_list_screen_scroll_step(int ofs); | ||
263 | |||
264 | /* parse global setting to static bool */ | ||
265 | extern 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 | */ | ||
274 | extern void gui_list_select_next_page(struct gui_list * gui_list, | 273 | extern 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); |
348 | extern void gui_synclist_select_next(struct gui_synclist * lists); | 347 | extern void gui_synclist_select_next(struct gui_synclist * lists); |
349 | extern void gui_synclist_select_previous(struct gui_synclist * lists); | 348 | extern void gui_synclist_select_previous(struct gui_synclist * lists); |
350 | extern void gui_synclist_offset_right(struct gui_synclist * lists); | ||
351 | extern void gui_synclist_offset_left(struct gui_synclist * lists); | ||
352 | extern void gui_synclist_select_next_page(struct gui_synclist * lists, | 349 | extern void gui_synclist_select_next_page(struct gui_synclist * lists, |
353 | enum screen_type screen); | 350 | enum screen_type screen); |
354 | extern void gui_synclist_select_previous_page(struct gui_synclist * lists, | 351 | 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); | |||
357 | extern void gui_synclist_del_item(struct gui_synclist * lists); | 354 | extern void gui_synclist_del_item(struct gui_synclist * lists); |
358 | extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll); | 355 | extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll); |
359 | extern void gui_synclist_flash(struct gui_synclist * lists); | 356 | extern void gui_synclist_flash(struct gui_synclist * lists); |
357 | void gui_synclist_scroll_right(struct gui_synclist * lists); | ||
358 | void 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, |