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.

219 lines
6.6 KiB

  1. #ifndef WARICHU_DEFINED
  2. #define WARICHU_DEFINED
  3. #include "lsimeth.h"
  4. /* Character location for pfnFetchWarichuWidthAdjust callback */
  5. enum warichucharloc {
  6. warichuBegin, /* Character preceeds Warichu object */
  7. warichuEnd /* Character follows Warichu object */
  8. };
  9. /*
  10. *
  11. * Warichu Object Callbacks to Client
  12. *
  13. */
  14. typedef struct WARICHUCBK
  15. {
  16. LSERR (WINAPI* pfnGetWarichuInfo)(
  17. POLS pols,
  18. LSCP cp,
  19. LSTFLOW lstflow,
  20. PCOBJDIM pcobjdimFirst,
  21. PCOBJDIM pcobjdimSecond,
  22. PHEIGHTS pheightsRef,
  23. PHEIGHTS pheightsPres,
  24. long *pdvpDescentReservedForClient);
  25. /* GetWarichuInfo
  26. * pols (IN): The client context for the request.
  27. *
  28. * cp (IN): the cp of the Warichu object.
  29. *
  30. * lstflow (IN): the lstflow of Warichu parent subline
  31. *
  32. * pcobjdimFirst (IN): dimensions of first line of Warichu.
  33. *
  34. * pcobjdimSecond (IN): dimensions of second line of Warichu.
  35. *
  36. * pheightsRef (OUT): specifies heights for Warichu object in reference
  37. * device units.
  38. *
  39. * pheightsPres (OUT): specifies heights for Warichu object in presentation
  40. * device units.
  41. *
  42. * pdvpDescentReservedForClient (OUT): specifies the part of the descent area
  43. * that the client is reserving for its own use (usually for the purpose
  44. * of underlining) in presentation device units. The object will begin its
  45. * display area below the baseline at the difference between
  46. * pheightsRef->dvDescent and *pdvpDescentReservedForClient.
  47. *
  48. */
  49. LSERR (WINAPI* pfnFetchWarichuWidthAdjust)(
  50. POLS pols,
  51. LSCP cp,
  52. enum warichucharloc wcl,
  53. PLSRUN plsrunForChar,
  54. WCHAR wch,
  55. MWCLS mwclsForChar,
  56. PLSRUN plsrunWarichuBracket,
  57. long *pdurAdjustChar,
  58. long *pdurAdjustBracket);
  59. /* FetchWarichuWidthAdjust
  60. * pols (IN): The client context for the request.
  61. *
  62. * cp (IN): the cp of the Warichu object.
  63. *
  64. * wcl (IN): specifies the location of the character and bracket.
  65. *
  66. * plsrunForChar (IN): the run of the character that is either previous or
  67. * following the Warichu object. Whether preceeding or following is
  68. * determined by value of the wcl parameter above.
  69. *
  70. * wch (IN): character that is either preceeding or following the Warichu
  71. * object.
  72. *
  73. * mwclsForChar (IN): mod width class for the wch parameter.
  74. *
  75. * plsrunWarichuBracket (IN): plsrun for leading or following bracket of
  76. * the Warichu.
  77. *
  78. * pdurAdjustChar (OUT): the amount that the width of the input character
  79. * should be adjusted. A negative value means the width of the input
  80. * character should be made smaller.
  81. *
  82. * pdurAdjustBracket (OUT): the amount that the width of the Warichu bracket
  83. * should be adjusted. A negative value means the width of the Warichu
  84. * bracket should be made smaller.
  85. */
  86. LSERR (WINAPI* pfnWarichuEnum)(
  87. POLS pols,
  88. PLSRUN plsrun,
  89. PCLSCHP plschp,
  90. LSCP cp,
  91. LSDCP dcp,
  92. LSTFLOW lstflow,
  93. BOOL fReverse,
  94. BOOL fGeometryNeeded,
  95. const POINT* pt,
  96. PCHEIGHTS pcheights,
  97. long dupRun,
  98. const POINT *ptLeadBracket,
  99. PCHEIGHTS pcheightsLeadBracket,
  100. long dupLeadBracket,
  101. const POINT *ptTrailBracket,
  102. PCHEIGHTS pcheightsTrailBracket,
  103. long dupTrailBracket,
  104. const POINT *ptFirst,
  105. PCHEIGHTS pcheightsFirst,
  106. long dupFirst,
  107. const POINT *ptSecond,
  108. PCHEIGHTS pcheightsSecond,
  109. long dupSecond,
  110. PLSSUBL plssublLeadBracket,
  111. PLSSUBL plssublTrailBracket,
  112. PLSSUBL plssublFirst,
  113. PLSSUBL plssublSecond);
  114. /* WarichuEnum
  115. *
  116. * pols (IN): client context.
  117. *
  118. * plsrun (IN): plsrun for the entire Warichu Object.
  119. *
  120. * plschp (IN): is lschp for lead character of Warichu Object.
  121. *
  122. * cp (IN): is cp of first character of Warichu Object.
  123. *
  124. * dcp (IN): is number of characters in Warichu Object
  125. *
  126. * lstflow (IN): is text flow at Warichu Object.
  127. *
  128. * fReverse (IN): is whether text should be reversed for visual order.
  129. *
  130. * fGeometryNeeded (IN): is whether Geometry should be returned.
  131. *
  132. * pt (IN): is starting position , iff fGeometryNeeded .
  133. *
  134. * pcheights (IN): is height of Warichu object, iff fGeometryNeeded.
  135. *
  136. * dupRun (IN): is length of Warichu Object, iff fGeometryNeeded.
  137. *
  138. * ptLeadBracket (IN): is point for second line iff fGeometryNeeded and
  139. * plssublLeadBracket not NULL.
  140. *
  141. * pcheightsLeadBracket (IN): is height for Warichu line iff fGeometryNeeded
  142. * and plssublLeadBracket not NULL.
  143. *
  144. * dupLeadBracket (IN): is length of Warichu line iff fGeometryNeeded and
  145. * plssublLeadBracket not NULL.
  146. *
  147. * ptTrailBracket (IN): is point for second line iff fGeometryNeeded and
  148. * plssublLeadBracket not NULL.
  149. *
  150. * pcheightsTrailBracket (IN): is height for Warichu line iff fGeometryNeeded
  151. * and plssublTrailBracket not NULL.
  152. *
  153. * dupTrailBracket (IN): is length of Warichu line iff fGeometryNeeded and
  154. * plssublTrailBracket not NULL.
  155. *
  156. * ptFirst (IN): is starting point for main line iff fGeometryNeeded
  157. *
  158. * pcheightsFirst (IN): is height of main line iff fGeometryNeeded
  159. *
  160. * dupFirst (IN): is length of main line iff fGeometryNeeded
  161. *
  162. * ptSecond (IN): is point for second line iff fGeometryNeeded and
  163. * plssublSecond not NULL.
  164. *
  165. * pcheightsSecond (IN): is height for Warichu line iff fGeometryNeeded
  166. * and plssublSecond not NULL.
  167. *
  168. * dupSecond (IN): is length of Warichu line iff fGeometryNeeded and
  169. * plssublSecond not NULL.
  170. *
  171. * plssublLeadBracket (IN): is subline for lead bracket.
  172. *
  173. * plssublTrailBracket (IN): is subline for trail bracket.
  174. *
  175. * plssublFirst (IN): is first subline in Warichu object.
  176. *
  177. * plssublSecond (IN): is second subline in Warichu object.
  178. *
  179. */
  180. } WARICHUCBK;
  181. #define WARICHU_VERSION 0x300
  182. /*
  183. *
  184. * Warichi object initialization data that the client application must return
  185. * when the Warichu object handler calls the GetObjectHandlerInfo callback.
  186. */
  187. typedef struct WARICHUINIT
  188. {
  189. DWORD dwVersion; /* Version must be WARICHU_VERSION */
  190. WCHAR wchEndFirstBracket; /* Escape char to end first bracket */
  191. WCHAR wchEndText; /* Escape char to end text */
  192. WCHAR wchEndWarichu; /* Escape char to end object */
  193. WCHAR wchUnused; /* For alignment */
  194. WARICHUCBK warichcbk; /* Callbacks */
  195. BOOL fContiguousFetch; /* Always refetch whole subline & closing brace
  196. after reformatting inside warichu */
  197. } WARICHUINIT;
  198. LSERR WINAPI LsGetWarichuLsimethods(
  199. LSIMETHODS *plsim);
  200. /* GetWarichuLsimethods
  201. *
  202. * plsim (OUT): Warichu object callbacks.
  203. */
  204. #endif /* WARICHU_DEFINED */