1 /* gfxmenu_view.h - gfxmenu view interface. */
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>
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
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
);
49 grub_gfxmenu_redraw_menu (grub_gfxmenu_view_t view
);
52 grub_gfxmenu_redraw_timeout (grub_gfxmenu_view_t view
);
55 grub_gfxmenu_view_redraw (grub_gfxmenu_view_t view
,
56 const grub_video_rect_t
*region
);
59 grub_gfxmenu_clear_timeout (void *data
);
61 grub_gfxmenu_print_timeout (int timeout
, void *data
);
63 grub_gfxmenu_set_chosen_entry (int entry
, void *data
);
65 /* Implementation details -- this should not be used outside of the
68 #include <grub/video.h>
69 #include <grub/bitmap.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
;
89 char *progress_message_text
;
92 grub_gui_container_t canvas
;
98 grub_video_rect_t progress_message_frame
;
107 #endif /* ! GRUB_GFXMENU_VIEW_HEADER */