- Main Page
- Data Structures
- Files

- File List
- Globals

# E:/DevIL/src-IL/include/il_icon.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2002 by Denton Woods
    00005 // Last modified: 05/25/2001 <--Y2K Compliant! =]
    00006 //
    00007 // Filename: src-IL/include/il_icon.h
    00008 //
    00009 // Description: Reads from a Windows icon (.ico) file.
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #ifndef ICON_H
    00015 #define ICON_H
    00016
    00017 #include "il_internal.h"
    00018
    00019 #ifdef _WIN32
    00020         #pragma pack(push, ico_struct, 1)
    00021 #endif
    00022 typedef struct ICODIR
    00023 {
    00024         ILshort         Reserved;       // Reserved (must be 0)
    00025         ILshort         Type;           // Type (1 for icons, 2 for cursors)
    00026         ILshort         Count;          // How many different images?
    00027 } IL_PACKSTRUCT ICODIR;
    00028
    00029 typedef struct ICODIRENTRY
    00030 {
    00031         ILubyte         Width;                  // Width, in pixels
    00032         ILubyte         Height;                 // Height, in pixels
    00033         ILubyte         NumColours;             // Number of colors in image (0 if >=8bpp)
    00034         ILubyte         Reserved;               // Reserved (must be 0)
    00035         ILshort         Planes;                 // Colour planes
    00036         ILshort         Bpp;                    // Bits per pixel
    00037         ILuint          SizeOfData;             // How many bytes in this resource?
    00038         ILuint          Offset;                 // Offset from beginning of the file
    00039 } IL_PACKSTRUCT ICODIRENTRY;
    00040
    00041 typedef struct INFOHEAD
    00042 {
    00043         ILint           Size;
    00044         ILint           Width;
    00045         ILint           Height;
    00046         ILshort         Planes;
    00047         ILshort         BitCount;
    00048         ILint           Compression;
    00049         ILint           SizeImage;
    00050         ILint           XPixPerMeter;
    00051         ILint           YPixPerMeter;
    00052         ILint           ColourUsed;
    00053         ILint           ColourImportant;
    00054 } IL_PACKSTRUCT INFOHEAD;
    00055
    00056 typedef struct ICOIMAGE
    00057 {
    00058         INFOHEAD        Head;
    00059         ILubyte         *Pal;   // Palette
    00060         ILubyte         *Data;  // XOR mask
    00061         ILubyte         *AND;   // AND mask
    00062 } ICOIMAGE;
    00063 #ifdef _WIN32
    00064         #pragma pack(pop, ico_struct)
    00065 #endif
    00066
    00067 ILboolean iLoadIconInternal();
    00068 ILboolean iLoadIconPNG(ICOIMAGE *Icon);
    00069
    00070 #endif//ICON_H