Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
4.1 KiB

  1. /**
  2. ** Header for the New version of RC.EXE. This contains the structures
  3. ** for new format of BITMAP files.
  4. **/
  5. /* The width of the name field in the Data for the group resources */
  6. #define NAMELEN 14
  7. typedef struct tagNEWHEADER
  8. {
  9. WORD Reserved;
  10. WORD ResType;
  11. WORD ResCount;
  12. } NEWHEADER, *PNEWHEADER;
  13. typedef struct tagDESCRIPTOR
  14. {
  15. BYTE Width; // 16, 32, 64
  16. BYTE Height; // 16, 32, 64
  17. BYTE ColorCount; // 2, 8, 16
  18. BYTE reserved;
  19. WORD xHotSpot;
  20. WORD yHotSpot;
  21. DWORD BytesInRes;
  22. DWORD OffsetToBits;
  23. } DESCRIPTOR;
  24. typedef struct tagICONRESDIR
  25. {
  26. BYTE Width; // 16, 32, 64
  27. BYTE Height; // 16, 32, 64
  28. BYTE ColorCount; // 2, 8, 16
  29. BYTE reserved;
  30. } ICONRESDIR;
  31. typedef struct tagCURSORDIR
  32. {
  33. WORD Width;
  34. WORD Height;
  35. } CURSORDIR;
  36. typedef struct tagRESDIR
  37. {
  38. union
  39. {
  40. ICONRESDIR Icon;
  41. CURSORDIR Cursor;
  42. } ResInfo;
  43. WORD Planes;
  44. WORD BitCount;
  45. DWORD BytesInRes;
  46. } RESDIR;
  47. typedef struct tagLOCALHEADER
  48. {
  49. WORD xHotSpot;
  50. WORD yHotSpot;
  51. } LOCALHEADER;
  52. typedef struct tagBITMAPHEADER
  53. {
  54. DWORD biSize;
  55. DWORD biWidth;
  56. DWORD biHeight;
  57. WORD biPlanes;
  58. WORD biBitCount;
  59. DWORD biStyle;
  60. DWORD biSizeImage;
  61. DWORD biXPelsPerMeter;
  62. DWORD biYPelsPerMeter;
  63. DWORD biClrUsed;
  64. DWORD biClrImportant;
  65. } BITMAPHEADER;
  66. #define BFOFFBITS(pbfh) MAKELONG(*(LPWORD)((LPWORD)pbfh+5), \
  67. *(LPWORD)((LPWORD)pbfh+6))
  68. #define TOCORE(bi) (*(BITMAPCOREHEADER *)&(bi))
  69. /****************************************************\
  70. * *
  71. * Imported from asdf.h in windows\inc *
  72. * *
  73. \****************************************************/
  74. // RIFF chunk header.
  75. typedef struct _RTAG {
  76. FOURCC ckID;
  77. DWORD ckSize;
  78. } RTAG, *PRTAG;
  79. // Valid TAG types.
  80. // 'ANI ' - simple ANImation file
  81. #define FOURCC_ACON mmioFOURCC('A', 'C', 'O', 'N')
  82. // 'anih' - ANImation Header
  83. // Contains an ANIHEADER structure.
  84. #define FOURCC_anih mmioFOURCC('a', 'n', 'i', 'h')
  85. // 'rate' - RATE table (array of jiffies)
  86. // Contains an array of JIFs. Each JIF specifies how long the corresponding
  87. // animation frame is to be displayed before advancing to the next frame.
  88. // If the AF_SEQUENCE flag is set then the count of JIFs == anih.cSteps,
  89. // otherwise the count == anih.cFrames.
  90. #define FOURCC_rate mmioFOURCC('r', 'a', 't', 'e')
  91. // 'seq ' - SEQuence table (array of frame index values)
  92. // Countains an array of DWORD frame indices. anih.cSteps specifies how
  93. // many.
  94. #define FOURCC_seq mmioFOURCC('s', 'e', 'q', ' ')
  95. // 'fram' - list type for the icon list that follows
  96. #define FOURCC_fram mmioFOURCC('f', 'r', 'a', 'm')
  97. // 'icon' - Windows ICON format image (replaces MPTR)
  98. #define FOURCC_icon mmioFOURCC('i', 'c', 'o', 'n')
  99. // Standard tags (but for some reason not defined in MMSYSTEM.H)
  100. #define FOURCC_INFO mmioFOURCC('I', 'N', 'F', 'O') // INFO list
  101. #define FOURCC_IART mmioFOURCC('I', 'A', 'R', 'T') // Artist
  102. #define FOURCC_INAM mmioFOURCC('I', 'N', 'A', 'M') // Name/Title
  103. #if 0 //in winuser.w
  104. typedef DWORD JIF; // in winuser.w
  105. typedef struct _ANIHEADER { // anih
  106. DWORD cbSizeof;
  107. DWORD cFrames;
  108. DWORD cSteps;
  109. DWORD cx, cy;
  110. DWORD cBitCount, cPlanes;
  111. JIF jifRate;
  112. DWORD fl;
  113. } ANIHEADER, *PANIHEADER;
  114. // If the AF_ICON flag is specified the fields cx, cy, cBitCount, and
  115. // cPlanes are all unused. Each frame will be of type ICON and will
  116. // contain its own dimensional information.
  117. #define AF_ICON 0x0001L // Windows format icon/cursor animation
  118. #define AF_SEQUENCE 0x0002L // Animation is sequenced
  119. #endif
  120. /**************************\
  121. * *
  122. * End Import from asdf.h *
  123. * *
  124. \**************************/