Jason Hobbs | 0685d82 | 2011-08-23 11:06:49 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2010-2011 Calxeda, Inc. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it |
| 5 | * under the terms of the GNU General Public License as published by the Free |
| 6 | * Software Foundation; either version 2 of the License, or (at your option) |
| 7 | * any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT |
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 12 | * more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along with |
| 15 | * this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __MENU_H__ |
| 19 | #define __MENU_H__ |
| 20 | |
| 21 | struct menu; |
| 22 | |
Jason Hobbs | 65febe6 | 2011-08-23 11:06:50 +0000 | [diff] [blame] | 23 | struct menu *menu_create(char *title, int timeout, int prompt, |
Pali Rohár | d0d8d3b | 2013-03-23 14:50:40 +0000 | [diff] [blame] | 24 | void (*item_data_print)(void *), |
| 25 | char *(*item_choice)(void *), |
| 26 | void *item_choice_data); |
Jason Hobbs | 0685d82 | 2011-08-23 11:06:49 +0000 | [diff] [blame] | 27 | int menu_default_set(struct menu *m, char *item_key); |
| 28 | int menu_get_choice(struct menu *m, void **choice); |
| 29 | int menu_item_add(struct menu *m, char *item_key, void *item_data); |
| 30 | int menu_destroy(struct menu *m); |
Heiko Schocher | eb2296f | 2012-01-16 21:13:20 +0000 | [diff] [blame] | 31 | void menu_display_statusline(struct menu *m); |
Anatolij Gustschin | fb6068a | 2013-03-23 14:52:04 +0000 | [diff] [blame] | 32 | int menu_default_choice(struct menu *m, void **choice); |
Jason Hobbs | 0685d82 | 2011-08-23 11:06:49 +0000 | [diff] [blame] | 33 | |
Heiko Schocher | b4c1df8 | 2012-01-16 21:13:35 +0000 | [diff] [blame] | 34 | #if defined(CONFIG_MENU_SHOW) |
| 35 | int menu_show(int bootdelay); |
| 36 | #endif |
Jason Hobbs | 0685d82 | 2011-08-23 11:06:49 +0000 | [diff] [blame] | 37 | #endif /* __MENU_H__ */ |