summaryrefslogtreecommitdiff
path: root/apps/gui/list.h
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-11-16 17:23:49 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-11-16 17:23:49 +0000
commit15046f99b3840c07bdd9d52e7014c6e775267c55 (patch)
treea34131db64c53b7bb9353e870cd5266d0dbc9e2d /apps/gui/list.h
parent2a7546ab752dd10901aa7df10d93cd286a68d4bf (diff)
downloadrockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.tar.gz
rockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.zip
show/hide icons now works properly in playlist viewer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7911 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.h')
-rw-r--r--apps/gui/list.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 42a8677637..3e5b38e5b1 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -136,9 +136,9 @@ struct gui_list
136 * to a given item number 136 * to a given item number
137 * - callback_get_item_name : pointer to a function that associates a label 137 * - callback_get_item_name : pointer to a function that associates a label
138 * to a given item number 138 * to a given item number
139 * - data : extra data passed to the list callback
139 */ 140 */
140extern void gui_list_init(struct gui_list * gui_list, 141extern void gui_list_init(struct gui_list * gui_list,
141 list_get_icon callback_get_item_icon,
142 list_get_name callback_get_item_name, 142 list_get_name callback_get_item_name,
143 void * data 143 void * data
144 ); 144 );
@@ -146,7 +146,7 @@ extern void gui_list_init(struct gui_list * gui_list,
146/* 146/*
147 * Sets the numbers of items the list can currently display 147 * Sets the numbers of items the list can currently display
148 * note that the list's context like the currently pointed item is resetted 148 * note that the list's context like the currently pointed item is resetted
149 * - gui_list : the list structure to initialize 149 * - gui_list : the list structure
150 * - nb_items : the numbers of items you want 150 * - nb_items : the numbers of items you want
151 */ 151 */
152#define gui_list_set_nb_items(gui_list, nb) \ 152#define gui_list_set_nb_items(gui_list, nb) \
@@ -154,7 +154,7 @@ extern void gui_list_init(struct gui_list * gui_list,
154 154
155/* 155/*
156 * Returns the numbers of items currently in the list 156 * Returns the numbers of items currently in the list
157 * - gui_list : the list structure to initialize 157 * - gui_list : the list structure
158 */ 158 */
159#define gui_list_get_nb_items(gui_list) \ 159#define gui_list_get_nb_items(gui_list) \
160 (gui_list)->nb_items 160 (gui_list)->nb_items
@@ -170,6 +170,14 @@ extern void gui_list_put_selection_in_screen(struct gui_list * gui_list,
170 bool put_from_end); 170 bool put_from_end);
171 171
172/* 172/*
173 * Sets the icon callback function
174 * - gui_list : the list structure
175 * - _callback : the callback function
176 */
177#define gui_list_set_icon_callback(gui_list, _callback) \
178 (gui_list)->callback_get_item_icon=_callback
179
180/*
173 * Attach the scrolling list to a screen 181 * Attach the scrolling list to a screen
174 * (The previous screen attachement is lost) 182 * (The previous screen attachement is lost)
175 * - gui_list : the list structure 183 * - gui_list : the list structure
@@ -277,14 +285,14 @@ struct gui_synclist
277 285
278extern void gui_synclist_init( 286extern void gui_synclist_init(
279 struct gui_synclist * lists, 287 struct gui_synclist * lists,
280 list_get_icon callback_get_item_icon,
281 list_get_name callback_get_item_name, 288 list_get_name callback_get_item_name,
282 void * data 289 void * data
283 ); 290 );
284extern void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items); 291extern void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items);
285 292extern void gui_synclist_set_icon_callback(struct gui_synclist * lists, list_get_icon icon_callback);
286#define gui_synclist_get_nb_items(lists) \ 293#define gui_synclist_get_nb_items(lists) \
287 gui_list_get_nb_items(&((lists)->gui_list[0])) 294 gui_list_get_nb_items(&((lists)->gui_list[0]))
295
288extern int gui_synclist_get_sel_pos(struct gui_synclist * lists); 296extern int gui_synclist_get_sel_pos(struct gui_synclist * lists);
289 297
290#define gui_synclist_get_sel_pos(lists) \ 298#define gui_synclist_get_sel_pos(lists) \