il_icon.h
Upload User: wmy0603
Upload Date: 2022-05-02
Package Size: 1808k
Code Size: 2k
Development Platform:

Visual C++

  1. //-----------------------------------------------------------------------------
  2. //
  3. // ImageLib Sources
  4. // Copyright (C) 2000-2002 by Denton Woods
  5. // Last modified: 05/25/2001 <--Y2K Compliant! =]
  6. //
  7. // Filename: src-IL/include/il_icon.h
  8. //
  9. // Description: Reads from a Windows icon (.ico) file.
  10. //
  11. //-----------------------------------------------------------------------------
  12. #ifndef ICON_H
  13. #define ICON_H
  14. #include "il_internal.h"
  15. #ifdef _WIN32
  16. #pragma pack(push, ico_struct, 1)
  17. #endif
  18. typedef struct ICODIR
  19. {
  20. ILshort Reserved; // Reserved (must be 0)
  21. ILshort Type; // Type (1 for icons, 2 for cursors)
  22. ILshort Count; // How many different images?
  23. } IL_PACKSTRUCT ICODIR;
  24. typedef struct ICODIRENTRY
  25. {
  26. ILubyte Width; // Width, in pixels
  27. ILubyte Height; // Height, in pixels
  28. ILubyte NumColours; // Number of colors in image (0 if >=8bpp)
  29. ILubyte Reserved; // Reserved (must be 0)
  30. ILshort Planes; // Colour planes
  31. ILshort Bpp; // Bits per pixel
  32. ILuint SizeOfData; // How many bytes in this resource?
  33. ILuint Offset; // Offset from beginning of the file
  34. } IL_PACKSTRUCT ICODIRENTRY;
  35. typedef struct INFOHEAD
  36. {
  37. ILint Size;
  38. ILint Width;
  39. ILint Height;
  40. ILshort Planes;
  41. ILshort BitCount;
  42. ILint Compression;
  43. ILint SizeImage;
  44. ILint XPixPerMeter;
  45. ILint YPixPerMeter;
  46. ILint ColourUsed;
  47. ILint ColourImportant;
  48. } IL_PACKSTRUCT INFOHEAD;
  49. typedef struct ICOIMAGE
  50. {
  51. INFOHEAD Head;
  52. ILubyte *Pal; // Palette
  53. ILubyte *Data; // XOR mask
  54. ILubyte *AND; // AND mask
  55. } ICOIMAGE;
  56. #ifdef _WIN32
  57. #pragma pack(pop, ico_struct)
  58. #endif
  59. ILboolean iLoadIconInternal();
  60. ILboolean iLoadIconPNG(ICOIMAGE *Icon);
  61. #endif//ICON_H