image/src/ICOFileHeaders.h
author Neil Rashbrook <neil@parkwaycc.co.uk>
Mon, 25 Jun 2012 09:24:49 +0100
changeset 100281 ec9451e9e830e4a66186c488e33020775b4456a1
parent 96742 f4157e8c410708d76703f19e4dfb61859bfe32d8
child 106112 a16372ce30b5f6b747246b01fcd215a4bf3b6342
permissions -rw-r--r--
Bug 758354 Stop unnecessarily preprocessing chrome r=dolske

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef MOZILLA_IMAGELIB_ICOHEADERS_H_
#define MOZILLA_IMAGELIB_ICOHEADERS_H_

namespace mozilla {
  namespace image {

    #define ICONFILEHEADERSIZE 6
    #define ICODIRENTRYSIZE 16
    #define PNGSIGNATURESIZE 8
    #define BMPFILEHEADERSIZE 14

    struct IconFileHeader
    {
      PRUint16   mReserved;
      PRUint16   mType;
      PRUint16   mCount;
    };

    struct IconDirEntry
    {
      PRUint8   mWidth;
      PRUint8   mHeight;
      PRUint8   mColorCount;
      PRUint8   mReserved;
      union {
        PRUint16 mPlanes;   // ICO
        PRUint16 mXHotspot; // CUR
      };
      union {
        PRUint16 mBitCount; // ICO
        PRUint16 mYHotspot; // CUR
      };
      PRUint32  mBytesInRes;
      PRUint32  mImageOffset;
    };


  } // namespace image
} // namespace mozilla

#endif