From 91cb68a1fb5b019aaebf77fae6506bb807059b65 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 1 Mar 2007 11:14:46 +0000 Subject: Introducing the root menu! Blind users: get a new voice file as there are lots of lang changes and new strings. FS#6630 or RootMenu on the wiki for more info. complaints to /dev/null :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12528 a1c6a512-1295-4272-9138-f99709370657 --- apps/menu.h | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'apps/menu.h') diff --git a/apps/menu.h b/apps/menu.h index 655c911..4cb7446 100644 --- a/apps/menu.h +++ b/apps/menu.h @@ -63,6 +63,7 @@ enum menu_item_type { MT_FUNCTION_CALL, /* used when the standard code wont work */ MT_FUNCTION_WITH_PARAM, MT_RETURN_ID, /* returns the position of the selected item (starting at 0)*/ + MT_RETURN_VALUE, /* returns a value associated with an item */ }; typedef int (*menu_function)(void); @@ -89,6 +90,7 @@ struct menu_item_ex { const struct menu_func_with_param *func_with_param; /* MT_FUNCTION_WITH_PARAM */ const char **strings; /* used with MT_RETURN_ID */ + int value; /* MT_RETURN_VALUE */ }; union { /* For settings */ @@ -117,7 +119,7 @@ struct menu_item_ex { typedef int (*menu_callback_type)(int action, const struct menu_item_ex *this_item); -int do_menu(const struct menu_item_ex *menu); +int do_menu(const struct menu_item_ex *menu, int *start_selected); bool do_setting_from_menu(const struct menu_item_ex *temp); #define MENU_ITEM_COUNT(c) (c<