summaryrefslogtreecommitdiff
path: root/apps/menu.h
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-07-23 23:01:20 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-07-23 23:01:20 +0000
commitb1403ee024f81ced657261441571ee5e8bab71ce (patch)
tree3a7e1651d37bd35e801a331416654760cb61a075 /apps/menu.h
parent15d04fdb00e7f94aef49cf9a70e73c5a46e21536 (diff)
downloadrockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.gz
rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.zip
New way of defining menus and options allows to declare them static const, which saves the code to runtime-assemble them. Rockbox just got 6 KB smaller.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4931 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.h')
-rw-r--r--apps/menu.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/menu.h b/apps/menu.h
index 55c480aaab..d097f73a0f 100644
--- a/apps/menu.h
+++ b/apps/menu.h
@@ -23,12 +23,11 @@
23#include <stdbool.h> 23#include <stdbool.h>
24 24
25struct menu_item { 25struct menu_item {
26 unsigned char *desc; /* string */ 26 unsigned char *desc; /* string or ID */
27 int voice_id; /* the associated voice clip, -1 if none */
28 bool (*function) (void); /* return true if USB was connected */ 27 bool (*function) (void); /* return true if USB was connected */
29}; 28};
30 29
31int menu_init(struct menu_item* mitems, int count, int (*callback)(int, int), 30int menu_init(const struct menu_item* mitems, int count, int (*callback)(int, int),
32 char *button1, char *button2, char *button3); 31 char *button1, char *button2, char *button3);
33void menu_exit(int menu); 32void menu_exit(int menu);
34 33
@@ -47,7 +46,6 @@ int menu_count(int menu);
47bool menu_moveup(int menu); 46bool menu_moveup(int menu);
48bool menu_movedown(int menu); 47bool menu_movedown(int menu);
49void menu_draw(int menu); 48void menu_draw(int menu);
50void menu_insert(int menu, int position, char *desc, int voice_id, 49void menu_insert(int menu, int position, char *desc, bool (*function) (void));
51 bool (*function) (void));
52 50
53#endif /* End __MENU_H__ */ 51#endif /* End __MENU_H__ */