menu_viewer.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifndef GRUB_MENU_VIEWER_HEADER
  20. #define GRUB_MENU_VIEWER_HEADER 1
  21. #include <grub/err.h>
  22. #include <grub/symbol.h>
  23. #include <grub/types.h>
  24. #include <grub/menu.h>
  25. #include <grub/term.h>
  26. struct grub_menu_viewer
  27. {
  28. struct grub_menu_viewer *next;
  29. void *data;
  30. void (*set_chosen_entry) (int entry, void *data);
  31. void (*print_timeout) (int timeout, void *data);
  32. void (*clear_timeout) (void *data);
  33. void (*fini) (void *fini);
  34. };
  35. void grub_menu_register_viewer (struct grub_menu_viewer *viewer);
  36. grub_err_t
  37. grub_menu_try_text (struct grub_term_output *term,
  38. int entry, grub_menu_t menu, int nested);
  39. extern grub_err_t (*grub_gfxmenu_try_hook) (int entry, grub_menu_t menu,
  40. int nested);
  41. #endif /* GRUB_MENU_VIEWER_HEADER */