xref: /openbmc/u-boot/include/menu.h (revision fc9d64ff)
1b69bf52dSJason Hobbs /*
2b69bf52dSJason Hobbs  * Copyright 2010-2011 Calxeda, Inc.
3b69bf52dSJason Hobbs  *
4b69bf52dSJason Hobbs  * This program is free software; you can redistribute it and/or modify it
5b69bf52dSJason Hobbs  * under the terms of the GNU General Public License as published by the Free
6b69bf52dSJason Hobbs  * Software Foundation; either version 2 of the License, or (at your option)
7b69bf52dSJason Hobbs  * any later version.
8b69bf52dSJason Hobbs  *
9b69bf52dSJason Hobbs  * This program is distributed in the hope it will be useful, but WITHOUT
10b69bf52dSJason Hobbs  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11b69bf52dSJason Hobbs  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12b69bf52dSJason Hobbs  * more details.
13b69bf52dSJason Hobbs  *
14b69bf52dSJason Hobbs  * You should have received a copy of the GNU General Public License along with
15b69bf52dSJason Hobbs  * this program.  If not, see <http://www.gnu.org/licenses/>.
16b69bf52dSJason Hobbs  */
17b69bf52dSJason Hobbs 
18b69bf52dSJason Hobbs #ifndef __MENU_H__
19b69bf52dSJason Hobbs #define __MENU_H__
20b69bf52dSJason Hobbs 
21b69bf52dSJason Hobbs struct menu;
22b69bf52dSJason Hobbs 
23b41bc5a8SJason Hobbs struct menu *menu_create(char *title, int timeout, int prompt,
24*fc9d64ffSPali Rohár 				void (*item_data_print)(void *),
25*fc9d64ffSPali Rohár 				char *(*item_choice)(void *),
26*fc9d64ffSPali Rohár 				void *item_choice_data);
27b69bf52dSJason Hobbs int menu_default_set(struct menu *m, char *item_key);
28b69bf52dSJason Hobbs int menu_get_choice(struct menu *m, void **choice);
29b69bf52dSJason Hobbs int menu_item_add(struct menu *m, char *item_key, void *item_data);
30b69bf52dSJason Hobbs int menu_destroy(struct menu *m);
31e0611dd9SHeiko Schocher void menu_display_statusline(struct menu *m);
32b69bf52dSJason Hobbs 
33317d6c57SHeiko Schocher #if defined(CONFIG_MENU_SHOW)
34317d6c57SHeiko Schocher int menu_show(int bootdelay);
35317d6c57SHeiko Schocher #endif
36b69bf52dSJason Hobbs #endif /* __MENU_H__ */
37