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.

156 lines
4.6 KiB

  1. #ifndef OBJHELP_DEFINED
  2. #define OBJHELP_DEFINED
  3. #include "lsdefs.h"
  4. #include "lstflow.h"
  5. #include "pobjdim.h"
  6. #include "plssubl.h"
  7. #include "lsesc.h"
  8. #include "plsdnode.h"
  9. #include "fmtres.h"
  10. #include "plsqin.h"
  11. #include "plsqout.h"
  12. #include "breakrec.h"
  13. #include "plnobj.h"
  14. #include "pdobj.h"
  15. #include "pfmti.h"
  16. #include "plsrun.h"
  17. #include "pheights.h"
  18. #include "mwcls.h"
  19. #include "brkkind.h"
  20. #include "pbrko.h"
  21. #define ZeroMemory(a, b) memset(a, 0, b);
  22. #ifdef DEBUG
  23. #define Undefined(pvar) \
  24. {int i; for (i=0; i<sizeof(*pvar); i++) ((BYTE*)pvar) [i] = 255; };
  25. #else
  26. #define Undefined(var) ; /* Nothing in ship-version */
  27. #endif
  28. #define AllocateMemory(pilsobj, cb) ((pilsobj)->lscbk.pfnNewPtr((pilsobj)->pols, (cb)))
  29. #define FreeMemory(pilsobj, ptr) (pilsobj)->lscbk.pfnDisposePtr((pilsobj)->pols, (ptr))
  30. #define NBreaksToSave 3 /* Number of break records to store in objects */
  31. /*
  32. * Proc: GetBreakRecordIndex
  33. * Return number of break record based on brkkind enumeration.
  34. *
  35. */
  36. DWORD GetBreakRecordIndex (BRKKIND brkkind);
  37. /*
  38. * Proc: GetBreakRecordIndex
  39. * Fill trailing info in BRKOUT as if there is no trailing spaces
  40. *
  41. */
  42. LSERR FormatLine(
  43. PLSC plsc,
  44. LSCP cpStart,
  45. long durColMax,
  46. LSTFLOW lstflow,
  47. PLSSUBL *pplssubl,
  48. DWORD cdwlsesc,
  49. const LSESC *plsesc,
  50. POBJDIM pobjdim,
  51. LSCP *pcpOut,
  52. PLSDNODE *pplsdnStart,
  53. PLSDNODE *pplsdnEnd,
  54. FMTRES *pfmtres);
  55. LSERR FormatResumedLine(
  56. PLSC plsc,
  57. LSCP cpStart,
  58. long durColMax,
  59. LSTFLOW lstflow,
  60. PLSSUBL *pplssubl,
  61. DWORD cdwlsesc,
  62. const LSESC *plsesc,
  63. POBJDIM pobjdim,
  64. LSCP *pcpOut,
  65. PLSDNODE *pplsdnStart,
  66. PLSDNODE *pplsdnEnd,
  67. FMTRES *pfmtres,
  68. const BREAKREC *pbreakrec,
  69. DWORD cbreakrec);
  70. LSERR CreateQueryResult(
  71. PLSSUBL plssubl, /*(IN): subline of ruby */
  72. long dupAdj, /*(IN): u offset of start of subline */
  73. long dvpAdj, /*(IN): v offset of start of subline */
  74. PCLSQIN plsqin, /*(IN): query input */
  75. PLSQOUT plsqout); /*(OUT): query output */
  76. /*
  77. * Implementation of LSIMETHOD for objects that do not support the resuming
  78. * of formatting. Ruby, Tatenakayoko and Hih are examples of this kind of
  79. * object.
  80. */
  81. LSERR WINAPI ObjHelpFmtResume(
  82. PLNOBJ plnobj, /* (IN): object lnobj */
  83. const BREAKREC *rgBreakRecord, /* (IN): array of break records */
  84. DWORD nBreakRecord, /* (IN): size of the break records array */
  85. PCFMTIN pcfmtin, /* (IN): formatting input */
  86. FMTRES *pfmtres); /* (OUT): formatting result */
  87. /*
  88. * Implementation of LSIMETHOD for objects that do nothing for mod width.
  89. * Tatenakayoko and Hih are examples of this kind of object.
  90. */
  91. LSERR WINAPI ObjHelpGetModWidthChar(
  92. PDOBJ pdobj, /* (IN): dobj */
  93. PLSRUN plsrun, /* (IN): plsrun of the object */
  94. PLSRUN plsrunText, /* (IN): plsrun of the preceding char */
  95. PCHEIGHTS pcheightsRef, /* (IN): height info about character */
  96. WCHAR wchar, /* (IN): preceding character */
  97. MWCLS mwcls, /* (IN): ModWidth class of preceding character */
  98. long *pdurChange); /* (OUT): amount by which width of the preceding char is to be changed */
  99. /*
  100. * Implementation of LSIMETHOD for objects that do nothing for SetBreak.
  101. * Tatenakayoko and Hih are examples of this kind of object.
  102. */
  103. LSERR WINAPI ObjHelpSetBreak(
  104. PDOBJ pdobj, /* (IN): dobj which is broken */
  105. BRKKIND brkkind, /* (IN): Previous / Next / Force / Imposed was chosen */
  106. DWORD cBreakRecord, /* (IN): size of array */
  107. BREAKREC *rgBreakRecord, /* (IN): array of break records */
  108. DWORD *pcActualBreakRecord); /* (IN): actual number of used elements in array */
  109. /*
  110. * Default implementation of LSIMETHOD for objects that do not
  111. * allow expanding the previous character.
  112. */
  113. LSERR WINAPI ObjHelpFExpandWithPrecedingChar(
  114. PDOBJ pdobj, /* (IN): dobj */
  115. PLSRUN plsrun, /* (IN): plsrun of the object */
  116. PLSRUN plsrunText, /* (IN): plsrun of the preceding char */
  117. WCHAR wchar, /* (IN): preceding character */
  118. MWCLS mwcls, /* (IN): ModWidth class of preceding character*/
  119. BOOL *pfExpand); /* (OUT): (OUT): expand preceding character? */
  120. /*
  121. * Default implementation of LSIMETHOD for objects that do not
  122. * allow expanding themselves.
  123. */
  124. LSERR WINAPI ObjHelpFExpandWithFollowingChar(
  125. PDOBJ pdobj, /* (IN): dobj */
  126. PLSRUN plsrun, /* (IN): plsrun of the object */
  127. PLSRUN plsrunText, /* (IN): plsrun of the following char */
  128. WCHAR wchar, /* (IN): following character */
  129. MWCLS mwcls, /* (IN): ModWidth class of following character*/
  130. BOOL *pfExpand); /* (OUT): expand object? */
  131. #endif /* !OBJHELP_DEFINED */