| 1 |
#ifndef WINICO_H_INCLUDED |
| 2 |
#define WINICO_H_INCLUDED |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
typedef unsigned char u1; |
| 11 |
typedef unsigned short int u2; |
| 12 |
typedef unsigned int u4; |
| 13 |
|
| 14 |
typedef struct MS_Ico_ MS_Ico; |
| 15 |
typedef struct IC_Entry_ IC_Entry; |
| 16 |
typedef struct IC_InfoHeader_ IC_InfoHeader; |
| 17 |
typedef struct IC_Color_ IC_Color; |
| 18 |
|
| 19 |
typedef struct IC_Palette_ IC_Palette; |
| 20 |
typedef struct ICON_bmp_ ICON_bmp; |
| 21 |
|
| 22 |
struct MS_Ico_ { |
| 23 |
u2 reserved; |
| 24 |
u2 type; |
| 25 |
u2 count; |
| 26 |
IC_Entry ** entries; |
| 27 |
}; |
| 28 |
|
| 29 |
|
| 30 |
struct IC_Entry_ { |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
u2 width; |
| 36 |
u2 height; |
| 37 |
u2 color_count; |
| 38 |
u1 reserved; |
| 39 |
u2 planes; |
| 40 |
u2 bitcount; |
| 41 |
u4 size_in_bytes; |
| 42 |
u4 file_offset; |
| 43 |
IC_InfoHeader * ih; |
| 44 |
IC_Color ** colors; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
u1 * andBitmap; |
| 50 |
u1 * xorBitmap; |
| 51 |
int xBytesXor; |
| 52 |
int xBytesAnd; |
| 53 |
u1 ** andBitmapOut; |
| 54 |
u1 ** xorBitmapOut; |
| 55 |
}; |
| 56 |
|
| 57 |
struct IC_InfoHeader_ { |
| 58 |
u4 size; |
| 59 |
u4 width; |
| 60 |
u4 height; |
| 61 |
u2 planes; |
| 62 |
u2 bitcount; |
| 63 |
u4 compression; |
| 64 |
u4 imagesize; |
| 65 |
u4 x_pixels_per_m; |
| 66 |
u4 y_pixels_per_m; |
| 67 |
u4 colors_used; |
| 68 |
u4 colors_important; |
| 69 |
}; |
| 70 |
|
| 71 |
struct IC_Color_ { |
| 72 |
u1 red; |
| 73 |
u1 green; |
| 74 |
u1 blue; |
| 75 |
u1 reserved; |
| 76 |
}; |
| 77 |
|
| 78 |
struct IC_Palette_ { |
| 79 |
u4 col_amount; |
| 80 |
IC_Color ** colors; |
| 81 |
}; |
| 82 |
|
| 83 |
struct ICON_bmp_ { |
| 84 |
int xBytes; |
| 85 |
u4 size; |
| 86 |
u1 ** data; |
| 87 |
}; |
| 88 |
|
| 89 |
#endif |