1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/image/src/ICOFileHeaders.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 + 1.9 +#ifndef MOZILLA_IMAGELIB_ICOHEADERS_H_ 1.10 +#define MOZILLA_IMAGELIB_ICOHEADERS_H_ 1.11 + 1.12 +namespace mozilla { 1.13 + namespace image { 1.14 + 1.15 + #define ICONFILEHEADERSIZE 6 1.16 + #define ICODIRENTRYSIZE 16 1.17 + #define PNGSIGNATURESIZE 8 1.18 + #define BMPFILEHEADERSIZE 14 1.19 + 1.20 + struct IconFileHeader 1.21 + { 1.22 + uint16_t mReserved; 1.23 + uint16_t mType; 1.24 + uint16_t mCount; 1.25 + }; 1.26 + 1.27 + struct IconDirEntry 1.28 + { 1.29 + uint8_t mWidth; 1.30 + uint8_t mHeight; 1.31 + uint8_t mColorCount; 1.32 + uint8_t mReserved; 1.33 + union { 1.34 + uint16_t mPlanes; // ICO 1.35 + uint16_t mXHotspot; // CUR 1.36 + }; 1.37 + union { 1.38 + uint16_t mBitCount; // ICO 1.39 + uint16_t mYHotspot; // CUR 1.40 + }; 1.41 + uint32_t mBytesInRes; 1.42 + uint32_t mImageOffset; 1.43 + }; 1.44 + 1.45 + 1.46 + } // namespace image 1.47 +} // namespace mozilla 1.48 + 1.49 +#endif