diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-07-23 23:01:20 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-07-23 23:01:20 +0000 |
| commit | b1403ee024f81ced657261441571ee5e8bab71ce (patch) | |
| tree | 3a7e1651d37bd35e801a331416654760cb61a075 /apps/menu.h | |
| parent | 15d04fdb00e7f94aef49cf9a70e73c5a46e21536 (diff) | |
| download | rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.zip rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.gz rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.bz2 rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.xz | |
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.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/menu.h b/apps/menu.h index 55c480a..d097f73 100644 --- a/apps/menu.h +++ b/apps/menu.h @@ -23,12 +23,11 @@ #include <stdbool.h> struct menu_item { - unsigned char *desc; /* string */ - int voice_id; /* the associated voice clip, -1 if none */ + unsigned char *desc; /* string or ID */ bool (*function) (void); /* return true if USB was connected */ }; -int menu_init(struct menu_item* mitems, int count, int (*callback)(int, int), +int menu_init(const struct menu_item* mitems, int count, int (*callback)(int, int), char *button1, char *button2, char *button3); void menu_exit(int menu); @@ -47,7 +46,6 @@ int menu_count(int menu); bool menu_moveup(int menu); bool menu_movedown(int menu); void menu_draw(int menu); -void menu_insert(int menu, int position, char *desc, int voice_id, - bool (*function) (void)); +void menu_insert(int menu, int position, char *desc, bool (*function) (void)); #endif /* End __MENU_H__ */ |