diff options
| author | Kevin Ferrare <kevin@rockbox.org> | 2005-11-16 17:23:49 +0000 |
|---|---|---|
| committer | Kevin Ferrare <kevin@rockbox.org> | 2005-11-16 17:23:49 +0000 |
| commit | 15046f99b3840c07bdd9d52e7014c6e775267c55 (patch) | |
| tree | a34131db64c53b7bb9353e870cd5266d0dbc9e2d /apps/gui/list.h | |
| parent | 2a7546ab752dd10901aa7df10d93cd286a68d4bf (diff) | |
| download | rockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.zip rockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.tar.gz rockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.tar.bz2 rockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.tar.xz | |
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.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/apps/gui/list.h b/apps/gui/list.h index 42a8677..3e5b38e 100644 --- a/apps/gui/list.h +++ b/apps/gui/list.h @@ -136,9 +136,9 @@ struct gui_list * to a given item number * - callback_get_item_name : pointer to a function that associates a label * to a given item number + * - data : extra data passed to the list callback */ extern void gui_list_init(struct gui_list * gui_list, - list_get_icon callback_get_item_icon, list_get_name callback_get_item_name, void * data ); @@ -146,7 +146,7 @@ extern void gui_list_init(struct gui_list * gui_list, /* * Sets the numbers of items the list can currently display * note that the list's context like the currently pointed item is resetted - * - gui_list : the list structure to initialize + * - gui_list : the list structure * - nb_items : the numbers of items you want */ #define gui_list_set_nb_items(gui_list, nb) \ @@ -154,7 +154,7 @@ extern void gui_list_init(struct gui_list * gui_list, /* * Returns the numbers of items currently in the list - * - gui_list : the list structure to initialize + * - gui_list : the list structure */ #define gui_list_get_nb_items(gui_list) \ (gui_list)->nb_items @@ -170,6 +170,14 @@ extern void gui_list_put_selection_in_screen(struct gui_list * gui_list, bool put_from_end); /* + * Sets the icon callback function + * - gui_list : the list structure + * - _callback : the callback function + */ +#define gui_list_set_icon_callback(gui_list, _callback) \ + (gui_list)->callback_get_item_icon=_callback + +/* * Attach the scrolling list to a screen * (The previous screen attachement is lost) * - gui_list : the list structure @@ -277,14 +285,14 @@ struct gui_synclist extern void gui_synclist_init( struct gui_synclist * lists, - list_get_icon callback_get_item_icon, list_get_name callback_get_item_name, void * data ); extern void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items); - +extern void gui_synclist_set_icon_callback(struct gui_synclist * lists, list_get_icon icon_callback); #define gui_synclist_get_nb_items(lists) \ gui_list_get_nb_items(&((lists)->gui_list[0])) + extern int gui_synclist_get_sel_pos(struct gui_synclist * lists); #define gui_synclist_get_sel_pos(lists) \ |