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.

236 lines
5.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. flags.hxx
  5. Abstract:
  6. This header file is used to pull public and private GDI flags from
  7. DDK, SDK, and private GDI headers.
  8. Author:
  9. JasonHa
  10. --*/
  11. #ifndef _FLAGS_HXX_
  12. #define _FLAGS_HXX_
  13. // Public Headers
  14. #include <winddi.h>
  15. #include <wingdi.h>
  16. #include <wingdip.h>
  17. #include <ddraw.h>
  18. #include <ddrawint.h>
  19. #include <ntexapi.h>
  20. #include <ntgdistr.h>
  21. // Defines to read all flags and only flags from GDI Headers
  22. #define GDIFLAGS_ONLY
  23. // Defines from sources and related files
  24. #define FE_SB
  25. // Private GDI Headers
  26. #include <brush.hxx>
  27. #include <dcobj.hxx>
  28. #include <hmgshare.h>
  29. #include <lfntobj.hxx>
  30. #include <pdevobj.hxx>
  31. #include <pfeobj.hxx>
  32. #include <pffobj.hxx>
  33. #include <region.hxx>
  34. #include <rfntobj.hxx>
  35. #include <sprite.hxx>
  36. #include <surfobj.hxx>
  37. #include <textobj.hxx>
  38. #include <xfflags.h>
  39. #include <xlateobj.hxx>
  40. #include <pathobj.hxx>
  41. typedef struct _ENUMDEF {
  42. char *psz; // description
  43. ULONG64 ul; // enum value
  44. } ENUMDEF;
  45. typedef struct _FLAGDEF {
  46. char *psz; // description
  47. ULONG64 fl; // flag
  48. } FLAGDEF;
  49. extern FLAGDEF afdFDM[];
  50. extern FLAGDEF afdLINEATTRS[];
  51. extern FLAGDEF afdATTR[];
  52. extern FLAGDEF afdDCPATH[];
  53. extern FLAGDEF afdCOLORADJUSTMENT[];
  54. extern FLAGDEF afdRECTREGION[];
  55. extern FLAGDEF afdDCla[];
  56. extern FLAGDEF afdDCPath[];
  57. extern FLAGDEF afdDirty[];
  58. extern FLAGDEF afdDCFL[];
  59. extern FLAGDEF afdDCFS[];
  60. extern FLAGDEF afdPD[];
  61. extern FLAGDEF afdFS[];
  62. extern FLAGDEF afdDCX[];
  63. extern FLAGDEF afdDC[];
  64. extern FLAGDEF afdGC[];
  65. extern FLAGDEF afdGC2[];
  66. extern FLAGDEF afdGRAPHICS_DEVICE_stateFlags[];
  67. extern FLAGDEF afdTSIM[];
  68. extern FLAGDEF afdDCfs[];
  69. extern FLAGDEF afdGInfo[];
  70. extern FLAGDEF afdInfo[];
  71. extern FLAGDEF afdSO[];
  72. extern FLAGDEF afdTO[];
  73. extern FLAGDEF afdflx[];
  74. extern FLAGDEF afdFS2[];
  75. //extern FLAGDEF afdMX[];
  76. extern FLAGDEF afdRT[];
  77. extern FLAGDEF afdFO[];
  78. extern FLAGDEF afdGS[];
  79. //extern FLAGDEF afdBRUSH[];
  80. extern FLAGDEF afdPAL[];
  81. //extern ENUMDEF aedBRUSHSTYLE[];
  82. extern FLAGDEF afdRC[];
  83. extern FLAGDEF afdTC[];
  84. extern FLAGDEF afdHT[];
  85. extern FLAGDEF afdGS[];
  86. extern FLAGDEF afdFM_SEL[];
  87. extern FLAGDEF afdFM_TYPE[];
  88. extern FLAGDEF afdPFE[];
  89. extern FLAGDEF afdPFF[];
  90. //extern FLAGDEF afdSURF[];
  91. extern ENUMDEF aedBMF[];
  92. extern FLAGDEF afdDDSCAPS[];
  93. extern FLAGDEF afdDDSCAPS2[];
  94. extern FLAGDEF afdDDRAWISURF[];
  95. extern FLAGDEF afdDDSURFACEFL[];
  96. extern FLAGDEF afdDDPIXELFORMAT[];
  97. extern FLAGDEF afdDVERIFIER[];
  98. extern char *pszGraphicsMode(LONG l);
  99. extern char *pszROP2(LONG l);
  100. extern char *pszDCTYPE(LONG l);
  101. extern char *pszTA_V(long l); // vertical
  102. extern char *pszTA_H(long l); // horizontal
  103. extern char *pszTA_U(long l); // update
  104. extern char *pszMapMode(long l);
  105. extern char *pszBkMode(long l);
  106. extern char *pszFW(long l);
  107. extern char *pszCHARSET(long l);
  108. extern char *pszOUT_PRECIS( long l );
  109. extern char *pszCLIP_PRECIS( long l );
  110. extern char *pszQUALITY( long l );
  111. extern char *pszPitchAndFamily( long l );
  112. extern char *pszPanoseWeight( long l );
  113. #if 0 // DOES NOT SUPPORT API64
  114. extern char *pszFONTHASHTYPE(FONTHASHTYPE);
  115. #endif // DOES NOT SUPPORT API64
  116. extern char *pszDrvProcName(int index);
  117. extern char *pszHRESULT(HRESULT hr);
  118. extern char *pszWinDbgError(ULONG ulError);
  119. ULONG64
  120. flPrintFlags(
  121. FLAGDEF *pFlagDef,
  122. ULONG64 fl
  123. );
  124. BOOL
  125. bPrintEnum(
  126. ENUMDEF *pEnumDef,
  127. ULONG64 ul
  128. );
  129. // ENTRY.Xxxx
  130. extern ENUMDEF aedENTRY_Objt[];
  131. extern ENUMDEF aedENTRY_FullType[];
  132. extern FLAGDEF afdENTRY_Flags[];
  133. typedef enum {
  134. ENUM_FIELD,
  135. ENUM_FIELD_LIMITED, // Enum list is not a complete list of valid values
  136. FLAG_FIELD,
  137. PARENT_FIELDS,
  138. CALL_FUNC
  139. } EnumFlagType;
  140. typedef struct _EnumFlagEntry EnumFlagEntry;
  141. typedef struct _EnumFlagField {
  142. CHAR FieldName[MAX_PATH];
  143. EnumFlagType EFType;
  144. union {
  145. void *Param; // To alleviate casting in declarations
  146. FLAGDEF *FlagDef;
  147. ENUMDEF *EnumDef;
  148. EnumFlagEntry *Parent;
  149. HRESULT (*EFFunc)(OutputControl*, PDEBUG_CLIENT, PDEBUG_VALUE);
  150. };
  151. } EnumFlagField;
  152. typedef struct _EnumFlagEntry {
  153. CHAR TypeName[MAX_PATH];
  154. ULONG TypeId;
  155. ULONG FieldEntries;
  156. EnumFlagField *FieldEntry;
  157. } EnumFlagEntry;
  158. #define EFTypeEntry(type) { #type, 0, sizeof(aeff##type)/sizeof(aeff##type[0]), aeff##type}
  159. ULONG64
  160. OutputFlags(
  161. OutputControl *OutCtl,
  162. FLAGDEF *pFlagDef,
  163. ULONG64 fl,
  164. BOOL SingleLine
  165. );
  166. BOOL
  167. OutputEnum(
  168. OutputControl *OutCtl,
  169. ENUMDEF *pEnumDef,
  170. ULONG64 ul
  171. );
  172. BOOL
  173. OutputEnumWithParenthesis(
  174. OutputControl *OutCtl,
  175. ENUMDEF *pEnumDef,
  176. ULONG64 ul
  177. );
  178. BOOL
  179. OutputFieldValue(
  180. OutputControl *OutCtl,
  181. EnumFlagEntry *pEFEntry,
  182. const CHAR *pszField,
  183. PDEBUG_VALUE Value,
  184. PDEBUG_CLIENT Client,
  185. BOOL Compact
  186. );
  187. BOOL
  188. OutputTypeFieldValue(
  189. OutputControl *OutCtl,
  190. const CHAR *pszType,
  191. const CHAR *pszField,
  192. PDEBUG_VALUE Value,
  193. PDEBUG_CLIENT Client,
  194. BOOL Compact
  195. );
  196. #endif _FLAGS_HXX_