Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / menu.h
1 #ifndef _IPXE_MENU_H
2 #define _IPXE_MENU_H
3
4 /** @file
5  *
6  * Menu selection
7  *
8  */
9
10 FILE_LICENCE ( GPL2_OR_LATER );
11
12 #include <ipxe/list.h>
13
14 /** A menu */
15 struct menu {
16         /** List of menus */
17         struct list_head list;
18         /** Name */
19         const char *name;
20         /** Title */
21         const char *title;
22         /** Menu items */
23         struct list_head items;
24 };
25
26 /** A menu item */
27 struct menu_item {
28         /** List of menu items */
29         struct list_head list;
30         /** Label */
31         const char *label;
32         /** Text */
33         const char *text;
34         /** Shortcut key */
35         int shortcut;
36         /** Is default item */
37         int is_default;
38 };
39
40 extern struct menu * create_menu ( const char *name, const char *title );
41 extern struct menu_item * add_menu_item ( struct menu *menu, const char *label,
42                                           const char *text, int shortcut,
43                                           int is_default );
44 extern void destroy_menu ( struct menu *menu );
45 extern struct menu * find_menu ( const char *name );
46 extern int show_menu ( struct menu *menu, unsigned long timeout,
47                        const char *select, struct menu_item **selected );
48
49 #endif /* _IPXE_MENU_H */