summaryrefslogtreecommitdiff
path: root/apps/gui/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r--apps/gui/list.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 25fb07d7c4..e177f5ef75 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -33,12 +33,16 @@
33#define LIST_PREV BUTTON_UP 33#define LIST_PREV BUTTON_UP
34#define LIST_PGUP (BUTTON_ON | BUTTON_UP) 34#define LIST_PGUP (BUTTON_ON | BUTTON_UP)
35#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) 35#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN)
36#define LIST_PGRIGHT (BUTTON_ON | BUTTON_RIGHT)
37#define LIST_PGLEFT (BUTTON_ON | BUTTON_LEFT)
36 38
37#ifdef CONFIG_REMOTE_KEYPAD 39#ifdef CONFIG_REMOTE_KEYPAD
38#define LIST_RC_NEXT BUTTON_RC_FF 40#define LIST_RC_NEXT BUTTON_RC_FF
39#define LIST_RC_PREV BUTTON_RC_REW 41#define LIST_RC_PREV BUTTON_RC_REW
40#define LIST_RC_PGUP BUTTON_RC_SOURCE 42#define LIST_RC_PGUP BUTTON_RC_SOURCE
41#define LIST_RC_PGDN BUTTON_RC_BITRATE 43#define LIST_RC_PGDN BUTTON_RC_BITRATE
44#define LIST_RC_PGRIGHT (BUTTON_RC_VOL_UP)
45#define LIST_RC_PGLEFT (BUTTON_RC_VOL_DOWN)
42#endif /* CONFIG_REMOTE_KEYPAD */ 46#endif /* CONFIG_REMOTE_KEYPAD */
43 47
44#elif CONFIG_KEYPAD == RECORDER_PAD 48#elif CONFIG_KEYPAD == RECORDER_PAD
@@ -46,6 +50,8 @@
46#define LIST_PREV BUTTON_UP 50#define LIST_PREV BUTTON_UP
47#define LIST_PGUP (BUTTON_ON | BUTTON_UP) 51#define LIST_PGUP (BUTTON_ON | BUTTON_UP)
48#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) 52#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN)
53#define LIST_PGRIGHT (BUTTON_ON | BUTTON_RIGHT)
54#define LIST_PGLEFT (BUTTON_ON | BUTTON_LEFT)
49 55
50#ifdef CONFIG_REMOTE_KEYPAD 56#ifdef CONFIG_REMOTE_KEYPAD
51#define LIST_RC_NEXT BUTTON_RC_RIGHT 57#define LIST_RC_NEXT BUTTON_RC_RIGHT
@@ -64,6 +70,8 @@
64#elif CONFIG_KEYPAD == ONDIO_PAD 70#elif CONFIG_KEYPAD == ONDIO_PAD
65#define LIST_NEXT BUTTON_DOWN 71#define LIST_NEXT BUTTON_DOWN
66#define LIST_PREV BUTTON_UP 72#define LIST_PREV BUTTON_UP
73#define LIST_PGRIGHT (BUTTON_MENU | BUTTON_RIGHT)
74#define LIST_PGLEFT (BUTTON_MENU | BUTTON_LEFT)
67 75
68#elif (CONFIG_KEYPAD == IPOD_4G_PAD) 76#elif (CONFIG_KEYPAD == IPOD_4G_PAD)
69#define LIST_NEXT BUTTON_SCROLL_FWD 77#define LIST_NEXT BUTTON_SCROLL_FWD
@@ -78,6 +86,8 @@
78#define LIST_PREV BUTTON_UP 86#define LIST_PREV BUTTON_UP
79#define LIST_PGUP (BUTTON_ON | BUTTON_UP) 87#define LIST_PGUP (BUTTON_ON | BUTTON_UP)
80#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN) 88#define LIST_PGDN (BUTTON_ON | BUTTON_DOWN)
89#define LIST_PGRIGHT (BUTTON_ON | BUTTON_RIGHT)
90#define LIST_PGLEFT (BUTTON_ON | BUTTON_LEFT)
81 91
82#elif CONFIG_KEYPAD == IAUDIO_X5_PAD 92#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
83#define LIST_NEXT BUTTON_DOWN 93#define LIST_NEXT BUTTON_DOWN
@@ -116,12 +126,14 @@ typedef void list_get_icon(int selected_item,
116 * a buffer when it's not necessary) 126 * a buffer when it's not necessary)
117 * 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
118 */ 128 */
129
119typedef char * list_get_name(int selected_item, 130typedef char * list_get_name(int selected_item,
120 void * data, 131 void * data,
121 char *buffer); 132 char *buffer);
122 133
123struct gui_list 134struct gui_list
124{ 135{
136 int offsetval; /* value of screen offset */
125 int nb_items; 137 int nb_items;
126 int selected_item; 138 int selected_item;
127 bool cursor_flash_state; 139 bool cursor_flash_state;
@@ -222,6 +234,13 @@ extern void gui_list_draw(struct gui_list * gui_list);
222 * (Item 0 gets selected if the end of the list is reached) 234 * (Item 0 gets selected if the end of the list is reached)
223 * - gui_list : the list structure 235 * - gui_list : the list structure
224 */ 236 */
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
225extern void gui_list_select_next(struct gui_list * gui_list); 244extern void gui_list_select_next(struct gui_list * gui_list);
226 245
227/* 246/*
@@ -236,6 +255,22 @@ extern void gui_list_select_previous(struct gui_list * gui_list);
236 * - gui_list : the list structure 255 * - gui_list : the list structure
237 * - nb_lines : the number of lines to try to move the cursor 256 * - nb_lines : the number of lines to try to move the cursor
238 */ 257 */
258
259extern void gui_list_offset_right(struct gui_list * gui_list);
260
261/*
262 * 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
264 * in the list.
265 */
266
267extern void gui_list_offset_left(struct gui_list * gui_list);
268
269/*
270 * Makes all the item in the list scroll by one step to the left.
271 * stops at starting position.
272 */
273
239extern void gui_list_select_next_page(struct gui_list * gui_list, 274extern void gui_list_select_next_page(struct gui_list * gui_list,
240 int nb_lines); 275 int nb_lines);
241 276
@@ -312,6 +347,8 @@ extern void gui_synclist_select_item(struct gui_synclist * lists,
312 int item_number); 347 int item_number);
313extern void gui_synclist_select_next(struct gui_synclist * lists); 348extern void gui_synclist_select_next(struct gui_synclist * lists);
314extern void gui_synclist_select_previous(struct gui_synclist * lists); 349extern 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);
315extern void gui_synclist_select_next_page(struct gui_synclist * lists, 352extern void gui_synclist_select_next_page(struct gui_synclist * lists,
316 enum screen_type screen); 353 enum screen_type screen);
317extern void gui_synclist_select_previous_page(struct gui_synclist * lists, 354extern void gui_synclist_select_previous_page(struct gui_synclist * lists,