GRUB-1.98 changes
[grub2/jjazz.git] / include / grub / gfxwidgets.h
blobf9678bf9e9c40e72677e962cf40821faf5fa1294
1 /* gfxwidgets.h - Widgets for the graphical menu (gfxmenu). */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2008 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_GFXWIDGETS_HEADER
21 #define GRUB_GFXWIDGETS_HEADER 1
23 #include <grub/video.h>
25 typedef struct grub_gfxmenu_box *grub_gfxmenu_box_t;
27 struct grub_gfxmenu_box
29 /* The size of the content. */
30 int content_width;
31 int content_height;
33 struct grub_video_bitmap **raw_pixmaps;
34 struct grub_video_bitmap **scaled_pixmaps;
36 void (*draw) (grub_gfxmenu_box_t self, int x, int y);
37 void (*set_content_size) (grub_gfxmenu_box_t self,
38 int width, int height);
39 int (*get_left_pad) (grub_gfxmenu_box_t self);
40 int (*get_top_pad) (grub_gfxmenu_box_t self);
41 int (*get_right_pad) (grub_gfxmenu_box_t self);
42 int (*get_bottom_pad) (grub_gfxmenu_box_t self);
43 void (*destroy) (grub_gfxmenu_box_t self);
46 grub_gfxmenu_box_t grub_gfxmenu_create_box (const char *pixmaps_prefix,
47 const char *pixmaps_suffix);
49 #endif /* ! GRUB_GFXWIDGETS_HEADER */