Add externs to avoid multiple definitions, and then add missing definitions.
[rrq/maintain_lilo.git] / src / bitmap.h
1 /* bitmap.h
2  * 
3  * Copyright 2001-2007 John Coffman
4  * Copyright 2009-2011 Joachim Wiedorn
5  * All rights reserved.
6  * 
7  * Licensed under the terms contained in the file 'COPYING'
8  * in the source directory.
9  */
10
11 #ifndef BITMAP_H
12 #define BITMAP_H
13
14 typedef unsigned int  bm_uint32;
15 typedef signed int    bm_sint32;
16 typedef unsigned short bm_uint16;
17 typedef signed short   bm_sint16;
18 typedef unsigned char  bm_byte;
19
20
21 /* Windows/OS2 bitmap header */
22 typedef struct BitMapHeader {
23    bm_uint32   size;
24    bm_sint32   width;
25    bm_sint32   height;
26    bm_uint16   numBitPlanes;
27    bm_uint16   numBitsPerPlane;
28    bm_uint32   compressionScheme;
29    bm_uint32   sizeImageData;
30    bm_uint32   xResolution, yResolution;
31    bm_uint32   numColorsUsed, numImportantColors;
32 } BITMAPHEADER;
33
34
35 /* OS2 bitmap header */
36 typedef struct BitMapHeader2 {
37    bm_uint32   size;
38    bm_sint16   width;
39    bm_sint16   height;
40    bm_uint16   numBitPlanes;
41    bm_uint16   numBitsPerPlane;
42 } BITMAPHEADER2;
43
44
45 typedef struct Rgb {
46    bm_byte  blue, green, red, null;
47 } RGB;
48
49 typedef struct Rgb2 {
50    bm_byte  blue, green, red;
51 } RGB2;
52
53
54 /* common BM file header */
55 typedef struct BitMapFileHeader {
56    bm_uint16   magic;      /* must be "BM" */
57    bm_uint16   size[2];                         /* actually bm_uint32 */
58    bm_sint16   xHotspot, yHotspot;
59    bm_uint16   offsetToBits[2];                 /* actually bm_uint32 */
60 } BITMAPFILEHEADER;     /* needed to compensate for GCC's alignment rules */
61
62 /* LILO scheme */
63 typedef struct Scheme {
64    short int fg, bg, sh;
65    } SCHEME;
66
67 /* LILO bitmap header text color and placement parameters */
68 typedef struct BitmapLiloHeader {
69    bm_uint16   size[2];
70    char magic[4];       /* "LILO" */
71
72 /* items below this point must correspond EXACTLY with the MENUTABLE items
73    in 'common.h'
74    
75 ;*/     short row, col, ncol;           /* BMP row, col, and ncols
76                                                 mt_row:         .blkw   1
77                                                 mt_col:         .blkw   1
78                                                 mt_ncol:        .blkw   1
79 ;*/     short maxcol, xpitch;           /* BMP max per col, xpitch between cols
80                                                 mt_maxcol:      .blkw   1
81                                                 mt_xpitch:      .blkw   1
82 ;*/     short fg, bg, sh;               /* BMP normal text fore, backgr, shadow
83                                                 mt_fg:          .blkw   1
84                                                 mt_bg:          .blkw   1
85                                                 mt_sh:          .blkw   1
86 ;*/     short h_fg, h_bg, h_sh;         /* highlight fg, bg, & shadow
87                                                 mt_h_fg:        .blkw   1
88                                                 mt_h_bg:        .blkw   1
89                                                 mt_h_sh:        .blkw   1
90 ;*/     short t_fg, t_bg, t_sh;         /* timer fg, bg, & shadow colors
91                                                 mt_t_fg:        .blkw   1
92                                                 mt_t_bg:        .blkw   1
93                                                 mt_t_sh:        .blkw   1
94 ;*/     short t_row, t_col;             /* timer position
95                                                 mt_t_row:       .blkw   1
96                                                 mt_t_col:       .blkw   1
97 ;*/     short mincol, reserved[3];      /* BMP min per col before spill to next, reserved spacer
98                                                 mt_mincol:      .blkw   1
99                                                                 .blkw   3
100 ;*/
101 } BITMAPLILOHEADER;
102
103 #endif
104 /* end bitmap.h */