From b1403ee024f81ced657261441571ee5e8bab71ce Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Fri, 23 Jul 2004 23:01:20 +0000 Subject: 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 --- apps/menu.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apps/menu.h') 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 @@ #include 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__ */ -- cgit v1.2.3