GRUB-1.98 changes
[grub2/jjazz.git] / include / grub / gfxmenu_view.h
blob7cbfa89d36e4e9e96609eea055bd2c22b69fe8be
1 /* gfxmenu_view.h - gfxmenu view interface. */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2008,2009 Free Software Foundation, Inc.
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.
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.
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/>.
20 #ifndef GRUB_GFXMENU_VIEW_HEADER
21 #define GRUB_GFXMENU_VIEW_HEADER 1
23 #include <grub/types.h>
24 #include <grub/err.h>
25 #include <grub/menu.h>
26 #include <grub/font.h>
27 #include <grub/gfxwidgets.h>
29 struct grub_gfxmenu_view; /* Forward declaration of opaque type. */
30 typedef struct grub_gfxmenu_view *grub_gfxmenu_view_t;
33 grub_gfxmenu_view_t grub_gfxmenu_view_new (const char *theme_path,
34 int width, int height);
36 void grub_gfxmenu_view_destroy (grub_gfxmenu_view_t view);
38 /* Set properties on the view based on settings from the specified
39 theme file. */
40 grub_err_t grub_gfxmenu_view_load_theme (grub_gfxmenu_view_t view,
41 const char *theme_path);
43 grub_err_t grub_gui_recreate_box (grub_gfxmenu_box_t *boxptr,
44 const char *pattern, const char *theme_dir);
46 void grub_gfxmenu_view_draw (grub_gfxmenu_view_t view);
48 void
49 grub_gfxmenu_redraw_menu (grub_gfxmenu_view_t view);
51 void
52 grub_gfxmenu_redraw_timeout (grub_gfxmenu_view_t view);
54 void
55 grub_gfxmenu_view_redraw (grub_gfxmenu_view_t view,
56 const grub_video_rect_t *region);
58 void
59 grub_gfxmenu_clear_timeout (void *data);
60 void
61 grub_gfxmenu_print_timeout (int timeout, void *data);
62 void
63 grub_gfxmenu_set_chosen_entry (int entry, void *data);
65 /* Implementation details -- this should not be used outside of the
66 view itself. */
68 #include <grub/video.h>
69 #include <grub/bitmap.h>
70 #include <grub/gui.h>
71 #include <grub/gfxwidgets.h>
72 #include <grub/icon_manager.h>
74 /* Definition of the private representation of the view. */
75 struct grub_gfxmenu_view
77 grub_video_rect_t screen;
79 grub_font_t title_font;
80 grub_font_t message_font;
81 char *terminal_font_name;
82 grub_gui_color_t title_color;
83 grub_gui_color_t message_color;
84 grub_gui_color_t message_bg_color;
85 struct grub_video_bitmap *desktop_image;
86 grub_gui_color_t desktop_color;
87 grub_gfxmenu_box_t terminal_box;
88 char *title_text;
89 char *progress_message_text;
90 char *theme_path;
92 grub_gui_container_t canvas;
94 int double_repaint;
96 int selected;
98 grub_video_rect_t progress_message_frame;
100 grub_menu_t menu;
102 int nested;
104 int first_timeout;
107 #endif /* ! GRUB_GFXMENU_VIEW_HEADER */