michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #ifndef MOZILLA_IMAGELIB_ICOHEADERS_H_ michael@0: #define MOZILLA_IMAGELIB_ICOHEADERS_H_ michael@0: michael@0: namespace mozilla { michael@0: namespace image { michael@0: michael@0: #define ICONFILEHEADERSIZE 6 michael@0: #define ICODIRENTRYSIZE 16 michael@0: #define PNGSIGNATURESIZE 8 michael@0: #define BMPFILEHEADERSIZE 14 michael@0: michael@0: struct IconFileHeader michael@0: { michael@0: uint16_t mReserved; michael@0: uint16_t mType; michael@0: uint16_t mCount; michael@0: }; michael@0: michael@0: struct IconDirEntry michael@0: { michael@0: uint8_t mWidth; michael@0: uint8_t mHeight; michael@0: uint8_t mColorCount; michael@0: uint8_t mReserved; michael@0: union { michael@0: uint16_t mPlanes; // ICO michael@0: uint16_t mXHotspot; // CUR michael@0: }; michael@0: union { michael@0: uint16_t mBitCount; // ICO michael@0: uint16_t mYHotspot; // CUR michael@0: }; michael@0: uint32_t mBytesInRes; michael@0: uint32_t mImageOffset; michael@0: }; michael@0: michael@0: michael@0: } // namespace image michael@0: } // namespace mozilla michael@0: michael@0: #endif