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.

102 lines
4.6 KiB

  1. /************************************************************/
  2. /* Windows Write, Copyright 1985-1992 Microsoft Corporation */
  3. /************************************************************/
  4. /* Single property modifiers */
  5. /* *** MUST agree with dnsprm in mglobals.c *** */
  6. #ifndef PRMDEFSH
  7. #define PRMDEFSH
  8. /* Paragraph */
  9. #define sprmPLMarg 1 /* Left margin */
  10. #define sprmPRMarg 2 /* Right margin */
  11. #define sprmPFIndent 3 /* First line indent (from LM) */
  12. #define sprmPJc 4 /* Justification code */
  13. #define sprmPRuler 5 /* Ruler (formerly Clear tab) */
  14. #define sprmPRuler1 6 /* Ruler1 (formerly Set tab) */
  15. #define sprmPKeep 7 /* Keep */
  16. #define sprmPNormal 8 /* Normal para (formerly Style, overrides all others) */
  17. #define sprmPRhc 9 /* Running head code */
  18. #define sprmPSame 10 /* Everything (overrides all others) */
  19. #define sprmPDyaLine 11 /* Line height */
  20. #define sprmPDyaBefore 12 /* Space before */
  21. #define sprmPDyaAfter 13 /* Space after */
  22. #define sprmPNest 14 /* Nest para */
  23. #define sprmPUnNest 15 /* Un-nest para */
  24. #define sprmPHang 16 /* Hanging indent */
  25. #define sprmPRgtbd 17 /* add a range of tabs */
  26. #define sprmPKeepFollow 18 /* Keep follow */
  27. /*#define sprmPCAll 19 /* Clear all tabs */
  28. /* Character */
  29. #define sprmCBold 20 /* Bold */
  30. #define sprmCItalic 21 /* Italic */
  31. #define sprmCUline 22 /* Underline */
  32. #define sprmCPos 23 /* Super/subscript */
  33. #define sprmCFtc 24 /* Font code */
  34. #define sprmCHps 25 /* Half-point size */
  35. #define sprmCSame 26 /* Whole CHP */
  36. #define sprmCChgFtc 27 /* Alter Font code */
  37. #define sprmCChgHps 28 /* Alter point size */
  38. #define sprmCPlain 29 /* Change to plain text (preserve font) */
  39. #define sprmCShadow 30 /* Shadow text attribute */
  40. #define sprmCOutline 31 /* Outline text attribute */
  41. #define sprmCCsm 32 /* case modification */
  42. #define sprmCStrike 33 /* Strikeout */ /* unused */
  43. #define sprmCDline 34 /* Double underline */ /* unused */
  44. /*#define sprmCPitch 35 /* Pitch */
  45. /*#define sprmCOverset 36 /* Margin overset */
  46. /*#define sprmCStc 37 /* Style (overrides all others) */
  47. #define sprmCMapFtc 38 /* Defines font code mapping */
  48. #define sprmCOldFtc 39 /* Defines procedural font code mapping
  49. for old WORD files */
  50. #define sprmPRhcNorm 40 /* Normalize rhc indent to be margin-relatve */
  51. #define sprmMax 41 /* UPDATE WHEN ADDING SPRMS */
  52. struct PRM
  53. { /* PropeRty Modifier -- 2 bytes only
  54. (now 4 bytes so scratch file can be >64K (7.12.91) v-dougk)
  55. Couldn't be 3 bytes because Heap mgmt in Write assumes
  56. word sizes of memory requests . Don't know what would take
  57. to change that. */
  58. unsigned char fComplex : 1; /* If fComplex == false . . . */
  59. unsigned char sprm : 7;
  60. CHAR val;
  61. WORD dummy;
  62. };
  63. struct PRMX
  64. { /* PropeRty Modifier, part 2 */
  65. unsigned int fComplex : 1; /* if fComplex == true */
  66. unsigned int bfprm_hi : 15;
  67. unsigned int bfprm_low ;
  68. };
  69. extern struct PRM PrmAppend(struct PRM prm, CHAR *psprm);
  70. extern DoPrm(struct CHP *pchp, struct PAP *ppap, struct PRM prm);
  71. #define fcSCRATCHPRM(prm) (((((typeFC)(((struct PRMX *)&(prm))->bfprm_hi )) << 16) + \
  72. (((typeFC)(((struct PRMX *)&(prm))->bfprm_low)) )) << 1)
  73. #define bPRMNIL(prm) (!((prm).fComplex) && !((prm).sprm) && !((prm).val))
  74. #define SETPRMNIL(prm) ((prm).fComplex = (prm).sprm = (prm).val = (prm).dummy = 0)
  75. /* Definitions for ESPRM */
  76. #define ESPRM_cch 000003 /* Mask for cch of sprm */
  77. #define ESPRM_sgcMult 000004 /* Sgc multiplier */
  78. #define ESPRM_sgc 000014 /* Sprm Group Code mask */
  79. #define ESPRM_spr 000040 /* Sprm priority mask */
  80. #define ESPRM_fClobber 000100 /* Overrides sprms with same sgc and <= spr */
  81. #define ESPRM_fSame 000200 /* Overrides another instance of same sprm */
  82. #define sgcChar (0 * ESPRM_sgcMult)
  83. #define sgcPara (1 * ESPRM_sgcMult)
  84. #define sgcParaSpec (2 * ESPRM_sgcMult)
  85. #define hpsSuperSub 12
  86. #define dxaTabDelta 50
  87. #endif
  88.