OSDN Git Service

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