2009-07-20 Joe Auricchio <jauricchio@gmail.com>
[grub2/phcoder.git] / include / grub / bitmap.h
blob42c439d694eab61a8982464eb5e3e8ca5419e0d9
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2006,2007 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_BITMAP_HEADER
20 #define GRUB_BITMAP_HEADER 1
22 #include <grub/err.h>
23 #include <grub/symbol.h>
24 #include <grub/types.h>
25 #include <grub/video.h>
27 struct grub_video_bitmap
29 /* Bitmap format description. */
30 struct grub_video_mode_info mode_info;
32 /* Pointer to bitmap data formatted according to mode_info. */
33 void *data;
36 struct grub_video_bitmap_reader
38 /* File extension for this bitmap type (including dot). */
39 const char *extension;
41 /* Reader function to load bitmap. */
42 grub_err_t (*reader) (struct grub_video_bitmap **bitmap,
43 const char *filename);
45 /* Next reader. */
46 struct grub_video_bitmap_reader *next;
48 typedef struct grub_video_bitmap_reader *grub_video_bitmap_reader_t;
50 void grub_video_bitmap_reader_register (grub_video_bitmap_reader_t reader);
51 void grub_video_bitmap_reader_unregister (grub_video_bitmap_reader_t reader);
53 grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
54 unsigned int width, unsigned int height,
55 enum grub_video_blit_format blit_format);
57 grub_err_t grub_video_bitmap_destroy (struct grub_video_bitmap *bitmap);
59 grub_err_t grub_video_bitmap_load (struct grub_video_bitmap **bitmap,
60 const char *filename);
62 unsigned int grub_video_bitmap_get_width (struct grub_video_bitmap *bitmap);
63 unsigned int grub_video_bitmap_get_height (struct grub_video_bitmap *bitmap);
65 void grub_video_bitmap_get_mode_info (struct grub_video_bitmap *bitmap,
66 struct grub_video_mode_info *mode_info);
68 void *grub_video_bitmap_get_data (struct grub_video_bitmap *bitmap);
70 #endif /* ! GRUB_BITMAP_HEADER */