]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - GRUB2/MOD_SRC/grub-2.04/include/grub/menu_viewer.h
1.1.07 release
[Ventoy.git] / GRUB2 / MOD_SRC / grub-2.04 / include / grub / menu_viewer.h
1 /* menu_viewer.h - Interface to menu viewer implementations. */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2009 Free Software Foundation, Inc.
5 *
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef GRUB_MENU_VIEWER_HEADER
21 #define GRUB_MENU_VIEWER_HEADER 1
22
23 #include <grub/err.h>
24 #include <grub/symbol.h>
25 #include <grub/types.h>
26 #include <grub/menu.h>
27 #include <grub/term.h>
28
29 struct grub_menu_viewer
30 {
31 struct grub_menu_viewer *next;
32 void *data;
33 void (*set_chosen_entry) (int entry, void *data);
34 void (*scroll_chosen_entry) (void *data, int diren);
35 void (*print_timeout) (int timeout, void *data);
36 void (*clear_timeout) (void *data);
37 void (*fini) (void *fini);
38 };
39
40 void grub_menu_register_viewer (struct grub_menu_viewer *viewer);
41
42 grub_err_t
43 grub_menu_try_text (struct grub_term_output *term,
44 int entry, grub_menu_t menu, int nested);
45
46 extern grub_err_t (*grub_gfxmenu_try_hook) (int entry, grub_menu_t menu,
47 int nested);
48
49 #endif /* GRUB_MENU_VIEWER_HEADER */