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