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.

179 lines
7.3 KiB

  1. /*************************************************************************\
  2. * Module Name: metadef.h
  3. *
  4. * This file contains the definitions and constants for metafile.
  5. *
  6. * Created: 12-June-1991 13:46:00
  7. * Author: Hock San Lee [hockl]
  8. *
  9. * Copyright (c) 1991-1999 Microsoft Corporation
  10. \*************************************************************************/
  11. // Metafile header sizes for existing valid versions
  12. // Minimum header size
  13. #define META_HDR_SIZE_MIN META_HDR_SIZE_VERSION_1
  14. // Original header
  15. #define META_HDR_SIZE_VERSION_1 88
  16. // Header with OpenGL extensions
  17. #define META_HDR_SIZE_VERSION_2 100
  18. // Header with sizlMicrometer extensions
  19. #define META_HDR_SIZE_VERSION_3 108
  20. // Maximum header size
  21. #define META_HDR_SIZE_MAX sizeof(ENHMETAHEADER)
  22. // Metafile version constants
  23. #define META_FORMAT_ENHANCED 0x10000 // Windows NT format
  24. #define META_FORMAT_WINDOWS 0x300 // Windows 3.x format
  25. // Metafile record structure.
  26. typedef struct tagENHMETABOUNDRECORD
  27. {
  28. DWORD iType; // Record type EMR_
  29. DWORD nSize; // Record size in bytes
  30. RECTL rclBounds; // Inclusive-inclusive bounds in device units
  31. DWORD dParm[1]; // Parameters
  32. } ENHMETABOUNDRECORD, *PENHMETABOUNDRECORD;
  33. // Flags for iType field in ENHMETARECORD.
  34. // They are to be used in future to support backward systems only.
  35. // See PlayEnhMetaFileRecord for details.
  36. #define EMR_NOEMBED 0x80000000 // do not include record in embedding
  37. #define EMR_ACCUMBOUNDS 0x40000000 // record has bounds
  38. typedef struct tagMETALINK16
  39. {
  40. DWORD metalink;
  41. struct tagMETALINK16 *pmetalink16Next;
  42. HANDLE hobj;
  43. PVOID pv;
  44. // WARNING: fields before this must match the LINK structure.
  45. DWORD cMetaDC16;
  46. HDC ahMetaDC16[1];
  47. } METALINK16, *PMETALINK16;
  48. // Public GdiComment.
  49. typedef struct tagEMRGDICOMMENT_PUBLIC
  50. {
  51. EMR emr;
  52. DWORD cbData; // Size of following fields and data
  53. DWORD ident; // GDICOMMENT_IDENTIFIER
  54. DWORD iComment; // Comment type e.g. GDICOMMENT_WINDOWS_METAFILE
  55. } EMRGDICOMMENT_PUBLIC, *PEMRGDICOMMENT_PUBLIC;
  56. // Public GdiComment for embedded Windows metafile.
  57. typedef struct tagEMRGDICOMMENT_WINDOWS_METAFILE
  58. {
  59. EMR emr;
  60. DWORD cbData; // Size of following fields and windows metafile
  61. DWORD ident; // GDICOMMENT_IDENTIFIER
  62. DWORD iComment; // GDICOMMENT_WINDOWS_METAFILE
  63. DWORD nVersion; // 0x300 or 0x100
  64. DWORD nChecksum; // Checksum
  65. DWORD fFlags; // Compression etc. This is currently zero.
  66. DWORD cbWinMetaFile; // Size of windows metafile data in bytes
  67. // The windows metafile data follows here
  68. } EMRGDICOMMENT_WINDOWS_METAFILE, *PEMRGDICOMMENT_WINDOWS_METAFILE;
  69. // Public GdiComment for begin group.
  70. typedef struct tagEMRGDICOMMENT_BEGINGROUP
  71. {
  72. EMR emr;
  73. DWORD cbData; // Size of following fields and all data
  74. DWORD ident; // GDICOMMENT_IDENTIFIER
  75. DWORD iComment; // GDICOMMENT_BEGINGROUP
  76. RECTL rclOutput; // Output rectangle in logical coords.
  77. DWORD nDescription; // Number of chars in the unicode description
  78. // string that follows this field. This is 0
  79. // if there is no description string.
  80. } EMRGDICOMMENT_BEGINGROUP, *PEMRGDICOMMENT_BEGINGROUP;
  81. // Public GdiComment for end group.
  82. typedef EMRGDICOMMENT_PUBLIC EMRGDICOMMENT_ENDGROUP;
  83. typedef PEMRGDICOMMENT_PUBLIC PEMRGDICOMMENT_ENDGROUP;
  84. // Public GdiComment for multiple formats.
  85. typedef struct tagEMRGDICOMMENT_MULTIFORMATS
  86. {
  87. EMR emr;
  88. DWORD cbData; // Size of following fields and all data
  89. DWORD ident; // GDICOMMENT_IDENTIFIER
  90. DWORD iComment; // GDICOMMENT_MULTIFORMATS
  91. RECTL rclOutput; // Output rectangle in logical coords.
  92. DWORD nFormats; // Number of formats contained in the record
  93. EMRFORMAT aemrformat[1]; // Array of EMRFORMAT structures in order of
  94. // preference. This is followed by the data
  95. // for each format.
  96. } EMRGDICOMMENT_MULTIFORMATS, *PEMRGDICOMMENT_MULTIFORMATS;
  97. // iComment flags
  98. #define GDICOMMENT_NOEMBED 0x80000000 // do not include comment in
  99. // embedding
  100. #define GDICOMMENT_ACCUMBOUNDS 0x40000000 // has logical rectangle bounds
  101. // that follows the iComment field
  102. // ExtEscape to output encapsulated PostScript file.
  103. typedef struct tagEPSDATA
  104. {
  105. DWORD cbData; // Size of the structure and EPS data in bytes.
  106. DWORD nVersion; // Language level, e.g. 1 for level 1 PostScript.
  107. POINT aptl[3]; // Output parallelogram in 28.4 FIX device coords.
  108. // This is followed by the EPS data.
  109. } EPSDATA, *PEPSDATA;
  110. /**************************************************************************\
  111. *
  112. * <----------------------------------------------\
  113. * hash \
  114. * \
  115. * +-----+ |
  116. * 0| I16 | metalink16 |
  117. * 1| | |
  118. * 2| | +--------+ +--------+ |
  119. * 3| |------>|idc/iobj| /->|metalink| |
  120. * 4| | |hobj | / |hobj | |
  121. * 5| | |pmlNext |---/ |pmlNext |--/ |
  122. * | | |16bit mf| |16bit mf| |
  123. * .| | +--------+ +--------+ |
  124. * .| | | |
  125. * .| | | |
  126. * | | /--/ |
  127. * n-1| | / |
  128. * +-----+ | |
  129. * | LDC(idc) MDC |
  130. * | |
  131. * \->+--------+ +--------+ MHE[iobj] |
  132. * | | | | |
  133. * | | /->| | +--------+ |
  134. * | | / | | |hobj |---/
  135. * |pmdc |--/ |pmhe |-->|idc/iobj|
  136. * +--------+ | | +--------+
  137. * +--------+
  138. *
  139. *
  140. *
  141. \**************************************************************************/
  142. PMETALINK16 pmetalink16Resize(HANDLE h,int cObj);
  143. #define pmetalink16Get(h) ((PMETALINK16) plinkGet(h))
  144. #define pmetalink16Create(h) ((PMETALINK16)plinkCreate(h,sizeof(METALINK16)))
  145. #define bDeleteMetalink16(h) bDeleteLink(h)
  146.