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.

2474 lines
80 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: flags.cxx
  3. *
  4. * Copyright (c) 1995-2000 Microsoft Corporation
  5. *
  6. \**************************************************************************/
  7. #include "precomp.hxx"
  8. // The following define expands 'FLAG(x)' to '"x", x':
  9. #define FLAG(x) { #x, x }
  10. #define END_FLAG { 0, 0 }
  11. // The following define expands 'ENUM(x)' to '"x", x':
  12. #define ENUM(x) { #x, x }
  13. #define END_ENUM { 0, 0 }
  14. #define CASEENUM(x) case x: psz = #x; break
  15. FLAGDEF afdFDM[] = {
  16. {"FDM_TYPE_BM_SIDE_CONST " , FDM_TYPE_BM_SIDE_CONST },
  17. {"FDM_TYPE_MAXEXT_EQUAL_BM_SIDE " , FDM_TYPE_MAXEXT_EQUAL_BM_SIDE },
  18. {"FDM_TYPE_CHAR_INC_EQUAL_BM_BASE" , FDM_TYPE_CHAR_INC_EQUAL_BM_BASE },
  19. {"FDM_TYPE_ZERO_BEARINGS " , FDM_TYPE_ZERO_BEARINGS },
  20. {"FDM_TYPE_CONST_BEARINGS " , FDM_TYPE_CONST_BEARINGS },
  21. { 0, 0 }
  22. };
  23. FLAGDEF afdPFF[] = {
  24. {"PFF_STATE_READY2DIE ", PFF_STATE_READY2DIE },
  25. {"PFF_STATE_PERMANENT_FONT", PFF_STATE_PERMANENT_FONT},
  26. {"PFF_STATE_NETREMOTE_FONT", PFF_STATE_NETREMOTE_FONT},
  27. {"PFF_STATE_EUDC_FONT ", PFF_STATE_EUDC_FONT },
  28. {"PFF_STATE_MEMORY_FONT ", PFF_STATE_MEMORY_FONT },
  29. {"PFF_STATE_DCREMOTE_FONT ", PFF_STATE_DCREMOTE_FONT },
  30. { 0, 0 }
  31. };
  32. FLAGDEF afdLINEATTRS[] = {
  33. { "LA_GEOMETRIC", LA_GEOMETRIC },
  34. { "LA_ALTERNATE", LA_ALTERNATE },
  35. { "LA_STARTGAP ", LA_STARTGAP },
  36. { "LA_STYLED ", LA_STYLED },
  37. { 0, 0 }
  38. };
  39. FLAGDEF afdDCPATH[] = {
  40. { "DCPATH_ACTIVE ", DCPATH_ACTIVE },
  41. { "DCPATH_SAVE ", DCPATH_SAVE },
  42. { "DCPATH_CLOCKWISE", DCPATH_CLOCKWISE },
  43. { 0, 0 }
  44. };
  45. FLAGDEF afdCOLORADJUSTMENT[] = {
  46. { "CA_NEGATIVE ", CA_NEGATIVE },
  47. { "CA_LOG_FILTER", CA_LOG_FILTER },
  48. { 0, 0 }
  49. };
  50. FLAGDEF afdATTR[] = {
  51. { "ATTR_CACHED ", ATTR_CACHED },
  52. { "ATTR_TO_BE_DELETED", ATTR_TO_BE_DELETED },
  53. { "ATTR_NEW_COLOR ", ATTR_NEW_COLOR },
  54. { "ATTR_CANT_SELECT ", ATTR_CANT_SELECT },
  55. { "ATTR_RGN_VALID ", ATTR_RGN_VALID },
  56. { "ATTR_RGN_DIRTY ", ATTR_RGN_DIRTY },
  57. { 0, 0 }
  58. };
  59. FLAGDEF afdDCla[] = {
  60. { "LA_GEOMETRIC", LA_GEOMETRIC },
  61. { "LA_ALTERNATE", LA_ALTERNATE },
  62. { "LA_STARTGAP ", LA_STARTGAP },
  63. { "LA_STYLED ", LA_STYLED },
  64. { 0, 0 }
  65. };
  66. FLAGDEF afdDCPath[] = {
  67. { "DCPATH_ACTIVE ", DCPATH_ACTIVE },
  68. { "DCPATH_SAVE ", DCPATH_SAVE },
  69. { "DCPATH_CLOCKWISE", DCPATH_CLOCKWISE },
  70. { 0, 0 }
  71. };
  72. FLAGDEF afdDirty[] = {
  73. { "DIRTY_FILL ", DIRTY_FILL },
  74. { "DIRTY_LINE ", DIRTY_LINE },
  75. { "DIRTY_TEXT ", DIRTY_TEXT },
  76. { "DIRTY_BACKGROUND ", DIRTY_BACKGROUND },
  77. { "DIRTY_CHARSET ", DIRTY_CHARSET },
  78. { "SLOW_WIDTHS ", SLOW_WIDTHS },
  79. { "DC_CACHED_TM_VALID ", DC_CACHED_TM_VALID },
  80. { "DISPLAY_DC ", DISPLAY_DC },
  81. { "DIRTY_PTLCURRENT ", DIRTY_PTLCURRENT },
  82. { "DIRTY_PTFXCURRENT ", DIRTY_PTFXCURRENT },
  83. { "DIRTY_STYLESTATE ", DIRTY_STYLESTATE },
  84. { "DC_PLAYMETAFILE ", DC_PLAYMETAFILE },
  85. { "DC_BRUSH_DIRTY ", DC_BRUSH_DIRTY },
  86. { "DC_PEN_DIRTY ", DC_PEN_DIRTY },
  87. { "DC_DIBSECTION ", DC_DIBSECTION },
  88. { "DC_LAST_CLIPRGN_VALID ", DC_LAST_CLIPRGN_VALID },
  89. { "DC_PRIMARY_DISPLAY ", DC_PRIMARY_DISPLAY },
  90. { 0, 0 }
  91. };
  92. FLAGDEF afdPAL[] = {
  93. {"PAL_INDEXED ",PAL_INDEXED },
  94. {"PAL_BITFIELDS ",PAL_BITFIELDS },
  95. {"PAL_RGB ",PAL_RGB },
  96. {"PAL_BGR ",PAL_BGR },
  97. {"PAL_DC ",PAL_DC },
  98. {"PAL_FIXED ",PAL_FIXED },
  99. {"PAL_FREE ",PAL_FREE },
  100. {"PAL_MANAGED ",PAL_MANAGED },
  101. {"PAL_NOSTATIC ",PAL_NOSTATIC },
  102. {"PAL_MONOCHROME ",PAL_MONOCHROME },
  103. {"PAL_BRUSHHACK ",PAL_BRUSHHACK },
  104. {"PAL_DIBSECTION ",PAL_DIBSECTION },
  105. {"PAL_NOSTATIC256 ",PAL_NOSTATIC256 },
  106. {"PAL_HT ",PAL_HT },
  107. {"PAL_RGB16_555 ",PAL_RGB16_555 },
  108. {"PAL_RGB16_565 ",PAL_RGB16_565 },
  109. { 0, 0 }
  110. };
  111. FLAGDEF afdDCFL[] = {
  112. { "DC_FL_PAL_BACK", DC_FL_PAL_BACK },
  113. { 0, 0 }
  114. };
  115. FLAGDEF afdDCFS[] = {
  116. { "DC_DIRTYFONT_XFORM", DC_DIRTYFONT_XFORM },
  117. { "DC_DIRTYFONT_LFONT", DC_DIRTYFONT_LFONT },
  118. { "DC_UFI_MAPPING ", DC_UFI_MAPPING },
  119. { 0, 0 }
  120. };
  121. FLAGDEF afdPD[] = {
  122. { "PD_BEGINSUBPATH", PD_BEGINSUBPATH },
  123. { "PD_ENDSUBPATH ", PD_ENDSUBPATH },
  124. { "PD_RESETSTYLE ", PD_RESETSTYLE },
  125. { "PD_CLOSEFIGURE ", PD_CLOSEFIGURE },
  126. { "PD_BEZIERS ", PD_BEZIERS },
  127. { 0, 0 }
  128. };
  129. FLAGDEF afdFS[] = {
  130. { "PDEV_DISPLAY ", PDEV_DISPLAY },
  131. { "PDEV_HARDWARE_POINTER ", PDEV_HARDWARE_POINTER },
  132. { "PDEV_SOFTWARE_POINTER ", PDEV_SOFTWARE_POINTER },
  133. { "PDEV_GOTFONTS ", PDEV_GOTFONTS },
  134. { "PDEV_PRINTER ", PDEV_PRINTER },
  135. { "PDEV_ALLOCATEDBRUSHES ", PDEV_ALLOCATEDBRUSHES },
  136. { "PDEV_HTPAL_IS_DEVPAL ", PDEV_HTPAL_IS_DEVPAL },
  137. { "PDEV_DISABLED ", PDEV_DISABLED },
  138. { "PDEV_SYNCHRONIZE_ENABLED ", PDEV_SYNCHRONIZE_ENABLED },
  139. { "PDEV_FONTDRIVER ", PDEV_FONTDRIVER },
  140. { "PDEV_GAMMARAMP_TABLE ", PDEV_GAMMARAMP_TABLE },
  141. { "PDEV_UMPD ", PDEV_UMPD },
  142. { "PDEV_SHARED_DEVLOCK ", PDEV_SHARED_DEVLOCK },
  143. { "PDEV_META_DEVICE ", PDEV_META_DEVICE },
  144. { "PDEV_DRIVER_PUNTED_CALL ", PDEV_DRIVER_PUNTED_CALL },
  145. { "PDEV_CLONE_DEVICE ", PDEV_CLONE_DEVICE },
  146. { 0, 0 }
  147. };
  148. FLAGDEF afdDCX[] = {
  149. { "METAFILE_TO_WORLD_IDENTITY ", METAFILE_TO_WORLD_IDENTITY },
  150. { "WORLD_TO_PAGE_IDENTITY ", WORLD_TO_PAGE_IDENTITY },
  151. { "DEVICE_TO_PAGE_INVALID ", DEVICE_TO_PAGE_INVALID },
  152. { "DEVICE_TO_WORLD_INVALID ", DEVICE_TO_WORLD_INVALID },
  153. { "WORLD_TRANSFORM_SET ", WORLD_TRANSFORM_SET },
  154. { "POSITIVE_Y_IS_UP ", POSITIVE_Y_IS_UP },
  155. { "INVALIDATE_ATTRIBUTES ", INVALIDATE_ATTRIBUTES },
  156. { "PTOD_EFM11_NEGATIVE ", PTOD_EFM11_NEGATIVE },
  157. { "PTOD_EFM22_NEGATIVE ", PTOD_EFM22_NEGATIVE },
  158. { "ISO_OR_ANISO_MAP_MODE ", ISO_OR_ANISO_MAP_MODE },
  159. { "PAGE_TO_DEVICE_IDENTITY ", PAGE_TO_DEVICE_IDENTITY },
  160. { "PAGE_TO_DEVICE_SCALE_IDENTITY", PAGE_TO_DEVICE_SCALE_IDENTITY },
  161. { "PAGE_XLATE_CHANGED ", PAGE_XLATE_CHANGED },
  162. { "PAGE_EXTENTS_CHANGED ", PAGE_EXTENTS_CHANGED },
  163. { "WORLD_XFORM_CHANGED ", WORLD_XFORM_CHANGED },
  164. { 0, 0 }
  165. };
  166. FLAGDEF afdDC[] = {
  167. { "DC_DISPLAY ", DC_DISPLAY },
  168. { "DC_DIRECT ", DC_DIRECT },
  169. { "DC_CANCELED ", DC_CANCELED },
  170. { "DC_PERMANANT ", DC_PERMANANT },
  171. { "DC_DIRTY_RAO ", DC_DIRTY_RAO },
  172. { "DC_ACCUM_WMGR ", DC_ACCUM_WMGR },
  173. { "DC_ACCUM_APP ", DC_ACCUM_APP },
  174. { "DC_RESET ", DC_RESET },
  175. { "DC_SYNCHRONIZEACCESS", DC_SYNCHRONIZEACCESS },
  176. { "DC_EPSPRINTINGESCAPE", DC_EPSPRINTINGESCAPE },
  177. { "DC_TEMPINFODC ", DC_TEMPINFODC },
  178. { "DC_FULLSCREEN ", DC_FULLSCREEN },
  179. { "DC_IN_CLONEPDEV ", DC_IN_CLONEPDEV },
  180. { "DC_REDIRECTION ", DC_REDIRECTION },
  181. { "DC_SHAREACCESS ", DC_SHAREACCESS },
  182. { 0, 0 }
  183. };
  184. FLAGDEF afdGC[] = {
  185. { "GCAPS_BEZIERS ", GCAPS_BEZIERS },
  186. { "GCAPS_GEOMETRICWIDE ", GCAPS_GEOMETRICWIDE },
  187. { "GCAPS_ALTERNATEFILL ", GCAPS_ALTERNATEFILL },
  188. { "GCAPS_WINDINGFILL ", GCAPS_WINDINGFILL },
  189. { "GCAPS_HALFTONE ", GCAPS_HALFTONE },
  190. { "GCAPS_COLOR_DITHER ", GCAPS_COLOR_DITHER },
  191. { "GCAPS_HORIZSTRIKE ", GCAPS_HORIZSTRIKE },
  192. { "GCAPS_VERTSTRIKE ", GCAPS_VERTSTRIKE },
  193. { "GCAPS_OPAQUERECT ", GCAPS_OPAQUERECT },
  194. { "GCAPS_VECTORFONT ", GCAPS_VECTORFONT },
  195. { "GCAPS_MONO_DITHER ", GCAPS_MONO_DITHER },
  196. { "GCAPS_ASYNCCHANGE ", GCAPS_ASYNCCHANGE },
  197. { "GCAPS_ASYNCMOVE ", GCAPS_ASYNCMOVE },
  198. { "GCAPS_DONTJOURNAL ", GCAPS_DONTJOURNAL },
  199. { "GCAPS_ARBRUSHOPAQUE ", GCAPS_ARBRUSHOPAQUE },
  200. { "GCAPS_PANNING ", GCAPS_PANNING },
  201. { "GCAPS_HIGHRESTEXT ", GCAPS_HIGHRESTEXT },
  202. { "GCAPS_PALMANAGED ", GCAPS_PALMANAGED },
  203. { "GCAPS_DITHERONREALIZE ", GCAPS_DITHERONREALIZE },
  204. { "GCAPS_NO64BITMEMACCESS", GCAPS_NO64BITMEMACCESS },
  205. { "GCAPS_FORCEDITHER ", GCAPS_FORCEDITHER },
  206. { "GCAPS_GRAY16 ", GCAPS_GRAY16 },
  207. { "GCAPS_ICM ", GCAPS_ICM },
  208. { "GCAPS_CMYKCOLOR ", GCAPS_CMYKCOLOR },
  209. { 0, 0 }
  210. };
  211. FLAGDEF afdGC2[] = {
  212. { "GCAPS2_JPEGSRC ", GCAPS2_JPEGSRC },
  213. { "GCAPS2_SYNCFLUSH ", GCAPS2_SYNCFLUSH },
  214. { "GCAPS2_PNGSRC ", GCAPS2_PNGSRC },
  215. { 0, 0 }
  216. };
  217. FLAGDEF afdTSIM[] = {
  218. { "TO_MEM_ALLOCATED ", TO_MEM_ALLOCATED },
  219. { "TO_ALL_PTRS_VALID", TO_ALL_PTRS_VALID },
  220. { "TO_VALID ", TO_VALID },
  221. { "TO_ESC_NOT_ORIENT", TO_ESC_NOT_ORIENT },
  222. { "TO_PWSZ_ALLOCATED", TO_PWSZ_ALLOCATED },
  223. { "TO_HIGHRESTEXT ", TO_HIGHRESTEXT },
  224. { "TSIM_UNDERLINE1 ", TSIM_UNDERLINE1 },
  225. { "TSIM_UNDERLINE2 ", TSIM_UNDERLINE2 },
  226. { "TSIM_STRIKEOUT ", TSIM_STRIKEOUT },
  227. { 0, 0 }
  228. };
  229. FLAGDEF afdRC[] = {
  230. { "RC_NONE ", RC_NONE },
  231. { "RC_BITBLT ", RC_BITBLT },
  232. { "RC_BANDING ", RC_BANDING },
  233. { "RC_SCALING ", RC_SCALING },
  234. { "RC_BITMAP64 ", RC_BITMAP64 },
  235. { "RC_GDI20_OUTPUT", RC_GDI20_OUTPUT },
  236. { "RC_GDI20_STATE ", RC_GDI20_STATE },
  237. { "RC_SAVEBITMAP ", RC_SAVEBITMAP },
  238. { "RC_DI_BITMAP ", RC_DI_BITMAP },
  239. { "RC_PALETTE ", RC_PALETTE },
  240. { "RC_DIBTODEV ", RC_DIBTODEV },
  241. { "RC_BIGFONT ", RC_BIGFONT },
  242. { "RC_STRETCHBLT ", RC_STRETCHBLT },
  243. { "RC_FLOODFILL ", RC_FLOODFILL },
  244. { "RC_STRETCHDIB ", RC_STRETCHDIB },
  245. { "RC_OP_DX_OUTPUT", RC_OP_DX_OUTPUT },
  246. { "RC_DEVBITS ", RC_DEVBITS },
  247. { 0 , 0 }
  248. };
  249. FLAGDEF afdTC[] = {
  250. { "TC_OP_CHARACTER", TC_OP_CHARACTER },
  251. { "TC_OP_STROKE ", TC_OP_STROKE },
  252. { "TC_CP_STROKE ", TC_CP_STROKE },
  253. { "TC_CR_90 ", TC_CR_90 },
  254. { "TC_CR_ANY ", TC_CR_ANY },
  255. { "TC_SF_X_YINDEP ", TC_SF_X_YINDEP },
  256. { "TC_SA_DOUBLE ", TC_SA_DOUBLE },
  257. { "TC_SA_INTEGER ", TC_SA_INTEGER },
  258. { "TC_SA_CONTIN ", TC_SA_CONTIN },
  259. { "TC_EA_DOUBLE ", TC_EA_DOUBLE },
  260. { "TC_IA_ABLE ", TC_IA_ABLE },
  261. { "TC_UA_ABLE ", TC_UA_ABLE },
  262. { "TC_SO_ABLE ", TC_SO_ABLE },
  263. { "TC_RA_ABLE ", TC_RA_ABLE },
  264. { "TC_VA_ABLE ", TC_VA_ABLE },
  265. { "TC_RESERVED ", TC_RESERVED },
  266. { "TC_SCROLLBLT ", TC_SCROLLBLT },
  267. { 0 , 0 }
  268. };
  269. FLAGDEF afdHT[] = {
  270. { "HT_FLAG_SQUARE_DEVICE_PEL", HT_FLAG_SQUARE_DEVICE_PEL },
  271. { "HT_FLAG_HAS_BLACK_DYE ", HT_FLAG_HAS_BLACK_DYE },
  272. { "HT_FLAG_ADDITIVE_PRIMS ", HT_FLAG_ADDITIVE_PRIMS },
  273. { "HT_FLAG_OUTPUT_CMY ", HT_FLAG_OUTPUT_CMY },
  274. { 0 , 0 }
  275. };
  276. FLAGDEF afdDCfs[] = {
  277. { "DC_DISPLAY ", DC_DISPLAY },
  278. { "DC_DIRECT ", DC_DIRECT },
  279. { "DC_CANCELED ", DC_CANCELED },
  280. { "DC_PERMANANT ", DC_PERMANANT },
  281. { "DC_DIRTY_RAO ", DC_DIRTY_RAO },
  282. { "DC_ACCUM_WMGR ", DC_ACCUM_WMGR },
  283. { "DC_ACCUM_APP ", DC_ACCUM_APP },
  284. { "DC_RESET ", DC_RESET },
  285. { "DC_SYNCHRONIZEACCESS", DC_SYNCHRONIZEACCESS },
  286. { "DC_EPSPRINTINGESCAPE", DC_EPSPRINTINGESCAPE },
  287. { "DC_TEMPINFODC ", DC_TEMPINFODC },
  288. { "DC_FULLSCREEN ", DC_FULLSCREEN },
  289. { "DC_IN_CLONEPDEV ", DC_IN_CLONEPDEV },
  290. { "DC_REDIRECTION ", DC_REDIRECTION },
  291. { 0, 0 }
  292. };
  293. FLAGDEF afdGInfo[] = {
  294. { "GCAPS_BEZIERS ", GCAPS_BEZIERS },
  295. { "GCAPS_GEOMETRICWIDE ", GCAPS_GEOMETRICWIDE },
  296. { "GCAPS_ALTERNATEFILL ", GCAPS_ALTERNATEFILL },
  297. { "GCAPS_WINDINGFILL ", GCAPS_WINDINGFILL },
  298. { "GCAPS_HALFTONE ", GCAPS_HALFTONE },
  299. { "GCAPS_COLOR_DITHER ", GCAPS_COLOR_DITHER },
  300. { "GCAPS_HORIZSTRIKE ", GCAPS_HORIZSTRIKE },
  301. { "GCAPS_VERTSTRIKE ", GCAPS_VERTSTRIKE },
  302. { "GCAPS_OPAQUERECT ", GCAPS_OPAQUERECT },
  303. { "GCAPS_VECTORFONT ", GCAPS_VECTORFONT },
  304. { "GCAPS_MONO_DITHER ", GCAPS_MONO_DITHER },
  305. { "GCAPS_ASYNCCHANGE ", GCAPS_ASYNCCHANGE },
  306. { "GCAPS_ASYNCMOVE ", GCAPS_ASYNCMOVE },
  307. { "GCAPS_DONTJOURNAL ", GCAPS_DONTJOURNAL },
  308. { "GCAPS_ARBRUSHOPAQUE ", GCAPS_ARBRUSHOPAQUE },
  309. { "GCAPS_HIGHRESTEXT ", GCAPS_HIGHRESTEXT },
  310. { "GCAPS_PALMANAGED ", GCAPS_PALMANAGED },
  311. { "GCAPS_DITHERONREALIZE ", GCAPS_DITHERONREALIZE },
  312. { "GCAPS_NO64BITMEMACCESS", GCAPS_NO64BITMEMACCESS },
  313. { "GCAPS_FORCEDITHER ", GCAPS_FORCEDITHER },
  314. { "GCAPS_GRAY16 ", GCAPS_GRAY16 },
  315. { "GCAPS_ICM ", GCAPS_ICM },
  316. { "GCAPS_CMYKCOLOR ", GCAPS_CMYKCOLOR },
  317. { 0, 0 }
  318. };
  319. // IFIMETRICS::flInfo
  320. FLAGDEF afdInfo[] = {
  321. { "FM_INFO_TECH_TRUETYPE ", FM_INFO_TECH_TRUETYPE },
  322. { "FM_INFO_TECH_BITMAP ", FM_INFO_TECH_BITMAP },
  323. { "FM_INFO_TECH_STROKE ", FM_INFO_TECH_STROKE },
  324. { "FM_INFO_TECH_OUTLINE_NOT_TRUETYPE", FM_INFO_TECH_OUTLINE_NOT_TRUETYPE },
  325. { "FM_INFO_ARB_XFORMS ", FM_INFO_ARB_XFORMS },
  326. { "FM_INFO_1BPP ", FM_INFO_1BPP },
  327. { "FM_INFO_4BPP ", FM_INFO_4BPP },
  328. { "FM_INFO_8BPP ", FM_INFO_8BPP },
  329. { "FM_INFO_16BPP ", FM_INFO_16BPP },
  330. { "FM_INFO_24BPP ", FM_INFO_24BPP },
  331. { "FM_INFO_32BPP ", FM_INFO_32BPP },
  332. { "FM_INFO_INTEGER_WIDTH ", FM_INFO_INTEGER_WIDTH },
  333. { "FM_INFO_CONSTANT_WIDTH ", FM_INFO_CONSTANT_WIDTH },
  334. { "FM_INFO_NOT_CONTIGUOUS ", FM_INFO_NOT_CONTIGUOUS },
  335. { "FM_INFO_TECH_MM ", FM_INFO_TECH_MM },
  336. { "FM_INFO_RETURNS_OUTLINES ", FM_INFO_RETURNS_OUTLINES },
  337. { "FM_INFO_RETURNS_STROKES ", FM_INFO_RETURNS_STROKES },
  338. { "FM_INFO_RETURNS_BITMAPS ", FM_INFO_RETURNS_BITMAPS },
  339. { "FM_INFO_DSIG ", FM_INFO_DSIG },
  340. { "FM_INFO_RIGHT_HANDED ", FM_INFO_RIGHT_HANDED },
  341. { "FM_INFO_INTEGRAL_SCALING ", FM_INFO_INTEGRAL_SCALING },
  342. { "FM_INFO_90DEGREE_ROTATIONS ", FM_INFO_90DEGREE_ROTATIONS },
  343. { "FM_INFO_OPTICALLY_FIXED_PITCH ", FM_INFO_OPTICALLY_FIXED_PITCH },
  344. { "FM_INFO_DO_NOT_ENUMERATE ", FM_INFO_DO_NOT_ENUMERATE },
  345. { "FM_INFO_ISOTROPIC_SCALING_ONLY ", FM_INFO_ISOTROPIC_SCALING_ONLY },
  346. { "FM_INFO_ANISOTROPIC_SCALING_ONLY ", FM_INFO_ANISOTROPIC_SCALING_ONLY },
  347. { "FM_INFO_TECH_CFF ", FM_INFO_TECH_CFF },
  348. { "FM_INFO_FAMILY_EQUIV ", FM_INFO_FAMILY_EQUIV },
  349. { "FM_INFO_DBCS_FIXED_PITCH ", FM_INFO_DBCS_FIXED_PITCH },
  350. { "FM_INFO_NONNEGATIVE_AC ", FM_INFO_NONNEGATIVE_AC },
  351. { "FM_INFO_IGNORE_TC_RA_ABLE ", FM_INFO_IGNORE_TC_RA_ABLE },
  352. { "FM_INFO_TECH_TYPE1 ", FM_INFO_TECH_TYPE1 },
  353. { 0, 0 }
  354. };
  355. FLAGDEF afdFM_SEL[] = {
  356. { "FM_SEL_ITALIC ", FM_SEL_ITALIC },
  357. { "FM_SEL_UNDERSCORE", FM_SEL_UNDERSCORE},
  358. { "FM_SEL_NEGATIVE ", FM_SEL_NEGATIVE },
  359. { "FM_SEL_OUTLINED ", FM_SEL_OUTLINED },
  360. { "FM_SEL_STRIKEOUT ", FM_SEL_STRIKEOUT },
  361. { "FM_SEL_BOLD ", FM_SEL_BOLD },
  362. { "FM_SEL_REGULAR ", FM_SEL_REGULAR },
  363. { 0, 0 }
  364. };
  365. // STROBJ::flAccel
  366. FLAGDEF afdSO[] = {
  367. { "SO_FLAG_DEFAULT_PLACEMENT", SO_FLAG_DEFAULT_PLACEMENT },
  368. { "SO_HORIZONTAL ", SO_HORIZONTAL },
  369. { "SO_VERTICAL ", SO_VERTICAL },
  370. { "SO_REVERSED ", SO_REVERSED },
  371. { "SO_ZERO_BEARINGS ", SO_ZERO_BEARINGS },
  372. { "SO_CHAR_INC_EQUAL_BM_BASE", SO_CHAR_INC_EQUAL_BM_BASE },
  373. { "SO_MAXEXT_EQUAL_BM_SIDE ", SO_MAXEXT_EQUAL_BM_SIDE },
  374. { 0, 0 }
  375. };
  376. // ESTROBJ::flTO
  377. FLAGDEF afdTO[] = {
  378. { "TO_MEM_ALLOCATED ", TO_MEM_ALLOCATED },
  379. { "TO_ALL_PTRS_VALID", TO_ALL_PTRS_VALID },
  380. { "TO_VALID ", TO_VALID },
  381. { "TO_ESC_NOT_ORIENT", TO_ESC_NOT_ORIENT },
  382. { "TO_PWSZ_ALLOCATED", TO_PWSZ_ALLOCATED },
  383. { "TO_HIGHRESTEXT ", TO_HIGHRESTEXT },
  384. { "TO_BITMAPS ", TO_BITMAPS },
  385. { "TO_PARTITION_INIT", TO_PARTITION_INIT },
  386. { "TO_ALLOC_FACENAME", TO_ALLOC_FACENAME },
  387. { "TO_SYS_PARTITION ", TO_SYS_PARTITION },
  388. { "TSIM_UNDERLINE1 ", TSIM_UNDERLINE1 },
  389. { "TSIM_UNDERLINE2 ", TSIM_UNDERLINE2 },
  390. { "TSIM_STRIKEOUT ", TSIM_STRIKEOUT },
  391. { 0, 0 }
  392. };
  393. // DCLEVEL::flXform
  394. FLAGDEF afdflx[] = {
  395. { "METAFILE_TO_WORLD_IDENTITY ", METAFILE_TO_WORLD_IDENTITY },
  396. { "WORLD_TO_PAGE_IDENTITY ", WORLD_TO_PAGE_IDENTITY },
  397. { "DEVICE_TO_PAGE_INVALID ", DEVICE_TO_PAGE_INVALID },
  398. { "DEVICE_TO_WORLD_INVALID ", DEVICE_TO_WORLD_INVALID },
  399. { "WORLD_TRANSFORM_SET ", WORLD_TRANSFORM_SET },
  400. { "POSITIVE_Y_IS_UP ", POSITIVE_Y_IS_UP },
  401. { "INVALIDATE_ATTRIBUTES ", INVALIDATE_ATTRIBUTES },
  402. { "PTOD_EFM11_NEGATIVE ", PTOD_EFM11_NEGATIVE },
  403. { "PTOD_EFM22_NEGATIVE ", PTOD_EFM22_NEGATIVE },
  404. { "ISO_OR_ANISO_MAP_MODE ", ISO_OR_ANISO_MAP_MODE },
  405. { "PAGE_TO_DEVICE_IDENTITY ", PAGE_TO_DEVICE_IDENTITY },
  406. { "PAGE_TO_DEVICE_SCALE_IDENTITY", PAGE_TO_DEVICE_SCALE_IDENTITY },
  407. { "PAGE_XLATE_CHANGED ", PAGE_XLATE_CHANGED },
  408. { "PAGE_EXTENTS_CHANGED ", PAGE_EXTENTS_CHANGED },
  409. { "WORLD_XFORM_CHANGED ", WORLD_XFORM_CHANGED },
  410. { 0, 0 }
  411. };
  412. // DCLEVEL::flFontState
  413. FLAGDEF afdFS2[] = {
  414. { "DC_DIRTYFONT_XFORM", DC_DIRTYFONT_XFORM },
  415. { "DC_DIRTYFONT_LFONT", DC_DIRTYFONT_LFONT },
  416. { "DC_UFI_MAPPING ", DC_UFI_MAPPING },
  417. { 0, 0 }
  418. };
  419. // RFONT::flType
  420. FLAGDEF afdRT[] = {
  421. { "RFONT_TYPE_NOCACHE", RFONT_TYPE_NOCACHE },
  422. { "RFONT_TYPE_UNICODE", RFONT_TYPE_UNICODE },
  423. { "RFONT_TYPE_HGLYPH ", RFONT_TYPE_HGLYPH },
  424. { 0, 0 }
  425. };
  426. // FONTOBJ::flFontType
  427. FLAGDEF afdFO[] = {
  428. { "FO_TYPE_RASTER ", FO_TYPE_RASTER },
  429. { "FO_TYPE_DEVICE ", FO_TYPE_DEVICE },
  430. { "FO_TYPE_TRUETYPE", FO_TYPE_TRUETYPE },
  431. { "FO_SIM_BOLD ", FO_SIM_BOLD },
  432. { "FO_SIM_ITALIC ", FO_SIM_ITALIC },
  433. { "FO_EM_HEIGHT ", FO_EM_HEIGHT },
  434. { "FO_GRAY16 ", FO_GRAY16 },
  435. { "FO_NOHINTS ", FO_NOHINTS },
  436. { "FO_NO_CHOICE ", FO_NO_CHOICE },
  437. { 0, 0 }
  438. };
  439. // FD_GLYPHSET::flAccel
  440. FLAGDEF afdGS[] = {
  441. { "GS_UNICODE_HANDLES", GS_UNICODE_HANDLES },
  442. { "GS_8BIT_HANDLES ", GS_8BIT_HANDLES },
  443. { "GS_16BIT_HANDLES ", GS_16BIT_HANDLES },
  444. { 0, 0 }
  445. };
  446. // IFIMETRICS::fsType
  447. FLAGDEF afdFM_TYPE[] = {
  448. { "FM_TYPE_LICENSED ", FM_TYPE_LICENSED },
  449. { "FM_READONLY_EMBED", FM_READONLY_EMBED },
  450. { "FM_EDITABLE_EMBED", FM_EDITABLE_EMBED },
  451. { 0, 0 }
  452. };
  453. FLAGDEF afdPFE[] = {
  454. { "PFE_DEVICEFONT ", PFE_DEVICEFONT },
  455. { "PFE_DEADSTATE ", PFE_DEADSTATE },
  456. { "PFE_REMOTEFONT ", PFE_REMOTEFONT },
  457. { "PFE_EUDC ", PFE_EUDC },
  458. { "PFE_SBCS_SYSTEM", PFE_SBCS_SYSTEM},
  459. { "PFE_UFIMATCH ", PFE_UFIMATCH },
  460. { "PFE_MEMORYFONT ", PFE_MEMORYFONT },
  461. { "PFE_DBCS_FONT ", PFE_DBCS_FONT },
  462. { "PFE_VERT_FACE ", PFE_VERT_FACE },
  463. { 0, 0 }
  464. };
  465. FLAGDEF afdBMF[] = {
  466. { "BMF_TOPDOWN ", BMF_TOPDOWN },
  467. { "BMF_NOZEROINIT ", BMF_NOZEROINIT },
  468. { "BMF_DONTCACHE ", BMF_DONTCACHE },
  469. { "BMF_USERMEM ", BMF_USERMEM },
  470. { "BMF_KMSECTION ", BMF_KMSECTION },
  471. { "BMF_NOTSYSMEM ", BMF_NOTSYSMEM },
  472. FLAG(BMF_WINDOW_BLT),
  473. FLAG(BMF_UMPDMEM),
  474. FLAG(BMF_ISREADONLY),
  475. FLAG(BMF_MAKEREADWRITE),
  476. { 0, 0 }
  477. };
  478. FLAGDEF afdDDSCAPS[] = {
  479. { "DDSCAPS_ALPHA ", DDSCAPS_ALPHA },
  480. { "DDSCAPS_BACKBUFFER ", DDSCAPS_BACKBUFFER },
  481. { "DDSCAPS_COMPLEX ", DDSCAPS_COMPLEX },
  482. { "DDSCAPS_FLIP ", DDSCAPS_FLIP },
  483. { "DDSCAPS_FRONTBUFFER ", DDSCAPS_FRONTBUFFER },
  484. { "DDSCAPS_OFFSCREENPLAIN ", DDSCAPS_OFFSCREENPLAIN },
  485. { "DDSCAPS_OVERLAY ", DDSCAPS_OVERLAY },
  486. { "DDSCAPS_PALETTE ", DDSCAPS_PALETTE },
  487. { "DDSCAPS_PRIMARYSURFACE ", DDSCAPS_PRIMARYSURFACE },
  488. { "DDSCAPS_PRIMARYSURFACELEFT ", DDSCAPS_PRIMARYSURFACELEFT },
  489. { "DDSCAPS_SYSTEMMEMORY ", DDSCAPS_SYSTEMMEMORY },
  490. { "DDSCAPS_TEXTURE ", DDSCAPS_TEXTURE },
  491. { "DDSCAPS_3DDEVICE ", DDSCAPS_3DDEVICE },
  492. { "DDSCAPS_VIDEOMEMORY ", DDSCAPS_VIDEOMEMORY },
  493. { "DDSCAPS_VISIBLE ", DDSCAPS_VISIBLE },
  494. { "DDSCAPS_WRITEONLY ", DDSCAPS_WRITEONLY },
  495. { "DDSCAPS_ZBUFFER ", DDSCAPS_ZBUFFER },
  496. { "DDSCAPS_OWNDC ", DDSCAPS_OWNDC },
  497. { "DDSCAPS_LIVEVIDEO ", DDSCAPS_LIVEVIDEO },
  498. { "DDSCAPS_HWCODEC ", DDSCAPS_HWCODEC },
  499. { "DDSCAPS_MODEX ", DDSCAPS_MODEX },
  500. { "DDSCAPS_MIPMAP ", DDSCAPS_MIPMAP },
  501. { "DDSCAPS_ALLOCONLOAD ", DDSCAPS_ALLOCONLOAD },
  502. { "DDSCAPS_VIDEOPORT ", DDSCAPS_VIDEOPORT },
  503. { "DDSCAPS_LOCALVIDMEM ", DDSCAPS_LOCALVIDMEM },
  504. { "DDSCAPS_NONLOCALVIDMEM ", DDSCAPS_NONLOCALVIDMEM },
  505. { "DDSCAPS_STANDARDVGAMODE ", DDSCAPS_STANDARDVGAMODE },
  506. { "DDSCAPS_OPTIMIZED ", DDSCAPS_OPTIMIZED },
  507. { 0, 0 }
  508. };
  509. FLAGDEF afdDDSCAPS2[] = {
  510. { "DDSCAPS2_HARDWAREDEINTERLACE ", DDSCAPS2_HARDWAREDEINTERLACE },
  511. { "DDSCAPS2_HINTDYNAMIC ", DDSCAPS2_HINTDYNAMIC },
  512. { "DDSCAPS2_HINTSTATIC ", DDSCAPS2_HINTSTATIC },
  513. { "DDSCAPS2_TEXTUREMANAGE ", DDSCAPS2_TEXTUREMANAGE },
  514. { "DDSCAPS2_RESERVED1 ", DDSCAPS2_RESERVED1 },
  515. { "DDSCAPS2_RESERVED2 ", DDSCAPS2_RESERVED2 },
  516. { "DDSCAPS2_OPAQUE ", DDSCAPS2_OPAQUE },
  517. { "DDSCAPS2_HINTANTIALIASING ", DDSCAPS2_HINTANTIALIASING },
  518. { "DDSCAPS2_CUBEMAP ", DDSCAPS2_CUBEMAP },
  519. { "DDSCAPS2_CUBEMAP_POSITIVEX ", DDSCAPS2_CUBEMAP_POSITIVEX },
  520. { "DDSCAPS2_CUBEMAP_NEGATIVEX ", DDSCAPS2_CUBEMAP_NEGATIVEX },
  521. { "DDSCAPS2_CUBEMAP_POSITIVEY ", DDSCAPS2_CUBEMAP_POSITIVEY },
  522. { "DDSCAPS2_CUBEMAP_NEGATIVEY ", DDSCAPS2_CUBEMAP_NEGATIVEY },
  523. { "DDSCAPS2_CUBEMAP_POSITIVEZ ", DDSCAPS2_CUBEMAP_POSITIVEZ },
  524. { "DDSCAPS2_CUBEMAP_NEGATIVEZ ", DDSCAPS2_CUBEMAP_NEGATIVEZ },
  525. { "DDSCAPS2_CUBEMAP_ALLFACES ", DDSCAPS2_CUBEMAP_ALLFACES },
  526. { "DDSCAPS2_MIPMAPSUBLEVEL ", DDSCAPS2_MIPMAPSUBLEVEL },
  527. { 0, 0 }
  528. };
  529. FLAGDEF afdDDRAWISURF[] = {
  530. FLAG(DDRAWISURF_HASCKEYSRCBLT),
  531. FLAG(DDRAWISURF_HASPIXELFORMAT),
  532. FLAG(DDRAWISURF_FRONTBUFFER),
  533. FLAG(DDRAWISURF_BACKBUFFER),
  534. END_FLAG
  535. };
  536. #if ENABLE_ALL_FLAGS
  537. FLAGDEF afdDDSURFACEFL[] = {
  538. FLAG(DD_SURFACE_FLAG_PRIMARY),
  539. FLAG(DD_SURFACE_FLAG_CLIP),
  540. FLAG(DD_SURFACE_FLAG_DRIVER_CREATED),
  541. FLAG(DD_SURFACE_FLAG_CREATE_COMPLETE),
  542. FLAG(DD_SURFACE_FLAG_UMEM_ALLOCATED),
  543. FLAG(DD_SURFACE_FLAG_VMEM_ALLOCATED),
  544. END_FLAG
  545. };
  546. #endif // ENABLE_ALL_FLAGS
  547. FLAGDEF afdDDPIXELFORMAT[] = {
  548. FLAG(DDPF_ALPHAPIXELS),
  549. FLAG(DDPF_ALPHA),
  550. FLAG(DDPF_FOURCC),
  551. FLAG(DDPF_PALETTEINDEXED4),
  552. FLAG(DDPF_PALETTEINDEXEDTO8),
  553. FLAG(DDPF_PALETTEINDEXED8),
  554. FLAG(DDPF_RGB),
  555. FLAG(DDPF_COMPRESSED),
  556. FLAG(DDPF_RGBTOYUV),
  557. FLAG(DDPF_YUV),
  558. FLAG(DDPF_ZBUFFER),
  559. FLAG(DDPF_PALETTEINDEXED1),
  560. FLAG(DDPF_PALETTEINDEXED2),
  561. FLAG(DDPF_ZPIXELS),
  562. END_FLAG
  563. };
  564. FLAGDEF afdDVERIFIER[] = {
  565. FLAG(DRIVER_VERIFIER_SPECIAL_POOLING),
  566. FLAG(DRIVER_VERIFIER_FORCE_IRQL_CHECKING),
  567. FLAG(DRIVER_VERIFIER_INJECT_ALLOCATION_FAILURES),
  568. FLAG(DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS),
  569. FLAG(DRIVER_VERIFIER_IO_CHECKING),
  570. END_FLAG
  571. };
  572. char *pszGraphicsMode(LONG l)
  573. {
  574. char *psz;
  575. switch (l) {
  576. case GM_COMPATIBLE: psz = "GM_COMPATIBLE"; break;
  577. case GM_ADVANCED : psz = "GM_ADVANCED" ; break;
  578. default : psz = "GM_?" ; break;
  579. }
  580. return( psz );
  581. }
  582. char *pszROP2(LONG l)
  583. {
  584. char *psz;
  585. switch (l) {
  586. case R2_BLACK : psz = "R2_BLACK" ; break;
  587. case R2_NOTMERGEPEN: psz = "R2_NOTMERGEPEN"; break;
  588. case R2_MASKNOTPEN : psz = "R2_MASKNOTPEN" ; break;
  589. case R2_NOTCOPYPEN : psz = "R2_NOTCOPYPEN" ; break;
  590. case R2_MASKPENNOT : psz = "R2_MASKPENNOT" ; break;
  591. case R2_NOT : psz = "R2_NOT" ; break;
  592. case R2_XORPEN : psz = "R2_XORPEN" ; break;
  593. case R2_NOTMASKPEN : psz = "R2_NOTMASKPEN" ; break;
  594. case R2_MASKPEN : psz = "R2_MASKPEN" ; break;
  595. case R2_NOTXORPEN : psz = "R2_NOTXORPEN" ; break;
  596. case R2_NOP : psz = "R2_NOP" ; break;
  597. case R2_MERGENOTPEN: psz = "R2_MERGENOTPEN"; break;
  598. case R2_COPYPEN : psz = "R2_COPYPEN" ; break;
  599. case R2_MERGEPENNOT: psz = "R2_MERGEPENNOT"; break;
  600. case R2_MERGEPEN : psz = "R2_MERGEPEN" ; break;
  601. case R2_WHITE : psz = "R2_WHITE" ; break;
  602. default : psz = "R2_?" ; break;
  603. }
  604. return( psz );
  605. }
  606. char *pszDCTYPE(LONG l)
  607. {
  608. char *psz;
  609. switch (l) {
  610. case DCTYPE_DIRECT: psz = "DCTYPE_DIRECT"; break;
  611. case DCTYPE_MEMORY: psz = "DCTYPE_MEMORY"; break;
  612. case DCTYPE_INFO : psz = "DCTYPE_INFO" ; break;
  613. default : psz = "DCTYPE_?" ; break;
  614. }
  615. return( psz );
  616. }
  617. char *pszTA_V(long l)
  618. {
  619. char *psz;
  620. switch (l & ( TA_TOP | TA_BOTTOM | TA_BASELINE )) {
  621. case TA_TOP : psz = "TA_TOP" ; break;
  622. case TA_RIGHT : psz = "TA_BOTTOM" ; break;
  623. case TA_CENTER: psz = "TA_BASELINE"; break;
  624. default : psz = "TA_?" ; break ;
  625. }
  626. return( psz );
  627. }
  628. char *pszTA_H(long l)
  629. {
  630. char *psz;
  631. switch (l & ( TA_LEFT | TA_RIGHT | TA_CENTER )) {
  632. case TA_LEFT : psz = "TA_LEFT" ; break;
  633. case TA_RIGHT : psz = "TA_RIGHT" ; break;
  634. case TA_CENTER: psz = "TA_CENTER"; break;
  635. default : psz = "TA_?" ; break;
  636. }
  637. return( psz );
  638. }
  639. char *pszTA_U(long l)
  640. {
  641. char *psz;
  642. switch (l & (TA_NOUPDATECP | TA_UPDATECP)) {
  643. case TA_NOUPDATECP: psz = "TA_NOUPDATECP"; break;
  644. case TA_UPDATECP : psz = "TA_UPDATECP" ; break;
  645. default : psz = "TA_?" ; break;
  646. }
  647. return( psz );
  648. }
  649. char *pszMapMode(long l)
  650. {
  651. char *psz;
  652. switch (l) {
  653. case MM_TEXT : psz = "MM_TEXT" ; break;
  654. case MM_LOMETRIC : psz = "MM_LOMETRIC" ; break;
  655. case MM_HIMETRIC : psz = "MM_HIMETRIC" ; break;
  656. case MM_LOENGLISH : psz = "MM_LOENGLISH" ; break;
  657. case MM_HIENGLISH : psz = "MM_HIENGLISH" ; break;
  658. case MM_TWIPS : psz = "MM_TWIPS" ; break;
  659. case MM_ISOTROPIC : psz = "MM_ISOTROPIC" ; break;
  660. case MM_ANISOTROPIC: psz = "MM_ANISOTROPIC"; break;
  661. default : psz = "MM_?" ; break;
  662. }
  663. return( psz );
  664. }
  665. char *pszBkMode(long l)
  666. {
  667. char *psz;
  668. switch (l) {
  669. case TRANSPARENT: psz = "TRANSPARENT"; break;
  670. case OPAQUE : psz = "OPAQUE" ; break;
  671. default : psz = "BKMODE_?" ; break;
  672. }
  673. return( psz );
  674. }
  675. char *pszFW(long l)
  676. {
  677. char *psz;
  678. switch ( l ) {
  679. case FW_DONTCARE : psz = "FW_DONTCARE "; break;
  680. case FW_THIN : psz = "FW_THIN "; break;
  681. case FW_EXTRALIGHT: psz = "FW_EXTRALIGHT"; break;
  682. case FW_LIGHT : psz = "FW_LIGHT "; break;
  683. case FW_NORMAL : psz = "FW_NORMAL "; break;
  684. case FW_MEDIUM : psz = "FW_MEDIUM "; break;
  685. case FW_SEMIBOLD : psz = "FW_SEMIBOLD "; break;
  686. case FW_BOLD : psz = "FW_BOLD "; break;
  687. case FW_EXTRABOLD : psz = "FW_EXTRABOLD "; break;
  688. case FW_HEAVY : psz = "FW_HEAVY "; break;
  689. default : psz = "?FW" ; break;
  690. }
  691. return( psz );
  692. }
  693. char *pszCHARSET(long l)
  694. {
  695. char *psz;
  696. switch ( l ) {
  697. case ANSI_CHARSET : psz = "ANSI_CHARSET "; break;
  698. case DEFAULT_CHARSET : psz = "DEFAULT_CHARSET "; break;
  699. case SYMBOL_CHARSET : psz = "SYMBOL_CHARSET "; break;
  700. case SHIFTJIS_CHARSET : psz = "SHIFTJIS_CHARSET "; break;
  701. case HANGEUL_CHARSET : psz = "HANGEUL_CHARSET "; break;
  702. case GB2312_CHARSET : psz = "GB2312_CHARSET "; break;
  703. case CHINESEBIG5_CHARSET : psz = "CHINESEBIG5_CHARSET"; break;
  704. case OEM_CHARSET : psz = "OEM_CHARSET "; break;
  705. case JOHAB_CHARSET : psz = "JOHAB_CHARSET "; break;
  706. case HEBREW_CHARSET : psz = "HEBREW_CHARSET "; break;
  707. case ARABIC_CHARSET : psz = "ARABIC_CHARSET "; break;
  708. case GREEK_CHARSET : psz = "GREEK_CHARSET "; break;
  709. case TURKISH_CHARSET : psz = "TURKISH_CHARSET "; break;
  710. case THAI_CHARSET : psz = "THAI_CHARSET "; break;
  711. case EASTEUROPE_CHARSET : psz = "EASTEUROPE_CHARSET "; break;
  712. case RUSSIAN_CHARSET : psz = "RUSSIAN_CHARSET "; break;
  713. case BALTIC_CHARSET : psz = "BALTIC_CHARSET "; break;
  714. default : psz = "?_CHARSET" ; break;
  715. }
  716. return( psz );
  717. }
  718. char *pszOUT_PRECIS( long l )
  719. {
  720. char *psz;
  721. switch ( l ) {
  722. case OUT_DEFAULT_PRECIS : psz = "OUT_DEFAULT_PRECIS "; break;
  723. case OUT_STRING_PRECIS : psz = "OUT_STRING_PRECIS "; break;
  724. case OUT_CHARACTER_PRECIS : psz = "OUT_CHARACTER_PRECIS"; break;
  725. case OUT_STROKE_PRECIS : psz = "OUT_STROKE_PRECIS "; break;
  726. case OUT_TT_PRECIS : psz = "OUT_TT_PRECIS "; break;
  727. case OUT_DEVICE_PRECIS : psz = "OUT_DEVICE_PRECIS "; break;
  728. case OUT_RASTER_PRECIS : psz = "OUT_RASTER_PRECIS "; break;
  729. case OUT_TT_ONLY_PRECIS : psz = "OUT_TT_ONLY_PRECIS "; break;
  730. case OUT_OUTLINE_PRECIS : psz = "OUT_OUTLINE_PRECIS "; break;
  731. default : psz = "OUT_?" ; break;
  732. }
  733. return( psz );
  734. }
  735. char achFlags[100];
  736. char *pszCLIP_PRECIS( long l )
  737. {
  738. char *psz, *pch;
  739. switch ( l & CLIP_MASK) {
  740. case CLIP_DEFAULT_PRECIS : psz = "CLIP_DEFAULT_PRECIS "; break;
  741. case CLIP_CHARACTER_PRECIS : psz = "CLIP_CHARACTER_PRECIS"; break;
  742. case CLIP_STROKE_PRECIS : psz = "CLIP_STROKE_PRECIS "; break;
  743. default : psz = "CLIP_?" ; break;
  744. }
  745. pch = achFlags;
  746. pch += sprintf(pch, "%s", psz);
  747. if ( l & CLIP_LH_ANGLES )
  748. pch += sprintf(pch, " | CLIP_LH_ANGLES");
  749. if ( l & CLIP_TT_ALWAYS )
  750. pch += sprintf(pch, " | CLIP_TT_ALWAYS");
  751. if ( l & CLIP_EMBEDDED )
  752. pch += sprintf(pch, " | CLIP_EMBEDDED");
  753. return( achFlags );
  754. }
  755. char *pszQUALITY( long l )
  756. {
  757. char *psz;
  758. switch (l) {
  759. case DEFAULT_QUALITY : psz = "DEFAULT_QUALITY "; break;
  760. case DRAFT_QUALITY : psz = "DRAFT_QUALITY "; break;
  761. case PROOF_QUALITY : psz = "PROOF_QUALITY "; break;
  762. case NONANTIALIASED_QUALITY : psz = "NONANTIALIASED_QUALITY"; break;
  763. case ANTIALIASED_QUALITY : psz = "ANTIALIASED_QUALITY "; break;
  764. default : psz = "?_QUALITY" ; break;
  765. }
  766. return( psz );
  767. }
  768. char *pszPitchAndFamily( long l )
  769. {
  770. char *psz, *pch = achFlags;
  771. switch ( l & 0xf) {
  772. case DEFAULT_PITCH : psz = "DEFAULT_PITCH "; break;
  773. case FIXED_PITCH : psz = "FIXED_PITCH "; break;
  774. case VARIABLE_PITCH: psz = "VARIABLE_PITCH"; break;
  775. case MONO_FONT : psz = "MONO_FONT "; break;
  776. default : psz = "PITCH_?" ; break;
  777. }
  778. pch += sprintf(pch, "%s", psz);
  779. switch ( l & 0xf0) {
  780. case FF_DONTCARE : psz = "FF_DONTCARE "; break;
  781. case FF_ROMAN : psz = "FF_ROMAN "; break;
  782. case FF_SWISS : psz = "FF_SWISS "; break;
  783. case FF_MODERN : psz = "FF_MODERN "; break;
  784. case FF_SCRIPT : psz = "FF_SCRIPT "; break;
  785. case FF_DECORATIVE : psz = "FF_DECORATIVE"; break;
  786. default : psz = "FF_?" ; break;
  787. }
  788. pch += sprintf(pch, " | %s", psz);
  789. return( achFlags );
  790. }
  791. char *pszPanoseWeight( long l )
  792. {
  793. char *psz;
  794. switch ( l ) {
  795. case PAN_ANY : psz = "PAN_ANY "; break;
  796. case PAN_NO_FIT : psz = "PAN_NO_FIT "; break;
  797. case PAN_WEIGHT_VERY_LIGHT : psz = "PAN_WEIGHT_VERY_LIGHT"; break;
  798. case PAN_WEIGHT_LIGHT : psz = "PAN_WEIGHT_LIGHT "; break;
  799. case PAN_WEIGHT_THIN : psz = "PAN_WEIGHT_THIN "; break;
  800. case PAN_WEIGHT_BOOK : psz = "PAN_WEIGHT_BOOK "; break;
  801. case PAN_WEIGHT_MEDIUM : psz = "PAN_WEIGHT_MEDIUM "; break;
  802. case PAN_WEIGHT_DEMI : psz = "PAN_WEIGHT_DEMI "; break;
  803. case PAN_WEIGHT_BOLD : psz = "PAN_WEIGHT_BOLD "; break;
  804. case PAN_WEIGHT_HEAVY : psz = "PAN_WEIGHT_HEAVY "; break;
  805. case PAN_WEIGHT_BLACK : psz = "PAN_WEIGHT_BLACK "; break;
  806. case PAN_WEIGHT_NORD : psz = "PAN_WEIGHT_NORD "; break;
  807. default: psz = "PAN_WEIGHT_? "; break;
  808. }
  809. return(psz);
  810. }
  811. char *pszFONTHASHTYPE(FONTHASHTYPE fht)
  812. {
  813. char *psz;
  814. switch (fht) {
  815. case FHT_FACE : psz = "FHT_FACE" ; break;
  816. case FHT_FAMILY: psz = "FHT_FAMILY"; break;
  817. case FHT_UFI : psz = "FHT_UFI" ; break;
  818. default : psz = "FHT_?" ; break;
  819. }
  820. return(psz);
  821. }
  822. char *pszDrvProcName(int index)
  823. {
  824. char *pwsz;
  825. switch (index)
  826. {
  827. case INDEX_DrvEnablePDEV : pwsz = "EnablePDEV "; break;
  828. case INDEX_DrvCompletePDEV : pwsz = "CompletePDEV "; break;
  829. case INDEX_DrvDisablePDEV : pwsz = "DisablePDEV "; break;
  830. case INDEX_DrvEnableSurface : pwsz = "EnableSurface "; break;
  831. case INDEX_DrvDisableSurface : pwsz = "DisableSurface "; break;
  832. case INDEX_DrvAssertMode : pwsz = "AssertMode "; break;
  833. case INDEX_DrvOffset : pwsz = "Offset "; break;
  834. case INDEX_DrvResetPDEV : pwsz = "ResetPDEV "; break;
  835. case INDEX_DrvDisableDriver : pwsz = "DisableDriver "; break;
  836. case INDEX_DrvCreateDeviceBitmap : pwsz = "CreateDeviceBitmap "; break;
  837. case INDEX_DrvDeleteDeviceBitmap : pwsz = "DeleteDeviceBitmap "; break;
  838. case INDEX_DrvRealizeBrush : pwsz = "RealizeBrush "; break;
  839. case INDEX_DrvDitherColor : pwsz = "DitherColor "; break;
  840. case INDEX_DrvStrokePath : pwsz = "StrokePath "; break;
  841. case INDEX_DrvFillPath : pwsz = "FillPath "; break;
  842. case INDEX_DrvStrokeAndFillPath : pwsz = "StrokeAndFillPath "; break;
  843. case INDEX_DrvPaint : pwsz = "Paint "; break;
  844. case INDEX_DrvBitBlt : pwsz = "BitBlt "; break;
  845. case INDEX_DrvCopyBits : pwsz = "CopyBits "; break;
  846. case INDEX_DrvStretchBlt : pwsz = "StretchBlt "; break;
  847. case INDEX_DrvSetPalette : pwsz = "SetPalette "; break;
  848. case INDEX_DrvTextOut : pwsz = "TextOut "; break;
  849. case INDEX_DrvEscape : pwsz = "Escape "; break;
  850. case INDEX_DrvDrawEscape : pwsz = "DrawEscape "; break;
  851. case INDEX_DrvQueryFont : pwsz = "QueryFont "; break;
  852. case INDEX_DrvQueryFontTree : pwsz = "QueryFontTree "; break;
  853. case INDEX_DrvQueryFontData : pwsz = "QueryFontData "; break;
  854. case INDEX_DrvSetPointerShape : pwsz = "SetPointerShape "; break;
  855. case INDEX_DrvMovePointer : pwsz = "MovePointer "; break;
  856. case INDEX_DrvLineTo : pwsz = "LineTo "; break;
  857. case INDEX_DrvSendPage : pwsz = "SendPage "; break;
  858. case INDEX_DrvStartPage : pwsz = "StartPage "; break;
  859. case INDEX_DrvEndDoc : pwsz = "EndDoc "; break;
  860. case INDEX_DrvStartDoc : pwsz = "StartDoc "; break;
  861. case INDEX_DrvGetGlyphMode : pwsz = "GetGlyphMode "; break;
  862. case INDEX_DrvSynchronize : pwsz = "Synchronize "; break;
  863. case INDEX_DrvSaveScreenBits : pwsz = "SaveScreenBits "; break;
  864. case INDEX_DrvGetModes : pwsz = "GetModes "; break;
  865. case INDEX_DrvFree : pwsz = "Free "; break;
  866. case INDEX_DrvDestroyFont : pwsz = "DestroyFont "; break;
  867. case INDEX_DrvQueryFontCaps : pwsz = "QueryFontCaps "; break;
  868. case INDEX_DrvLoadFontFile : pwsz = "LoadFontFile "; break;
  869. case INDEX_DrvUnloadFontFile : pwsz = "UnloadFontFile "; break;
  870. case INDEX_DrvFontManagement : pwsz = "FontManagement "; break;
  871. case INDEX_DrvQueryTrueTypeTable : pwsz = "QueryTrueTypeTable "; break;
  872. case INDEX_DrvQueryTrueTypeOutline : pwsz = "QueryTrueTypeOutline "; break;
  873. case INDEX_DrvGetTrueTypeFile : pwsz = "GetTrueTypeFile "; break;
  874. case INDEX_DrvQueryFontFile : pwsz = "QueryFontFile "; break;
  875. case INDEX_DrvMovePanning : pwsz = "MovePanning "; break;
  876. case INDEX_DrvQueryAdvanceWidths : pwsz = "QueryAdvanceWidths "; break;
  877. case INDEX_DrvSetPixelFormat : pwsz = "SetPixelFormat "; break;
  878. case INDEX_DrvDescribePixelFormat : pwsz = "DescribePixelFormat "; break;
  879. case INDEX_DrvSwapBuffers : pwsz = "SwapBuffers "; break;
  880. case INDEX_DrvStartBanding : pwsz = "StartBanding "; break;
  881. case INDEX_DrvNextBand : pwsz = "NextBand "; break;
  882. case INDEX_DrvGetDirectDrawInfo : pwsz = "GetDirectDrawInfo "; break;
  883. case INDEX_DrvEnableDirectDraw : pwsz = "EnableDirectDraw "; break;
  884. case INDEX_DrvDisableDirectDraw : pwsz = "DisableDirectDraw "; break;
  885. case INDEX_DrvQuerySpoolType : pwsz = "QuerySpoolType "; break;
  886. case INDEX_DrvIcmCreateColorTransform: pwsz = "IcmCreateColorTransform"; break;
  887. case INDEX_DrvIcmDeleteColorTransform: pwsz = "IcmDeleteColorTransform"; break;
  888. case INDEX_DrvIcmCheckBitmapBits : pwsz = "IcmCheckBitmapBits "; break;
  889. case INDEX_DrvIcmSetDeviceGammaRamp : pwsz = "IcmSetDeviceGammaRamp "; break;
  890. case INDEX_DrvGradientFill : pwsz = "GradientFill "; break;
  891. case INDEX_DrvStretchBltROP : pwsz = "StretchBltROP "; break;
  892. case INDEX_DrvPlgBlt : pwsz = "PlgBlt "; break;
  893. case INDEX_DrvAlphaBlend : pwsz = "AlphaBlend "; break;
  894. case INDEX_DrvSynthesizeFont : pwsz = "SynthesizeFont "; break;
  895. case INDEX_DrvGetSynthesizedFontFiles: pwsz = "GetSynthesizedFontFiles"; break;
  896. case INDEX_DrvTransparentBlt : pwsz = "TransparentBlt "; break;
  897. case INDEX_DrvQueryPerBandInfo : pwsz = "QueryPerBandInfo "; break;
  898. default : pwsz = "??? "; break;
  899. }
  900. return(pwsz);
  901. }
  902. char *pszHRESULT(HRESULT hr)
  903. {
  904. char *psz;
  905. switch (hr)
  906. {
  907. case 0: psz = "OK"; break;
  908. CASEENUM(S_FALSE);
  909. CASEENUM(E_NOTIMPL);
  910. CASEENUM(E_OUTOFMEMORY);
  911. CASEENUM(E_INVALIDARG);
  912. CASEENUM(E_NOINTERFACE);
  913. CASEENUM(E_ABORT);
  914. CASEENUM(E_FAIL);
  915. default:
  916. switch (hr & 0xCFFFFFFF)
  917. {
  918. CASEENUM(STATUS_UNSUCCESSFUL);
  919. default:
  920. psz = achFlags;
  921. sprintf(psz, "unknown HRESULT 0x%08lx", hr);
  922. break;
  923. }
  924. break;
  925. }
  926. return(psz);
  927. }
  928. char *pszWinDbgError(ULONG ulError)
  929. {
  930. char *psz;
  931. switch (ulError)
  932. {
  933. case 0: psz = "no error"; break;
  934. CASEENUM(MEMORY_READ_ERROR);
  935. CASEENUM(SYMBOL_TYPE_INDEX_NOT_FOUND);
  936. CASEENUM(SYMBOL_TYPE_INFO_NOT_FOUND);
  937. CASEENUM(FIELDS_DID_NOT_MATCH);
  938. CASEENUM(NULL_SYM_DUMP_PARAM);
  939. CASEENUM(NULL_FIELD_NAME);
  940. CASEENUM(INCORRECT_VERSION_INFO);
  941. CASEENUM(EXIT_ON_CONTROLC);
  942. CASEENUM(CANNOT_ALLOCATE_MEMORY);
  943. default:
  944. psz = achFlags;
  945. sprintf(psz, "unknown WinDbg error 0x08%x", ulError);
  946. break;
  947. }
  948. return(psz);
  949. }
  950. /******************************Public*Routine******************************\
  951. * print standard flags
  952. *
  953. * Arguments:
  954. *
  955. *
  956. *
  957. * Return Value:
  958. *
  959. *
  960. *
  961. * History:
  962. *
  963. * 6-Mar-1996 -by- Mark Enstrom [marke]
  964. *
  965. \**************************************************************************/
  966. ULONG64
  967. flPrintFlags(
  968. FLAGDEF *pFlagDef,
  969. ULONG64 fl
  970. )
  971. {
  972. ULONG64 FlagsFound = 0;
  973. while (pFlagDef->psz != NULL)
  974. {
  975. if (pFlagDef->fl & fl)
  976. {
  977. if (FlagsFound) dprintf("\n");
  978. dprintf(" %s",pFlagDef->psz);
  979. if (FlagsFound & pFlagDef->fl)
  980. {
  981. dprintf(" (SHARED FLAG)");
  982. }
  983. FlagsFound |= pFlagDef->fl;
  984. }
  985. pFlagDef++;
  986. }
  987. return fl & ~FlagsFound;
  988. }
  989. BOOL
  990. bPrintEnum(
  991. ENUMDEF *pEnumDef,
  992. ULONG64 ul
  993. )
  994. {
  995. while (pEnumDef->psz != NULL)
  996. {
  997. if (pEnumDef->ul == ul)
  998. {
  999. dprintf(pEnumDef->psz);
  1000. return (TRUE);
  1001. }
  1002. pEnumDef++;
  1003. }
  1004. return (FALSE);
  1005. }
  1006. // BASEOBJECT.BaseFlags
  1007. FLAGDEF afdBASEOBJECT_BaseFlags[] = {
  1008. FLAG(HMGR_LOOKASIDE_ALLOC_FLAG),
  1009. END_FLAG
  1010. };
  1011. // _BLENDFUNCTION.BlendOp
  1012. ENUMDEF aed_BLENDFUNCTION_BlendOp[] = {
  1013. ENUM(AC_SRC_OVER),
  1014. END_ENUM
  1015. };
  1016. // _BLENDFUNCTION.BlendFlags
  1017. FLAGDEF afd_BLENDFUNCTION_BlendFlags[] = {
  1018. FLAG(AC_USE_HIGHQUALITYFILTER),
  1019. FLAG(AC_MIRRORBITMAP),
  1020. END_FLAG
  1021. };
  1022. // _BLENDFUNCTION.AlphaFormat
  1023. FLAGDEF afd_BLENDFUNCTION_AlphaFormat[] = {
  1024. FLAG(AC_SRC_ALPHA),
  1025. END_FLAG
  1026. };
  1027. // BRUSH._flAttrs
  1028. // EBRUSHOBJ.flAttrs
  1029. FLAGDEF afdBRUSH__flAttrs[] = {
  1030. FLAG(BR_NEED_FG_CLR),
  1031. FLAG(BR_NEED_BK_CLR),
  1032. FLAG(BR_DITHER_OK),
  1033. FLAG(BR_IS_SOLID),
  1034. FLAG(BR_IS_HATCH),
  1035. FLAG(BR_IS_BITMAP),
  1036. FLAG(BR_IS_DIB),
  1037. FLAG(BR_IS_NULL),
  1038. FLAG(BR_IS_GLOBAL),
  1039. FLAG(BR_IS_PEN),
  1040. FLAG(BR_IS_OLDSTYLEPEN),
  1041. FLAG(BR_IS_DIBPALCOLORS),
  1042. FLAG(BR_IS_DIBPALINDICES),
  1043. FLAG(BR_IS_DEFAULTSTYLE),
  1044. FLAG(BR_IS_MASKING),
  1045. FLAG(BR_IS_INSIDEFRAME),
  1046. FLAG(BR_IS_MONOCHROME),
  1047. FLAG(BR_CACHED_ENGINE),
  1048. FLAG(BR_CACHED_IS_SOLID),
  1049. END_FLAG
  1050. };
  1051. // BRUSH._ulStyle
  1052. ENUMDEF aedBRUSH__ulStyle[] = {
  1053. ENUM(HS_HORIZONTAL),
  1054. ENUM(HS_VERTICAL),
  1055. ENUM(HS_FDIAGONAL),
  1056. ENUM(HS_BDIAGONAL),
  1057. ENUM(HS_CROSS),
  1058. ENUM(HS_DIAGCROSS),
  1059. ENUM(HS_SOLIDCLR),
  1060. ENUM(HS_DITHEREDCLR),
  1061. ENUM(HS_SOLIDTEXTCLR),
  1062. ENUM(HS_DITHEREDTEXTCLR),
  1063. ENUM(HS_SOLIDBKCLR),
  1064. ENUM(HS_DITHEREDBKCLR),
  1065. ENUM(HS_API_MAX),
  1066. ENUM(HS_NULL),
  1067. ENUM(HS_PAT),
  1068. ENUM(HS_MSK),
  1069. ENUM(HS_PATMSK),
  1070. ENUM(HS_STYLE_MAX),
  1071. END_ENUM
  1072. };
  1073. // BRUSHOBJ.flColorType
  1074. FLAGDEF afdBRUSHOBJ_flColorType[] = {
  1075. FLAG(BR_DEVICE_ICM),
  1076. FLAG(BR_HOST_ICM),
  1077. FLAG(BR_CMYKCOLOR),
  1078. FLAG(BR_ORIGCOLOR),
  1079. END_FLAG
  1080. };
  1081. // CLIPOBJ.iDComplexity
  1082. ENUMDEF aedCLIPOBJ_iDComplexity[] = {
  1083. ENUM(DC_TRIVIAL),
  1084. ENUM(DC_RECT),
  1085. ENUM(DC_COMPLEX),
  1086. END_ENUM
  1087. };
  1088. // CLIPOBJ.iFComplexity
  1089. ENUMDEF aedCLIPOBJ_iFComplexity[] = {
  1090. ENUM(FC_RECT),
  1091. ENUM(FC_RECT4),
  1092. ENUM(FC_COMPLEX),
  1093. END_ENUM
  1094. };
  1095. // CLIPOBJ.iMode
  1096. ENUMDEF aedCLIPOBJ_iMode[] = {
  1097. ENUM(TC_RECTANGLES),
  1098. ENUM(TC_PATHOBJ),
  1099. END_ENUM
  1100. };
  1101. // CLIPOBJ.fjOptions
  1102. FLAGDEF afdCLIPOBJ_fjOptions[] = {
  1103. FLAG(OC_BANK_CLIP),
  1104. END_FLAG
  1105. };
  1106. // DC.fs_
  1107. FLAGDEF afdDC_fs_[] = {
  1108. FLAG(DC_DISPLAY),
  1109. FLAG(DC_DIRECT),
  1110. FLAG(DC_CANCELED),
  1111. FLAG(DC_PERMANANT),
  1112. FLAG(DC_DIRTY_RAO),
  1113. FLAG(DC_ACCUM_WMGR),
  1114. FLAG(DC_ACCUM_APP),
  1115. FLAG(DC_RESET),
  1116. FLAG(DC_SYNCHRONIZEACCESS),
  1117. FLAG(DC_EPSPRINTINGESCAPE),
  1118. FLAG(DC_TEMPINFODC),
  1119. FLAG(DC_FULLSCREEN),
  1120. FLAG(DC_IN_CLONEPDEV),
  1121. FLAG(DC_REDIRECTION),
  1122. FLAG(DC_SHAREACCESS),
  1123. FLAG(DC_STOCKBITMAP),
  1124. END_FLAG
  1125. };
  1126. // DC.flGraphicsCaps_
  1127. // DEVINFO.flGraphicsCaps
  1128. FLAGDEF afdDC_flGraphicsCaps_[] = {
  1129. FLAG(GCAPS_BEZIERS),
  1130. FLAG(GCAPS_GEOMETRICWIDE),
  1131. FLAG(GCAPS_ALTERNATEFILL),
  1132. FLAG(GCAPS_WINDINGFILL),
  1133. FLAG(GCAPS_HALFTONE),
  1134. FLAG(GCAPS_COLOR_DITHER),
  1135. {"GCAPS_HORIZSTRIKE (obsolete)", GCAPS_HORIZSTRIKE },
  1136. {"GCAPS_VERTSTRIKE (obsolete)", GCAPS_VERTSTRIKE },
  1137. FLAG(GCAPS_OPAQUERECT),
  1138. FLAG(GCAPS_VECTORFONT),
  1139. FLAG(GCAPS_MONO_DITHER),
  1140. {"GCAPS_ASYNCCHANGE (obsolete)", GCAPS_ASYNCCHANGE },
  1141. FLAG(GCAPS_ASYNCMOVE),
  1142. FLAG(GCAPS_DONTJOURNAL),
  1143. {"GCAPS_DIRECTDRAW (obsolete)", GCAPS_DIRECTDRAW },
  1144. FLAG(GCAPS_ARBRUSHOPAQUE),
  1145. FLAG(GCAPS_PANNING),
  1146. FLAG(GCAPS_HIGHRESTEXT),
  1147. FLAG(GCAPS_PALMANAGED),
  1148. FLAG(GCAPS_DITHERONREALIZE),
  1149. {"GCAPS_NO64BITMEMACCESS (obsolete)", GCAPS_NO64BITMEMACCESS },
  1150. FLAG(GCAPS_FORCEDITHER),
  1151. FLAG(GCAPS_GRAY16),
  1152. FLAG(GCAPS_ICM),
  1153. FLAG(GCAPS_CMYKCOLOR),
  1154. FLAG(GCAPS_LAYERED),
  1155. FLAG(GCAPS_ARBRUSHTEXT),
  1156. FLAG(GCAPS_SCREENPRECISION),
  1157. FLAG(GCAPS_FONT_RASTERIZER),
  1158. FLAG(GCAPS_NUP),
  1159. END_FLAG
  1160. };
  1161. // DC.flGraphicsCaps2_
  1162. // DEVINFO.flGraphicsCaps2
  1163. FLAGDEF afdDC_flGraphicsCaps2_[] = {
  1164. FLAG(GCAPS2_JPEGSRC),
  1165. FLAG(GCAPS2_xxxx),
  1166. FLAG(GCAPS2_PNGSRC),
  1167. FLAG(GCAPS2_CHANGEGAMMARAMP),
  1168. FLAG(GCAPS2_ALPHACURSOR),
  1169. FLAG(GCAPS2_SYNCFLUSH),
  1170. FLAG(GCAPS2_SYNCTIMER),
  1171. FLAG(GCAPS2_ICD_MULTIMON),
  1172. FLAG(GCAPS2_MOUSETRAILS),
  1173. END_FLAG
  1174. };
  1175. // DEVMODEx.dmFields
  1176. FLAGDEF afdDEVMODE_dmFields[] = {
  1177. FLAG(DM_ORIENTATION),
  1178. FLAG(DM_PAPERSIZE),
  1179. FLAG(DM_PAPERLENGTH),
  1180. FLAG(DM_PAPERWIDTH),
  1181. FLAG(DM_SCALE),
  1182. FLAG(DM_POSITION),
  1183. FLAG(DM_NUP),
  1184. FLAG(DM_DISPLAYORIENTATION),
  1185. FLAG(DM_COPIES),
  1186. FLAG(DM_DEFAULTSOURCE),
  1187. FLAG(DM_PRINTQUALITY),
  1188. FLAG(DM_COLOR),
  1189. FLAG(DM_DUPLEX),
  1190. FLAG(DM_YRESOLUTION),
  1191. FLAG(DM_TTOPTION),
  1192. FLAG(DM_COLLATE),
  1193. FLAG(DM_FORMNAME),
  1194. FLAG(DM_LOGPIXELS),
  1195. FLAG(DM_BITSPERPEL),
  1196. FLAG(DM_PELSWIDTH),
  1197. FLAG(DM_PELSHEIGHT),
  1198. FLAG(DM_DISPLAYFLAGS),
  1199. FLAG(DM_DISPLAYFREQUENCY),
  1200. FLAG(DM_ICMMETHOD),
  1201. FLAG(DM_ICMINTENT),
  1202. FLAG(DM_MEDIATYPE),
  1203. FLAG(DM_DITHERTYPE),
  1204. FLAG(DM_PANNINGWIDTH),
  1205. FLAG(DM_PANNINGHEIGHT),
  1206. FLAG(DM_DISPLAYFIXEDOUTPUT),
  1207. END_FLAG
  1208. };
  1209. // DEVMODEx.dmPaperSize
  1210. ENUMDEF aedDEVMODE_dmPaperSize[] = {
  1211. { "Unspecified", 0},
  1212. ENUM(DMPAPER_LETTER),
  1213. ENUM(DMPAPER_LETTERSMALL),
  1214. ENUM(DMPAPER_TABLOID),
  1215. ENUM(DMPAPER_LEDGER),
  1216. ENUM(DMPAPER_LEGAL),
  1217. ENUM(DMPAPER_STATEMENT),
  1218. ENUM(DMPAPER_EXECUTIVE),
  1219. ENUM(DMPAPER_A3),
  1220. ENUM(DMPAPER_A4),
  1221. ENUM(DMPAPER_A4SMALL),
  1222. ENUM(DMPAPER_A5),
  1223. ENUM(DMPAPER_B4),
  1224. ENUM(DMPAPER_B5),
  1225. ENUM(DMPAPER_FOLIO),
  1226. ENUM(DMPAPER_QUARTO),
  1227. ENUM(DMPAPER_10X14),
  1228. ENUM(DMPAPER_11X17),
  1229. ENUM(DMPAPER_NOTE),
  1230. ENUM(DMPAPER_ENV_9),
  1231. ENUM(DMPAPER_ENV_10),
  1232. ENUM(DMPAPER_ENV_11),
  1233. ENUM(DMPAPER_ENV_12),
  1234. ENUM(DMPAPER_ENV_14),
  1235. ENUM(DMPAPER_CSHEET),
  1236. ENUM(DMPAPER_DSHEET),
  1237. ENUM(DMPAPER_ESHEET),
  1238. ENUM(DMPAPER_ENV_DL),
  1239. ENUM(DMPAPER_ENV_C5),
  1240. ENUM(DMPAPER_ENV_C3),
  1241. ENUM(DMPAPER_ENV_C4),
  1242. ENUM(DMPAPER_ENV_C6),
  1243. ENUM(DMPAPER_ENV_C65),
  1244. ENUM(DMPAPER_ENV_B4),
  1245. ENUM(DMPAPER_ENV_B5),
  1246. ENUM(DMPAPER_ENV_B6),
  1247. ENUM(DMPAPER_ENV_ITALY),
  1248. ENUM(DMPAPER_ENV_MONARCH),
  1249. ENUM(DMPAPER_ENV_PERSONAL),
  1250. ENUM(DMPAPER_FANFOLD_US),
  1251. ENUM(DMPAPER_FANFOLD_STD_GERMAN),
  1252. ENUM(DMPAPER_FANFOLD_LGL_GERMAN),
  1253. ENUM(DMPAPER_ISO_B4),
  1254. ENUM(DMPAPER_JAPANESE_POSTCARD),
  1255. ENUM(DMPAPER_9X11),
  1256. ENUM(DMPAPER_10X11),
  1257. ENUM(DMPAPER_15X11),
  1258. ENUM(DMPAPER_ENV_INVITE),
  1259. ENUM(DMPAPER_RESERVED_48),
  1260. ENUM(DMPAPER_RESERVED_49),
  1261. ENUM(DMPAPER_LETTER_EXTRA),
  1262. ENUM(DMPAPER_LEGAL_EXTRA),
  1263. ENUM(DMPAPER_TABLOID_EXTRA),
  1264. ENUM(DMPAPER_A4_EXTRA),
  1265. ENUM(DMPAPER_LETTER_TRANSVERSE),
  1266. ENUM(DMPAPER_A4_TRANSVERSE),
  1267. ENUM(DMPAPER_LETTER_EXTRA_TRANSVERSE),
  1268. ENUM(DMPAPER_A_PLUS),
  1269. ENUM(DMPAPER_B_PLUS),
  1270. ENUM(DMPAPER_LETTER_PLUS),
  1271. ENUM(DMPAPER_A4_PLUS),
  1272. ENUM(DMPAPER_A5_TRANSVERSE),
  1273. ENUM(DMPAPER_B5_TRANSVERSE),
  1274. ENUM(DMPAPER_A3_EXTRA),
  1275. ENUM(DMPAPER_A5_EXTRA),
  1276. ENUM(DMPAPER_B5_EXTRA),
  1277. ENUM(DMPAPER_A2),
  1278. ENUM(DMPAPER_A3_TRANSVERSE),
  1279. ENUM(DMPAPER_A3_EXTRA_TRANSVERSE),
  1280. ENUM(DMPAPER_DBL_JAPANESE_POSTCARD),
  1281. ENUM(DMPAPER_A6),
  1282. ENUM(DMPAPER_JENV_KAKU2),
  1283. ENUM(DMPAPER_JENV_KAKU3),
  1284. ENUM(DMPAPER_JENV_CHOU3),
  1285. ENUM(DMPAPER_JENV_CHOU4),
  1286. ENUM(DMPAPER_LETTER_ROTATED),
  1287. ENUM(DMPAPER_A3_ROTATED),
  1288. ENUM(DMPAPER_A4_ROTATED),
  1289. ENUM(DMPAPER_A5_ROTATED),
  1290. ENUM(DMPAPER_B4_JIS_ROTATED),
  1291. ENUM(DMPAPER_B5_JIS_ROTATED),
  1292. ENUM(DMPAPER_JAPANESE_POSTCARD_ROTATED),
  1293. ENUM(DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED),
  1294. ENUM(DMPAPER_A6_ROTATED),
  1295. ENUM(DMPAPER_JENV_KAKU2_ROTATED),
  1296. ENUM(DMPAPER_JENV_KAKU3_ROTATED),
  1297. ENUM(DMPAPER_JENV_CHOU3_ROTATED),
  1298. ENUM(DMPAPER_JENV_CHOU4_ROTATED),
  1299. ENUM(DMPAPER_B6_JIS),
  1300. ENUM(DMPAPER_B6_JIS_ROTATED),
  1301. ENUM(DMPAPER_12X11),
  1302. ENUM(DMPAPER_JENV_YOU4),
  1303. ENUM(DMPAPER_JENV_YOU4_ROTATED),
  1304. ENUM(DMPAPER_P16K),
  1305. ENUM(DMPAPER_P32K),
  1306. ENUM(DMPAPER_P32KBIG),
  1307. ENUM(DMPAPER_PENV_1),
  1308. ENUM(DMPAPER_PENV_2),
  1309. ENUM(DMPAPER_PENV_3),
  1310. ENUM(DMPAPER_PENV_4),
  1311. ENUM(DMPAPER_PENV_5),
  1312. ENUM(DMPAPER_PENV_6),
  1313. ENUM(DMPAPER_PENV_7),
  1314. ENUM(DMPAPER_PENV_8),
  1315. ENUM(DMPAPER_PENV_9),
  1316. ENUM(DMPAPER_PENV_10),
  1317. ENUM(DMPAPER_P16K_ROTATED),
  1318. ENUM(DMPAPER_P32K_ROTATED),
  1319. ENUM(DMPAPER_P32KBIG_ROTATED),
  1320. ENUM(DMPAPER_PENV_1_ROTATED),
  1321. ENUM(DMPAPER_PENV_2_ROTATED),
  1322. ENUM(DMPAPER_PENV_3_ROTATED),
  1323. ENUM(DMPAPER_PENV_4_ROTATED),
  1324. ENUM(DMPAPER_PENV_5_ROTATED),
  1325. ENUM(DMPAPER_PENV_6_ROTATED),
  1326. ENUM(DMPAPER_PENV_7_ROTATED),
  1327. ENUM(DMPAPER_PENV_8_ROTATED),
  1328. ENUM(DMPAPER_PENV_9_ROTATED),
  1329. ENUM(DMPAPER_PENV_10_ROTATED),
  1330. ENUM(DMPAPER_USER),
  1331. END_ENUM
  1332. };
  1333. // DEVMODEx.dmDisplayOrientation
  1334. ENUMDEF aedDEVMODE_dmDisplayOrientation[] = {
  1335. ENUM(DMDO_DEFAULT),
  1336. ENUM(DMDO_90),
  1337. ENUM(DMDO_180),
  1338. ENUM(DMDO_270),
  1339. END_ENUM
  1340. };
  1341. // DEVMODEx.dmDisplayFixedOutput
  1342. ENUMDEF aedDEVMODE_dmDisplayFixedOutput[] = {
  1343. ENUM(DMDFO_DEFAULT),
  1344. ENUM(DMDFO_STRETCH),
  1345. ENUM(DMDFO_CENTER),
  1346. END_ENUM
  1347. };
  1348. // DEVMODEx.dmDisplayFlags
  1349. FLAGDEF afdDEVMODE_dmDisplayFlags[] = {
  1350. { "DM_GRAYSCALE (obsolete)", 0x00000001 },
  1351. { "DM_INTERLACED (obsolete)", 0x00000002 },
  1352. FLAG(DMDISPLAYFLAGS_TEXTMODE),
  1353. END_FLAG
  1354. };
  1355. // DEVMODEx.dmICMMethod
  1356. ENUMDEF aedDEVMODE_dmICMMethod[] = {
  1357. { "Unspecified", 0},
  1358. ENUM(DMICMMETHOD_NONE),
  1359. ENUM(DMICMMETHOD_SYSTEM),
  1360. ENUM(DMICMMETHOD_DRIVER),
  1361. ENUM(DMICMMETHOD_DEVICE),
  1362. ENUM(DMICMMETHOD_USER),
  1363. END_ENUM
  1364. };
  1365. // DEVMODEx.dmICMIntent
  1366. ENUMDEF aedDEVMODE_dmICMIntent[] = {
  1367. { "Unspecified", 0},
  1368. ENUM(DMICM_SATURATE),
  1369. ENUM(DMICM_CONTRAST),
  1370. ENUM(DMICM_COLORIMETRIC),
  1371. ENUM(DMICM_ABS_COLORIMETRIC),
  1372. ENUM(DMICM_USER),
  1373. END_ENUM
  1374. };
  1375. // DEVMODEx.dmMediaType
  1376. ENUMDEF aedDEVMODE_dmMediaType[] = {
  1377. { "Unspecified", 0},
  1378. ENUM(DMMEDIA_STANDARD),
  1379. ENUM(DMMEDIA_TRANSPARENCY),
  1380. ENUM(DMMEDIA_GLOSSY),
  1381. ENUM(DMMEDIA_USER),
  1382. END_ENUM
  1383. };
  1384. // DEVMOCEx.dmDitherType
  1385. ENUMDEF aedDEVMODE_dmDitherType[] = {
  1386. { "Unspecified", 0},
  1387. ENUM(DMDITHER_NONE),
  1388. ENUM(DMDITHER_COARSE),
  1389. ENUM(DMDITHER_FINE),
  1390. ENUM(DMDITHER_LINEART),
  1391. ENUM(DMDITHER_ERRORDIFFUSION),
  1392. ENUM(DMDITHER_RESERVED6),
  1393. ENUM(DMDITHER_RESERVED7),
  1394. ENUM(DMDITHER_RESERVED8),
  1395. ENUM(DMDITHER_RESERVED9),
  1396. ENUM(DMDITHER_GRAYSCALE),
  1397. ENUM(DMDITHER_USER),
  1398. END_ENUM
  1399. };
  1400. // GDIINFO.flRaster
  1401. FLAGDEF afdGDIINFO_flRaster[] = {
  1402. FLAG(RC_NONE),
  1403. FLAG(RC_BITBLT),
  1404. FLAG(RC_BANDING),
  1405. FLAG(RC_SCALING),
  1406. FLAG(RC_BITMAP64),
  1407. FLAG(RC_GDI20_OUTPUT),
  1408. FLAG(RC_GDI20_STATE),
  1409. FLAG(RC_SAVEBITMAP),
  1410. FLAG(RC_DI_BITMAP),
  1411. FLAG(RC_PALETTE),
  1412. FLAG(RC_DIBTODEV),
  1413. FLAG(RC_BIGFONT),
  1414. FLAG(RC_STRETCHBLT),
  1415. FLAG(RC_FLOODFILL),
  1416. FLAG(RC_STRETCHDIB),
  1417. FLAG(RC_OP_DX_OUTPUT),
  1418. FLAG(RC_DEVBITS),
  1419. END_FLAG
  1420. };
  1421. // GRAPHICS_DEVICE.stateFlags
  1422. FLAGDEF afdGRAPHICS_DEVICE_stateFlags[] = {
  1423. FLAG(DISPLAY_DEVICE_ATTACHED_TO_DESKTOP),
  1424. FLAG(DISPLAY_DEVICE_MULTI_DRIVER),
  1425. FLAG(DISPLAY_DEVICE_PRIMARY_DEVICE),
  1426. FLAG(DISPLAY_DEVICE_MIRRORING_DRIVER),
  1427. FLAG(DISPLAY_DEVICE_VGA_COMPATIBLE),
  1428. FLAG(DISPLAY_DEVICE_REMOVABLE),
  1429. FLAG(DISPLAY_DEVICE_MODESPRUNED),
  1430. FLAG(DISPLAY_DEVICE_POWERED_OFF),
  1431. FLAG(DISPLAY_DEVICE_ACPI),
  1432. FLAG(DISPLAY_DEVICE_DUALVIEW),
  1433. FLAG(DISPLAY_DEVICE_REMOTE),
  1434. FLAG(DISPLAY_DEVICE_DISCONNECT),
  1435. END_FLAG
  1436. };
  1437. // ENTRY FullType (Shifted Portion of ENTRY.FullUnique)
  1438. ENUMDEF aedENTRY_FullType[] = {
  1439. ENUM(LO_BRUSH_TYPE),
  1440. ENUM(LO_DC_TYPE),
  1441. ENUM(LO_BITMAP_TYPE),
  1442. ENUM(LO_PALETTE_TYPE),
  1443. ENUM(LO_FONT_TYPE),
  1444. ENUM(LO_REGION_TYPE),
  1445. ENUM(LO_ICMLCS_TYPE),
  1446. ENUM(LO_CLIENTOBJ_TYPE),
  1447. ENUM(LO_ALTDC_TYPE),
  1448. ENUM(LO_PEN_TYPE),
  1449. ENUM(LO_EXTPEN_TYPE),
  1450. ENUM(LO_DIBSECTION_TYPE),
  1451. ENUM(LO_METAFILE16_TYPE),
  1452. ENUM(LO_METAFILE_TYPE),
  1453. ENUM(LO_METADC16_TYPE),
  1454. END_ENUM
  1455. };
  1456. // ENTRY.Objt
  1457. ENUMDEF aedENTRY_Objt[] = {
  1458. ENUM(DEF_TYPE),
  1459. ENUM(DC_TYPE),
  1460. ENUM(UNUSED1_TYPE),
  1461. ENUM(UNUSED2_TYPE),
  1462. ENUM(RGN_TYPE),
  1463. ENUM(SURF_TYPE),
  1464. ENUM(CLIENTOBJ_TYPE),
  1465. ENUM(PATH_TYPE),
  1466. ENUM(PAL_TYPE),
  1467. ENUM(ICMLCS_TYPE),
  1468. ENUM(LFONT_TYPE),
  1469. ENUM(RFONT_TYPE),
  1470. ENUM(PFE_TYPE),
  1471. ENUM(PFT_TYPE),
  1472. ENUM(ICMCXF_TYPE),
  1473. ENUM(SPRITE_TYPE),
  1474. ENUM(BRUSH_TYPE),
  1475. ENUM(UMPD_TYPE),
  1476. ENUM(UNUSED4_TYPE),
  1477. ENUM(SPACE_TYPE),
  1478. ENUM(UNUSED5_TYPE),
  1479. ENUM(META_TYPE),
  1480. ENUM(EFSTATE_TYPE),
  1481. ENUM(BMFD_TYPE),
  1482. ENUM(VTFD_TYPE),
  1483. ENUM(TTFD_TYPE),
  1484. ENUM(RC_TYPE),
  1485. ENUM(TEMP_TYPE),
  1486. ENUM(DRVOBJ_TYPE),
  1487. ENUM(DCIOBJ_TYPE),
  1488. ENUM(SPOOL_TYPE),
  1489. END_ENUM
  1490. };
  1491. // ENTRY.Flags
  1492. FLAGDEF afdENTRY_Flags[] = {
  1493. FLAG(HMGR_ENTRY_UNDELETABLE),
  1494. FLAG(HMGR_ENTRY_LAZY_DEL),
  1495. FLAG(HMGR_ENTRY_INVALID_VIS),
  1496. FLAG(HMGR_ENTRY_LOOKASIDE_ALLOC),
  1497. END_FLAG
  1498. };
  1499. // LINEATTRS.fl
  1500. FLAGDEF afdLINEATTRS_fl[] = {
  1501. FLAG(LA_GEOMETRIC),
  1502. FLAG(LA_ALTERNATE),
  1503. FLAG(LA_STARTGAP),
  1504. FLAG(LA_STYLED),
  1505. END_FLAG
  1506. };
  1507. // LINEATTRS.iJoin
  1508. ENUMDEF aedLINEATTRS_iJoin[] = {
  1509. ENUM(JOIN_ROUND),
  1510. ENUM(JOIN_BEVEL),
  1511. ENUM(JOIN_MITER),
  1512. END_ENUM
  1513. };
  1514. // LINEATTRS.iEndCap
  1515. ENUMDEF aedLINEATTRS_iEndCap[] = {
  1516. ENUM(ENDCAP_ROUND),
  1517. ENUM(ENDCAP_SQUARE),
  1518. ENUM(ENDCAP_BUTT),
  1519. END_ENUM
  1520. };
  1521. // MATRIX.flAccel
  1522. FLAGDEF afdMATRIX_flAccel[] = {
  1523. FLAG(XFORM_SCALE),
  1524. FLAG(XFORM_UNITY),
  1525. FLAG(XFORM_Y_NEG),
  1526. FLAG(XFORM_FORMAT_LTOFX),
  1527. FLAG(XFORM_FORMAT_FXTOL),
  1528. FLAG(XFORM_FORMAT_LTOL),
  1529. FLAG(XFORM_NO_TRANSLATION),
  1530. END_FLAG
  1531. };
  1532. // PALETTE.flPal
  1533. FLAGDEF afdPALETTE_flPal[] = {
  1534. FLAG(PAL_INDEXED),
  1535. FLAG(PAL_BITFIELDS),
  1536. FLAG(PAL_RGB),
  1537. FLAG(PAL_BGR),
  1538. FLAG(PAL_CMYK),
  1539. FLAG(PAL_DC),
  1540. FLAG(PAL_FIXED),
  1541. FLAG(PAL_FREE),
  1542. FLAG(PAL_MANAGED),
  1543. FLAG(PAL_NOSTATIC),
  1544. FLAG(PAL_MONOCHROME),
  1545. FLAG(PAL_BRUSHHACK),
  1546. FLAG(PAL_DIBSECTION),
  1547. FLAG(PAL_NOSTATIC256),
  1548. FLAG(PAL_HT),
  1549. FLAG(PAL_RGB16_555),
  1550. FLAG(PAL_RGB16_565),
  1551. FLAG(PAL_GAMMACORRECT),
  1552. END_FLAG
  1553. };
  1554. // PATH.flags
  1555. FLAGDEF afdPATH_flags[] = {
  1556. FLAG(PD_BEGINSUBPATH),
  1557. FLAG(PD_ENDSUBPATH),
  1558. FLAG(PD_RESETSTYLE),
  1559. FLAG(PD_CLOSEFIGURE),
  1560. FLAG(PD_BEZIERS),
  1561. FLAG(PATH_JOURNAL),
  1562. END_FLAG
  1563. };
  1564. // PATH.flType
  1565. FLAGDEF afdPATH_flType[] = {
  1566. FLAG(PATHTYPE_KEEPMEM),
  1567. FLAG(PATHTYPE_STACK),
  1568. END_FLAG
  1569. };
  1570. // PATHOBJ.fl
  1571. // PATH.fl
  1572. FLAGDEF afdPATHOBJ_fl[] = {
  1573. FLAG(PO_BEZIERS),
  1574. FLAG(PO_ELLIPSE),
  1575. FLAG(PO_ALL_INTEGERS),
  1576. FLAG(PO_ENUM_AS_INTEGERS),
  1577. END_FLAG
  1578. };
  1579. // PDEV.fl
  1580. FLAGDEF afdPDEV_fl[] = {
  1581. FLAG(PDEV_DISPLAY),
  1582. FLAG(PDEV_HARDWARE_POINTER),
  1583. FLAG(PDEV_SOFTWARE_POINTER),
  1584. FLAG(PDEV_xxx1),
  1585. FLAG(PDEV_xxx2),
  1586. FLAG(PDEV_xxx3),
  1587. FLAG(PDEV_GOTFONTS),
  1588. FLAG(PDEV_PRINTER),
  1589. FLAG(PDEV_ALLOCATEDBRUSHES),
  1590. FLAG(PDEV_HTPAL_IS_DEVPAL),
  1591. FLAG(PDEV_DISABLED),
  1592. FLAG(PDEV_SYNCHRONIZE_ENABLED),
  1593. FLAG(PDEV_xxx4),
  1594. FLAG(PDEV_FONTDRIVER),
  1595. FLAG(PDEV_GAMMARAMP_TABLE),
  1596. FLAG(PDEV_UMPD),
  1597. FLAG(PDEV_SHARED_DEVLOCK),
  1598. FLAG(PDEV_META_DEVICE),
  1599. FLAG(PDEV_DRIVER_PUNTED_CALL),
  1600. FLAG(PDEV_CLONE_DEVICE),
  1601. FLAG(PDEV_MOUSE_TRAILS),
  1602. FLAG(PDEV_SYNCHRONOUS_POINTER),
  1603. END_FLAG
  1604. };
  1605. // PDEV.flAccelerated
  1606. FLAGDEF afdPDEV_flAccelerated[] = {
  1607. FLAG(ACCELERATED_CONSTANT_ALPHA),
  1608. FLAG(ACCELERATED_PIXEL_ALPHA),
  1609. FLAG(ACCELERATED_TRANSPARENT_BLT),
  1610. END_FLAG
  1611. };
  1612. // PDEV.dwDriverCapableOverride
  1613. FLAGDEF afdPDEV_dwDriverCapableOverride[] = {
  1614. FLAG(DRIVER_CAPABLE_ALL),
  1615. FLAG(DRIVER_NOT_CAPABLE_GDI),
  1616. FLAG(DRIVER_NOT_CAPABLE_DDRAW),
  1617. FLAG(DRIVER_NOT_CAPABLE_D3D),
  1618. FLAG(DRIVER_NOT_CAPABLE_OPENGL),
  1619. END_FLAG
  1620. };
  1621. // SPRITE.fl
  1622. FLAGDEF afdSPRITE_fl[] = {
  1623. FLAG(SPRITE_FLAG_CLIPPING_OBSCURED),
  1624. FLAG(SPRITE_FLAG_JUST_TRANSFERRED),
  1625. FLAG(SPRITE_FLAG_NO_WINDOW),
  1626. FLAG(SPRITE_FLAG_EFFECTIVELY_OPAQUE),
  1627. FLAG(SPRITE_FLAG_HIDDEN),
  1628. FLAG(SPRITE_FLAG_VISIBLE),
  1629. END_FLAG
  1630. };
  1631. // SPRITE.dwShape
  1632. // _SpriteCachedAttributes.dwShape
  1633. FLAGDEF afdSPRITE_dwShape[] = {
  1634. FLAG(ULW_COLORKEY),
  1635. FLAG(ULW_ALPHA),
  1636. FLAG(ULW_OPAQUE),
  1637. // Private flags
  1638. //FLAG(ULW_NOREPAINT),
  1639. //FLAG(ULW_DEFAULT_ATTRIBUTES),
  1640. //FLAG(ULW_NEW_ATTRIBUTES),
  1641. FLAG(ULW_CURSOR),
  1642. FLAG(ULW_DRAGRECT),
  1643. END_FLAG
  1644. };
  1645. // SURFACE.SURFOBJ.iType
  1646. ENUMDEF aedSTYPE[] = {
  1647. ENUM(STYPE_BITMAP),
  1648. ENUM(STYPE_DEVICE),
  1649. ENUM(STYPE_DEVBITMAP),
  1650. END_ENUM
  1651. };
  1652. // SURFACE.SURFOBJ.fjBitmap
  1653. FLAGDEF afdSURFOBJ_fjBitmap[] = {
  1654. FLAG(BMF_TOPDOWN),
  1655. FLAG(BMF_NOZEROINIT),
  1656. FLAG(BMF_DONTCACHE),
  1657. FLAG(BMF_USERMEM),
  1658. FLAG(BMF_KMSECTION),
  1659. FLAG(BMF_NOTSYSMEM),
  1660. FLAG(BMF_WINDOW_BLT),
  1661. FLAG(BMF_UMPDMEM),
  1662. {"BMF_SPRITE (obsolete)", 0x0100},
  1663. FLAG(BMF_ISREADONLY),
  1664. FLAG(BMF_MAKEREADWRITE),
  1665. END_FLAG
  1666. };
  1667. // SURFACE.SURFOBJ.iBitmapFormat
  1668. // BLTINFO.iFormatSrc
  1669. // BLTINFO.iFormatDst
  1670. // DEVINFO.iDitherFormat
  1671. // EBRUSHOBJ._iMetaFormat
  1672. ENUMDEF aedBMF[] = {
  1673. ENUM(BMF_1BPP),
  1674. ENUM(BMF_4BPP),
  1675. ENUM(BMF_8BPP),
  1676. ENUM(BMF_16BPP),
  1677. ENUM(BMF_24BPP),
  1678. ENUM(BMF_32BPP),
  1679. ENUM(BMF_4RLE),
  1680. ENUM(BMF_8RLE),
  1681. ENUM(BMF_JPEG),
  1682. ENUM(BMF_PNG),
  1683. END_ENUM
  1684. };
  1685. // SURFACE.SurfFlags
  1686. FLAGDEF afdSURFACE_SurfFlags[] = {
  1687. FLAG(HOOK_BITBLT),
  1688. FLAG(HOOK_STRETCHBLT),
  1689. FLAG(HOOK_PLGBLT),
  1690. FLAG(HOOK_TEXTOUT),
  1691. { "HOOK_PAINT (obsolete)", HOOK_PAINT },
  1692. FLAG(HOOK_STROKEPATH),
  1693. FLAG(HOOK_FILLPATH),
  1694. FLAG(HOOK_STROKEANDFILLPATH),
  1695. FLAG(HOOK_LINETO),
  1696. // FLAG(SHAREACCESS_SURFACE),
  1697. FLAG(HOOK_COPYBITS),
  1698. // { "HOOK_MOVEPANNING (obsolete)", HOOK_MOVEPANNING },
  1699. FLAG(HOOK_SYNCHRONIZE),
  1700. FLAG(HOOK_STRETCHBLTROP),
  1701. // { "HOOK_SYNCHRONIZEACCESS (obsolete)", HOOK_SYNCHRONIZEACCESS },
  1702. FLAG(HOOK_TRANSPARENTBLT),
  1703. FLAG(HOOK_ALPHABLEND),
  1704. FLAG(HOOK_GRADIENTFILL),
  1705. FLAG(USE_DEVLOCK_SURFACE),
  1706. FLAG(PDEV_SURFACE),
  1707. FLAG(ABORT_SURFACE),
  1708. FLAG(DYNAMIC_MODE_PALETTE),
  1709. FLAG(UNREADABLE_SURFACE),
  1710. FLAG(PALETTE_SELECT_SET),
  1711. FLAG(API_BITMAP),
  1712. FLAG(BANDING_SURFACE),
  1713. FLAG(INCLUDE_SPRITES_SURFACE),
  1714. FLAG(LAZY_DELETE_SURFACE),
  1715. FLAG(DDB_SURFACE),
  1716. FLAG(ENG_CREATE_DEVICE_SURFACE),
  1717. FLAG(DRIVER_CREATED_SURFACE),
  1718. FLAG(DIRECTDRAW_SURFACE),
  1719. FLAG(MIRROR_SURFACE),
  1720. FLAG(UMPD_SURFACE),
  1721. FLAG(REDIRECTION_SURFACE),
  1722. FLAG(SHAREACCESS_SURFACE),
  1723. END_FLAG
  1724. };
  1725. // XLATEOBJ.flXlate
  1726. FLAGDEF afdXLATEOBJ_flXlate[] = {
  1727. FLAG(XO_TRIVIAL),
  1728. FLAG(XO_TABLE),
  1729. FLAG(XO_TO_MONO),
  1730. FLAG(XO_FROM_CMYK),
  1731. FLAG(XO_DEVICE_ICM),
  1732. FLAG(XO_HOST_ICM),
  1733. END_FLAG
  1734. };
  1735. // XLATE.lCachIndex
  1736. ENUMDEF aedXLATE_lCacheIndex[] = {
  1737. ENUM(XLATE_CACHE_INVALID),
  1738. ENUM(XLATE_CACHE_JOURNAL),
  1739. END_ENUM
  1740. };
  1741. // XLATE.flPrivate
  1742. FLAGDEF afdXLATE_flPrivate[] = {
  1743. FLAG(XLATE_FROM_MONO),
  1744. FLAG(XLATE_RGB_SRC),
  1745. FLAG(XLATE_RGB_BOTH),
  1746. FLAG(XLATE_PAL_MANAGED),
  1747. FLAG(XLATE_USE_CURRENT),
  1748. FLAG(XLATE_USE_SURFACE_PAL),
  1749. FLAG(XLATE_USE_FOREGROUND),
  1750. END_FLAG
  1751. };
  1752. extern EnumFlagEntry efe_PATHOBJ;
  1753. extern EnumFlagEntry efeXCLIPOBJ;
  1754. EnumFlagField aeff_BASEOBJECT[] = {
  1755. { "hHmgr", CALL_FUNC, OutputHandleInfo },
  1756. { "BaseFlags", FLAG_FIELD, afdBASEOBJECT_BaseFlags },
  1757. };
  1758. EnumFlagEntry efe_BASEOBJECT = EFTypeEntry(_BASEOBJECT);
  1759. EnumFlagField aeff_BLENDFUNCTION[] = {
  1760. { "BlendOp", ENUM_FIELD, aed_BLENDFUNCTION_BlendOp },
  1761. { "BlendFlags", FLAG_FIELD, afd_BLENDFUNCTION_BlendFlags },
  1762. { "AlphaFormat", FLAG_FIELD, afd_BLENDFUNCTION_AlphaFormat },
  1763. };
  1764. EnumFlagField aeffBLTINFO[] = {
  1765. { "iFormatSrc", ENUM_FIELD, aedBMF },
  1766. { "iFormatDst", ENUM_FIELD, aedBMF },
  1767. };
  1768. EnumFlagField aeffBRUSH[] = {
  1769. { "_BASEOBJECT", PARENT_FIELDS, &efe_BASEOBJECT },
  1770. { "_ulStyle", ENUM_FIELD, aedBRUSH__ulStyle },
  1771. { "_flAttrs", FLAG_FIELD, afdBRUSH__flAttrs },
  1772. };
  1773. EnumFlagField aeff_BRUSHOBJ[] = {
  1774. { "flColorType", FLAG_FIELD, afdBRUSHOBJ_flColorType },
  1775. };
  1776. EnumFlagEntry efe_BRUSHOBJ = EFTypeEntry(_BRUSHOBJ);
  1777. EnumFlagField aeff_CLIPOBJ[] = {
  1778. { "iDComplexity", ENUM_FIELD, aedCLIPOBJ_iDComplexity },
  1779. { "iFComplexity", ENUM_FIELD, aedCLIPOBJ_iFComplexity },
  1780. { "iMode", ENUM_FIELD, aedCLIPOBJ_iMode },
  1781. { "fjOptions", FLAG_FIELD, afdCLIPOBJ_fjOptions },
  1782. };
  1783. EnumFlagEntry efe_CLIPOBJ = EFTypeEntry(_CLIPOBJ);
  1784. EnumFlagField aeffDC[] = {
  1785. { "_BASEOBJECT", PARENT_FIELDS, &efe_BASEOBJECT },
  1786. { "fs_", FLAG_FIELD, afdDC_fs_ },
  1787. { "flGraphicsCaps_", FLAG_FIELD, afdDC_flGraphicsCaps_ },
  1788. { "flGraphicsCaps2_", FLAG_FIELD, afdDC_flGraphicsCaps2_ },
  1789. };
  1790. EnumFlagField aeff_devicemodeA[] = {
  1791. { "dmFields", FLAG_FIELD, afdDEVMODE_dmFields },
  1792. { "dmPaperSize", ENUM_FIELD, aedDEVMODE_dmPaperSize },
  1793. { "dmDisplayOrientation", ENUM_FIELD, aedDEVMODE_dmDisplayOrientation },
  1794. { "dmDisplayFixedOutput", ENUM_FIELD, aedDEVMODE_dmDisplayFixedOutput },
  1795. { "dmDisplayFlags", FLAG_FIELD, afdDEVMODE_dmDisplayFlags },
  1796. { "dmICMMethod", ENUM_FIELD, aedDEVMODE_dmICMMethod },
  1797. { "dmICMIntent", ENUM_FIELD, aedDEVMODE_dmICMIntent },
  1798. { "dmMediaType", ENUM_FIELD, aedDEVMODE_dmMediaType },
  1799. { "dmDitherType", ENUM_FIELD, aedDEVMODE_dmDitherType },
  1800. };
  1801. EnumFlagField aeff_devicemodeW[] = {
  1802. { "dmFields", FLAG_FIELD, afdDEVMODE_dmFields },
  1803. { "dmPaperSize", ENUM_FIELD, aedDEVMODE_dmPaperSize },
  1804. { "dmDisplayOrientation", ENUM_FIELD, aedDEVMODE_dmDisplayOrientation },
  1805. { "dmDisplayFixedOutput", ENUM_FIELD, aedDEVMODE_dmDisplayFixedOutput },
  1806. { "dmDisplayFlags", FLAG_FIELD, afdDEVMODE_dmDisplayFlags },
  1807. { "dmICMMethod", ENUM_FIELD, aedDEVMODE_dmICMMethod },
  1808. { "dmICMIntent", ENUM_FIELD, aedDEVMODE_dmICMIntent },
  1809. { "dmMediaType", ENUM_FIELD, aedDEVMODE_dmMediaType },
  1810. { "dmDitherType", ENUM_FIELD, aedDEVMODE_dmDitherType },
  1811. };
  1812. EnumFlagField aefftagDEVINFO[] = {
  1813. { "flGraphicsCaps", FLAG_FIELD, afdDC_flGraphicsCaps_ },
  1814. { "iDitherFormat", ENUM_FIELD, aedBMF },
  1815. { "flGraphicsCaps2", FLAG_FIELD, afdDC_flGraphicsCaps2_ },
  1816. };
  1817. EnumFlagField aeffEBRUSHOBJ[] = {
  1818. { "_BRUSHOBJ", PARENT_FIELDS, &efe_BRUSHOBJ },
  1819. { "flAttrs", FLAG_FIELD, afdBRUSH__flAttrs },
  1820. { "_iMetaFormat", ENUM_FIELD, aedBMF },
  1821. };
  1822. EnumFlagField aeffECLIPOBJ[] = {
  1823. { "XCLIPOBJ", PARENT_FIELDS, &efeXCLIPOBJ },
  1824. };
  1825. EnumFlagField aeffEPATHOBJ[] = {
  1826. { "_PATHOBJ", PARENT_FIELDS, &efe_PATHOBJ },
  1827. };
  1828. EnumFlagField aeff_ENTRY[] = {
  1829. { "FullUnique", CALL_FUNC, OutputFullUniqueInfo },
  1830. { "Objt", ENUM_FIELD, aedENTRY_Objt },
  1831. { "Flags", FLAG_FIELD, afdENTRY_Flags },
  1832. };
  1833. EnumFlagField aeff_FLOAT_LONG[] = {
  1834. { "e", CALL_FUNC, OutputFLOATL },
  1835. };
  1836. EnumFlagField aeff_GDIINFO[] = {
  1837. { "flRaster", FLAG_FIELD, afdGDIINFO_flRaster },
  1838. };
  1839. EnumFlagField aefftagGRAPHICS_DEVICE[] = {
  1840. { "stateFlags", FLAG_FIELD, afdGRAPHICS_DEVICE_stateFlags },
  1841. };
  1842. EnumFlagField aeff_LINEATTRS[] = {
  1843. { "fl", FLAG_FIELD, afdLINEATTRS_fl },
  1844. { "iJoin", ENUM_FIELD, aedLINEATTRS_iJoin },
  1845. { "iEndCap", ENUM_FIELD, aedLINEATTRS_iEndCap },
  1846. };
  1847. EnumFlagField aeffMATRIX[] = {
  1848. { "flAccel", FLAG_FIELD, afdMATRIX_flAccel },
  1849. };
  1850. EnumFlagField aeffPALETTE[] = {
  1851. { "_BASEOBJECT", PARENT_FIELDS, &efe_BASEOBJECT },
  1852. { "flPal", FLAG_FIELD, afdPALETTE_flPal },
  1853. };
  1854. EnumFlagField aeffPATH[] = {
  1855. { "_BASEOBJECT", PARENT_FIELDS, &efe_BASEOBJECT },
  1856. { "flags", FLAG_FIELD, afdPATH_flags },
  1857. { "flType", FLAG_FIELD, afdPATH_flType },
  1858. { "fl", FLAG_FIELD, afdPATHOBJ_fl },
  1859. };
  1860. EnumFlagField aeff_PATHOBJ[] = {
  1861. { "fl", FLAG_FIELD, afdPATHOBJ_fl },
  1862. };
  1863. EnumFlagEntry efe_PATHOBJ = EFTypeEntry(_PATHOBJ);
  1864. EnumFlagField aeffPDEV[] = {
  1865. { "_BASEOBJECT", PARENT_FIELDS, &efe_BASEOBJECT },
  1866. { "fl", FLAG_FIELD, afdPDEV_fl },
  1867. { "flAccelerated", FLAG_FIELD, afdPDEV_flAccelerated },
  1868. { "dwDriverCapableOverride", FLAG_FIELD, afdPDEV_dwDriverCapableOverride},
  1869. // { "dwDriverAccelerationLevel", CALL_FUNC, },
  1870. };
  1871. EnumFlagField aeffSPRITE[] = {
  1872. { "fl", FLAG_FIELD, afdSPRITE_fl },
  1873. { "dwShape", FLAG_FIELD, afdSPRITE_dwShape },
  1874. };
  1875. EnumFlagField aeff_SpriteCachedAttributes[] = {
  1876. { "dwShape", FLAG_FIELD, afdSPRITE_dwShape },
  1877. };
  1878. EnumFlagField aeff_SPRITESTATE[] = {
  1879. { "flOriginalSurfFlags", FLAG_FIELD, afdSURFACE_SurfFlags },
  1880. { "iOriginalType", ENUM_FIELD, aedSTYPE },
  1881. { "flSpriteSurfFlags", FLAG_FIELD, afdSURFACE_SurfFlags },
  1882. { "iSpriteType", ENUM_FIELD, aedSTYPE },
  1883. };
  1884. EnumFlagField aeff_SURFOBJ[] = {
  1885. { "iBitmapFormat", ENUM_FIELD, aedBMF },
  1886. { "iType", ENUM_FIELD, aedSTYPE },
  1887. { "fjBitmap", FLAG_FIELD, afdSURFOBJ_fjBitmap },
  1888. };
  1889. EnumFlagField aeffSURFACE[] = {
  1890. { "_BASEOBJECT", PARENT_FIELDS, &efe_BASEOBJECT },
  1891. { "SurfFlags", FLAG_FIELD, afdSURFACE_SurfFlags },
  1892. };
  1893. EnumFlagField aeffXCLIPOBJ[] = {
  1894. { "_CLIPOBJ", PARENT_FIELDS, &efe_CLIPOBJ },
  1895. };
  1896. EnumFlagEntry efeXCLIPOBJ = EFTypeEntry(XCLIPOBJ);
  1897. EnumFlagField aeff_XLATEOBJ[] = {
  1898. { "flXlate", FLAG_FIELD, afdXLATEOBJ_flXlate },
  1899. };
  1900. EnumFlagEntry efe_XLATEOBJ = EFTypeEntry(_XLATEOBJ);
  1901. EnumFlagField aeffXLATE[] = {
  1902. { "_XLATEOBJ", PARENT_FIELDS, &efe_XLATEOBJ },
  1903. { "lCacheIndex", ENUM_FIELD_LIMITED, aedXLATE_lCacheIndex },
  1904. { "flPrivate", FLAG_FIELD, afdXLATE_flPrivate },
  1905. };
  1906. EnumFlagEntry EFDatabase[] = {
  1907. // { , 0, , aeff },
  1908. EFTypeEntry(_BASEOBJECT),
  1909. EFTypeEntry(_BLENDFUNCTION),
  1910. EFTypeEntry(BLTINFO),
  1911. EFTypeEntry(BRUSH),
  1912. EFTypeEntry(_BRUSHOBJ),
  1913. EFTypeEntry(_CLIPOBJ),
  1914. EFTypeEntry(DC),
  1915. EFTypeEntry(_devicemodeA),
  1916. EFTypeEntry(_devicemodeW),
  1917. EFTypeEntry(tagDEVINFO),
  1918. EFTypeEntry(EBRUSHOBJ),
  1919. EFTypeEntry(ECLIPOBJ),
  1920. EFTypeEntry(_ENTRY),
  1921. EFTypeEntry(EPATHOBJ),
  1922. EFTypeEntry(_FLOAT_LONG),
  1923. EFTypeEntry(_GDIINFO),
  1924. EFTypeEntry(tagGRAPHICS_DEVICE),
  1925. EFTypeEntry(_LINEATTRS),
  1926. EFTypeEntry(MATRIX),
  1927. EFTypeEntry(PALETTE),
  1928. EFTypeEntry(PATH),
  1929. EFTypeEntry(_PATHOBJ),
  1930. EFTypeEntry(PDEV),
  1931. EFTypeEntry(SPRITE),
  1932. EFTypeEntry(_SpriteCachedAttributes),
  1933. EFTypeEntry(_SPRITESTATE),
  1934. EFTypeEntry(SURFACE),
  1935. EFTypeEntry(_SURFOBJ),
  1936. EFTypeEntry(XCLIPOBJ),
  1937. EFTypeEntry(_XLATEOBJ),
  1938. EFTypeEntry(XLATE),
  1939. { "", 0, 0, NULL}
  1940. };
  1941. /******************************Public*Routine******************************\
  1942. * output standard flags
  1943. *
  1944. * History:
  1945. *
  1946. * 11-30-2000 -by- Jason Hartman [jasonha]
  1947. *
  1948. \**************************************************************************/
  1949. ULONG64
  1950. OutputFlags(
  1951. OutputControl *OutCtl,
  1952. FLAGDEF *pFlagDef,
  1953. ULONG64 fl,
  1954. BOOL SingleLine
  1955. )
  1956. {
  1957. ULONG64 FlagsFound = 0;
  1958. if (fl == 0)
  1959. {
  1960. while (pFlagDef->psz != NULL)
  1961. {
  1962. if (pFlagDef->fl == 0)
  1963. {
  1964. if (!SingleLine) OutCtl->Output("\n ");
  1965. OutCtl->Output("%s",pFlagDef->psz);
  1966. }
  1967. pFlagDef++;
  1968. }
  1969. }
  1970. else
  1971. {
  1972. while (pFlagDef->psz != NULL)
  1973. {
  1974. if (pFlagDef->fl & fl)
  1975. {
  1976. if (!SingleLine)
  1977. {
  1978. OutCtl->Output("\n ");
  1979. }
  1980. else if (FlagsFound)
  1981. {
  1982. OutCtl->Output(" | ");
  1983. }
  1984. OutCtl->Output("%s",pFlagDef->psz);
  1985. if (FlagsFound & pFlagDef->fl)
  1986. {
  1987. OutCtl->Output(" (SHARED FLAG)");
  1988. }
  1989. FlagsFound |= pFlagDef->fl;
  1990. }
  1991. pFlagDef++;
  1992. }
  1993. }
  1994. return fl & ~FlagsFound;
  1995. }
  1996. /******************************Public*Routine******************************\
  1997. * output standard enum values
  1998. *
  1999. * History:
  2000. *
  2001. * 11-30-2000 -by- Jason Hartman [jasonha]
  2002. *
  2003. \**************************************************************************/
  2004. BOOL
  2005. OutputEnum(
  2006. OutputControl *OutCtl,
  2007. ENUMDEF *pEnumDef,
  2008. ULONG64 ul
  2009. )
  2010. {
  2011. while (pEnumDef->psz != NULL)
  2012. {
  2013. if (pEnumDef->ul == ul)
  2014. {
  2015. OutCtl->Output(pEnumDef->psz);
  2016. return (TRUE);
  2017. }
  2018. pEnumDef++;
  2019. }
  2020. return (FALSE);
  2021. }
  2022. BOOL
  2023. OutputEnumWithParenthesis(
  2024. OutputControl *OutCtl,
  2025. ENUMDEF *pEnumDef,
  2026. ULONG64 ul
  2027. )
  2028. {
  2029. while (pEnumDef->psz != NULL)
  2030. {
  2031. if (pEnumDef->ul == ul)
  2032. {
  2033. OutCtl->Output("(%s)", pEnumDef->psz);
  2034. return (TRUE);
  2035. }
  2036. pEnumDef++;
  2037. }
  2038. return (FALSE);
  2039. }
  2040. /******************************Public*Routine******************************\
  2041. * Output interpretation of pszField's value if found in pEFEntry
  2042. *
  2043. * History:
  2044. *
  2045. * 11-30-2000 -by- Jason Hartman [jasonha]
  2046. *
  2047. \**************************************************************************/
  2048. BOOL
  2049. OutputFieldValue(
  2050. OutputControl *OutCtl,
  2051. EnumFlagEntry *pEFEntry,
  2052. const CHAR *pszField,
  2053. PDEBUG_VALUE Value,
  2054. PDEBUG_CLIENT Client,
  2055. BOOL Compact
  2056. )
  2057. {
  2058. EnumFlagField *pEFField;
  2059. DEBUG_VALUE ConvValue;
  2060. if (OutCtl == NULL ||
  2061. pEFEntry == NULL ||
  2062. pszField == NULL ||
  2063. Value == NULL ||
  2064. Value->Type == DEBUG_VALUE_INVALID)
  2065. {
  2066. return E_INVALIDARG;
  2067. }
  2068. for (ULONG i = 0; i < pEFEntry->FieldEntries; i++)
  2069. {
  2070. pEFField = &pEFEntry->FieldEntry[i];
  2071. if (pEFField->EFType == PARENT_FIELDS)
  2072. {
  2073. if (OutputFieldValue(OutCtl, pEFField->Parent, pszField, Value, Client, Compact))
  2074. {
  2075. return TRUE;
  2076. }
  2077. }
  2078. else if (strcmp(pszField, pEFField->FieldName) == 0)
  2079. {
  2080. switch (pEFField->EFType)
  2081. {
  2082. case FLAG_FIELD:
  2083. {
  2084. ULONG64 flRem;
  2085. if (Value->Type != DEBUG_VALUE_INT64)
  2086. {
  2087. if (OutCtl->CoerceValue(Value, DEBUG_VALUE_INT64, &ConvValue) != S_OK)
  2088. {
  2089. return FALSE;
  2090. }
  2091. Value = &ConvValue;
  2092. }
  2093. if (Compact)
  2094. {
  2095. OutCtl->Output(" (");
  2096. }
  2097. flRem = OutputFlags(OutCtl, pEFField->FlagDef, Value->I64, Compact);
  2098. if (flRem && ((flRem != 0xffffffff00000000) || !(Value->I64 & 0x80000000)))
  2099. {
  2100. if (!Compact) OutCtl->Output("\n ");
  2101. OutCtl->Output(" Unknown Flags: 0x%I64x", flRem);
  2102. }
  2103. if (Compact)
  2104. {
  2105. OutCtl->Output(")");
  2106. }
  2107. return TRUE;
  2108. }
  2109. case ENUM_FIELD:
  2110. case ENUM_FIELD_LIMITED:
  2111. {
  2112. if (Value->Type != DEBUG_VALUE_INT64)
  2113. {
  2114. if (OutCtl->CoerceValue(Value, DEBUG_VALUE_INT64, &ConvValue) != S_OK)
  2115. {
  2116. return FALSE;
  2117. }
  2118. Value = &ConvValue;
  2119. }
  2120. OutCtl->Output(" ");
  2121. if (!OutputEnumWithParenthesis(OutCtl, pEFField->EnumDef, Value->I64))
  2122. {
  2123. if (pEFField->EFType != ENUM_FIELD_LIMITED)
  2124. {
  2125. OutCtl->Output("(Unknown Value)", Value->I64);
  2126. }
  2127. }
  2128. return TRUE;
  2129. }
  2130. case CALL_FUNC:
  2131. OutCtl->Output(" ");
  2132. pEFField->EFFunc(OutCtl, Client, Value);
  2133. return TRUE;
  2134. default:
  2135. OutCtl->OutErr(" Unknown database entry type.\n");
  2136. break;
  2137. }
  2138. }
  2139. }
  2140. return FALSE;
  2141. }
  2142. /******************************Public*Routine******************************\
  2143. * Output interpretations of known fields as stored in EFDatabase
  2144. * (Known flags & enum values as well some special fields.)
  2145. *
  2146. * History:
  2147. *
  2148. * 11-30-2000 -by- Jason Hartman [jasonha]
  2149. *
  2150. \**************************************************************************/
  2151. BOOL
  2152. OutputTypeFieldValue(
  2153. OutputControl *OutCtl,
  2154. const CHAR *pszType,
  2155. const CHAR *pszField,
  2156. PDEBUG_VALUE Value,
  2157. PDEBUG_CLIENT Client,
  2158. BOOL Compact
  2159. )
  2160. {
  2161. if (OutCtl == NULL ||
  2162. Value == NULL ||
  2163. Value->Type == DEBUG_VALUE_INVALID)
  2164. {
  2165. return E_INVALIDARG;
  2166. }
  2167. BOOL FoundType = FALSE;
  2168. EnumFlagEntry *pEFEntry = EFDatabase;
  2169. BOOL FoundField;
  2170. for (pEFEntry = EFDatabase;
  2171. pEFEntry->TypeName[0] != '\0';
  2172. pEFEntry++)
  2173. {
  2174. if (strcmp(pszType, pEFEntry->TypeName) == 0)
  2175. {
  2176. FoundType = TRUE;
  2177. break;
  2178. }
  2179. }
  2180. if (!FoundType)
  2181. {
  2182. // Check if this type is a clean typedef
  2183. // (Test it against database with prefixed
  2184. // '_'s and 'tag's removed.)
  2185. for (pEFEntry = EFDatabase;
  2186. pEFEntry->TypeName[0] != '\0';
  2187. pEFEntry++)
  2188. {
  2189. if ((pEFEntry->TypeName[0] == '_') ?
  2190. (strcmp(pszType, &pEFEntry->TypeName[1]) == 0) :
  2191. (pEFEntry->TypeName[0] == 't' &&
  2192. pEFEntry->TypeName[1] == 'a' &&
  2193. pEFEntry->TypeName[2] == 'g' &&
  2194. strcmp(pszType, &pEFEntry->TypeName[3]) == 0))
  2195. {
  2196. FoundType = TRUE;
  2197. break;
  2198. }
  2199. }
  2200. }
  2201. return (FoundType) ?
  2202. OutputFieldValue(OutCtl, pEFEntry, pszField, Value, Client, Compact) :
  2203. FALSE;
  2204. }