|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 |
|
6 #ifndef MOZILLA_IMAGELIB_ICOHEADERS_H_ |
|
7 #define MOZILLA_IMAGELIB_ICOHEADERS_H_ |
|
8 |
|
9 namespace mozilla { |
|
10 namespace image { |
|
11 |
|
12 #define ICONFILEHEADERSIZE 6 |
|
13 #define ICODIRENTRYSIZE 16 |
|
14 #define PNGSIGNATURESIZE 8 |
|
15 #define BMPFILEHEADERSIZE 14 |
|
16 |
|
17 struct IconFileHeader |
|
18 { |
|
19 uint16_t mReserved; |
|
20 uint16_t mType; |
|
21 uint16_t mCount; |
|
22 }; |
|
23 |
|
24 struct IconDirEntry |
|
25 { |
|
26 uint8_t mWidth; |
|
27 uint8_t mHeight; |
|
28 uint8_t mColorCount; |
|
29 uint8_t mReserved; |
|
30 union { |
|
31 uint16_t mPlanes; // ICO |
|
32 uint16_t mXHotspot; // CUR |
|
33 }; |
|
34 union { |
|
35 uint16_t mBitCount; // ICO |
|
36 uint16_t mYHotspot; // CUR |
|
37 }; |
|
38 uint32_t mBytesInRes; |
|
39 uint32_t mImageOffset; |
|
40 }; |
|
41 |
|
42 |
|
43 } // namespace image |
|
44 } // namespace mozilla |
|
45 |
|
46 #endif |