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.

757 lines
27 KiB

  1. #ifndef LSCBK_DEFINED
  2. #define LSCBK_DEFINED
  3. /* LineServices callbacks */
  4. #include "lsdefs.h"
  5. #include "lsdevice.h"
  6. #include "lsksplat.h"
  7. #include "lskjust.h"
  8. #include "lstflow.h"
  9. #include "endres.h"
  10. #include "mwcls.h"
  11. #include "lsact.h"
  12. #include "lspract.h"
  13. #include "brkcond.h"
  14. #include "brkcls.h"
  15. #include "gprop.h"
  16. #include "gmap.h"
  17. #include "lsexpinf.h"
  18. #include "lskalign.h"
  19. #include "plstabs.h"
  20. #include "pheights.h"
  21. #include "plsrun.h"
  22. #include "plscbk.h"
  23. #include "plschp.h"
  24. #include "plspap.h"
  25. #include "plstxm.h"
  26. #include "plshyph.h"
  27. #include "plsstinf.h"
  28. #include "plsulinf.h"
  29. #include "plsems.h"
  30. #define cpFirstAnm (-0x7FFFFFFF) /* Used for the fetch of the first Autonumber run */
  31. struct lscbk /* Interfaces to application-specific callbacks */
  32. {
  33. /* Dynamic memory APIs */
  34. void* (WINAPI* pfnNewPtr)(POLS, DWORD);
  35. void (WINAPI* pfnDisposePtr)(POLS, void*);
  36. void* (WINAPI* pfnReallocPtr)(POLS, void*, DWORD);
  37. LSERR (WINAPI* pfnFetchRun)(POLS, LSCP,
  38. LPCWSTR*, DWORD*, BOOL*, PLSCHP, PLSRUN*);
  39. /* FetchRun:
  40. * pols (IN):
  41. * cp (IN):
  42. * &lpwchRun (OUT): run of characters.
  43. * &cchRun (OUT): number of characters in run
  44. * &fHidden (OUT) : hidden run?
  45. * &lsChp (OUT): char properties of run
  46. * &plsrun (OUT): abstract representation of run properties
  47. */
  48. LSERR (WINAPI* pfnGetAutoNumberInfo)(POLS, LSKALIGN*, PLSCHP, PLSRUN*, WCHAR*, PLSCHP, PLSRUN*, BOOL*, long*, long*);
  49. /* GetAutoNumberInfo:
  50. * pols (IN):
  51. * &lskalAnm (OUT):
  52. * &lschpAnm (OUT): lschp for Anm
  53. * &plsrunAnm (OUT): plsrun for Anm
  54. * &wchAdd (OUT): character to add (Nil is treated as none)
  55. * &lschpWch (OUT): lschp for added char
  56. * &plsrunWch (OUT): plsrun for added char
  57. * &fWord95Model(OUT):
  58. * &duaSpaceAnm(OUT): relevant iff fWord95Model
  59. * &duaWidthAnm(OUT): relevant iff fWord95Model
  60. */
  61. LSERR (WINAPI* pfnGetNumericSeparators)(POLS, PLSRUN, WCHAR*,WCHAR*);
  62. /* GetNumericSeparators:
  63. * pols (IN):
  64. * plsrun (IN): run pointer as returned from FetchRun
  65. * &wchDecimal (OUT): decimal separator for this run.
  66. * &wchThousands (OUT): thousands separator for this run
  67. */
  68. LSERR (WINAPI* pfnCheckForDigit)(POLS, PLSRUN, WCHAR, BOOL*);
  69. /* GetNumericSeparators:
  70. * pols (IN):
  71. * plsrun (IN): run pointer as returned from FetchRun
  72. * wch (IN): character to check
  73. * &fIsDigit (OUT): this character is digit
  74. */
  75. LSERR (WINAPI* pfnFetchPap)(POLS, LSCP, PLSPAP);
  76. /* FetchPap:
  77. * pols (IN):
  78. * cp (IN): an arbitrary cp value inside the paragraph
  79. * &lsPap (OUT): Paragraph properties.
  80. */
  81. LSERR (WINAPI* pfnFetchTabs)(POLS, LSCP, PLSTABS, BOOL*, long*, WCHAR*);
  82. /* FetchTabs:
  83. * pols (IN):
  84. * cp (IN): an arbitrary cp value inside the paragraph
  85. * &lstabs (OUT): tabs array
  86. * &fHangingTab (OUT): there is hanging tab
  87. * &duaHangingTab (OUT): dua of hanging tab
  88. * &wchHangingTabLeader (OUT): leader of hanging tab
  89. */
  90. LSERR (WINAPI* pfnGetBreakThroughTab)(POLS, long, long, long*);
  91. /* GetBreakThroughTab:
  92. * pols (IN):
  93. * uaRightMargin (IN): right margin for breaking
  94. * uaTabPos (IN): breakthrough tab position
  95. * uaRightMarginNew (OUT): new right margin
  96. */
  97. LSERR (WINAPI* pfnFGetLastLineJustification)(POLS, LSKJUST, LSKALIGN, ENDRES, BOOL*, LSKALIGN*);
  98. /* FGetLastLineJustification:
  99. * pols (IN):
  100. * lskj (IN): kind of justification for the paragraph
  101. * lskal (IN): kind of alignment for the paragraph
  102. * endr (IN): result of formatting
  103. * &fJustifyLastLine (OUT): should last line be fully justified
  104. * &lskalLine (OUT): kind of alignment for this line
  105. */
  106. LSERR (WINAPI* pfnCheckParaBoundaries)(POLS, LSCP, LSCP, BOOL*);
  107. /* CheckParaBoundaries:
  108. * pols (IN):
  109. * cpOld (IN):
  110. * cpNew (IN):
  111. * &fChanged (OUT): "Dangerous" change between paragraph properties.
  112. */
  113. LSERR (WINAPI* pfnGetRunCharWidths)(POLS, PLSRUN,
  114. LSDEVICE, LPCWSTR,
  115. DWORD, long, LSTFLOW,
  116. int*,long*,long*);
  117. /* GetRunCharWidths:
  118. * pols (IN):
  119. * plsrun (IN):
  120. * lsDeviceID (IN): presentation or reference
  121. * lpwchRun (IN): run of characters
  122. * cwchRun (IN): number of characters in run
  123. * du (IN): available space for characters
  124. * kTFlow (IN): text direction and orientation
  125. * rgDu (OUT): widths of characters
  126. * &duRun (OUT): sum of widths in rgDx[0] to rgDu[limDx-1]
  127. * &limDu (OUT): number of widths fetched
  128. */
  129. LSERR (WINAPI* pfnCheckRunKernability)(POLS, PLSRUN,PLSRUN, BOOL*);
  130. /* CheckRunKernability:
  131. * pols (IN):
  132. * plsrunLeft (IN): 1st of pair of adjacent runs
  133. * plsrunRight (IN): 2nd of pair of adjacent runs
  134. * &fKernable (OUT) : if TRUE, Line Service may kern between these runs
  135. */
  136. LSERR (WINAPI* pfnGetRunCharKerning)(POLS, PLSRUN,
  137. LSDEVICE, LPCWSTR,
  138. DWORD, LSTFLOW, int*);
  139. /* GetRunCharKerning:
  140. * pols (IN):
  141. * plsrun (IN):
  142. * lsDeviceID (IN): presentation or reference
  143. * lpwchRun (IN): run of characters
  144. * cwchRun (IN): number of characters in run
  145. * kTFlow (IN): text direction and orientation
  146. * rgDu (OUT): widths of characters
  147. */
  148. LSERR (WINAPI* pfnGetRunTextMetrics)(POLS, PLSRUN,
  149. LSDEVICE, LSTFLOW, PLSTXM);
  150. /* GetRunTextMetrics:
  151. * pols (IN):
  152. * plsrun (IN):
  153. * deviceID (IN): presentation, reference, or absolute
  154. * kTFlow (IN): text direction and orientation
  155. * &lsTxMet (OUT): Text metrics
  156. */
  157. LSERR (WINAPI* pfnGetRunUnderlineInfo)(POLS, PLSRUN, PCHEIGHTS, LSTFLOW,
  158. PLSULINFO);
  159. /* GetRunUnderlineInfo:
  160. * pols (IN):
  161. * plsrun (IN):
  162. * heightsPres (IN):
  163. * kTFlow (IN): text direction and orientation
  164. * &lsUlInfo (OUT): Underline information
  165. */
  166. LSERR (WINAPI* pfnGetRunStrikethroughInfo)(POLS, PLSRUN, PCHEIGHTS, LSTFLOW,
  167. PLSSTINFO);
  168. /* GetRunStrikethroughInfo:
  169. * pols (IN):
  170. * plsrun (IN):
  171. * heightsPres (IN):
  172. * kTFlow (IN): text direction and orientation
  173. * &lsStInfo (OUT): Strikethrough information
  174. */
  175. LSERR (WINAPI* pfnGetBorderInfo)(POLS, PLSRUN, LSTFLOW, long*, long*);
  176. /* GetBorderInfo:
  177. * pols (IN):
  178. * plsrun (IN):
  179. * kTFlow (IN): text direction and orientation
  180. * &durBorder (OUT): Width of the border on the reference device
  181. * &dupBorder (OUT): Width of the border on the presentation device
  182. */
  183. LSERR (WINAPI* pfnReleaseRun)(POLS, PLSRUN);
  184. /* ReleaseRun:
  185. * pols (IN):
  186. * plsrun (IN): run to be released, from GetRun() or FetchRun()
  187. */
  188. LSERR (WINAPI* pfnHyphenate)(POLS, PCLSHYPH, LSCP, LSCP, PLSHYPH);
  189. /* Hyphenate:
  190. * pols (IN):
  191. * &lsHyphLast (IN): last hyphenation found. kysr==kysrNil means "none"
  192. * cpBeginWord (IN): 1st cp in word which exceeds column
  193. * cpExceed (IN): 1st which exceeds column, in this word
  194. * &lsHyph (OUT): hyphenation results. kysr==kysrNil means "none"
  195. */
  196. LSERR (WINAPI* pfnGetHyphenInfo)(POLS, PLSRUN, DWORD*, WCHAR*);
  197. /* GetHyphenInfo:
  198. * pols (IN):
  199. * plsrun (IN):
  200. * kysr (OUT) Ysr type - see "lskysr.h"
  201. * wchYsr (OUT) Character code of YSR
  202. */
  203. LSERR (WINAPI* pfnDrawUnderline)(POLS, PLSRUN, UINT,
  204. const POINT*, DWORD, DWORD, LSTFLOW,
  205. UINT, const RECT*);
  206. /* DrawUnderline:
  207. * pols (IN):
  208. * plsrun (IN): run to use for the underlining
  209. * kUlbase (IN): underline kind
  210. * pptStart (IN): starting position (top left)
  211. * dupUL (IN): underline width
  212. * dvpUL (IN) : underline thickness
  213. * kTFlow (IN): text direction and orientation
  214. * kDisp (IN) : display mode - opaque, transparent
  215. * prcClip (IN) : clipping rectangle
  216. */
  217. LSERR (WINAPI* pfnDrawStrikethrough)(POLS, PLSRUN, UINT,
  218. const POINT*, DWORD, DWORD, LSTFLOW,
  219. UINT, const RECT*);
  220. /* DrawStrikethrough:
  221. * pols (IN):
  222. * plsrun (IN): the run for the strikethrough
  223. * kStbase (IN): strikethrough kind
  224. * pptStart (IN): starting position (top left)
  225. * dupSt (IN): strikethrough width
  226. * dvpSt (IN) : strikethrough thickness
  227. * kTFlow (IN): text direction and orientation
  228. * kDisp (IN) : display mode - opaque, transparent
  229. * prcClip (IN) : clipping rectangle
  230. */
  231. LSERR (WINAPI* pfnDrawBorder)(POLS, PLSRUN, const POINT*, PCHEIGHTS, PCHEIGHTS,
  232. PCHEIGHTS, PCHEIGHTS, long, long, LSTFLOW, UINT, const RECT*);
  233. /* DrawBorder:
  234. * pols (IN):
  235. * plsrun (IN): plsrun of the first bordered run
  236. * pptStart (IN): starting point for the border
  237. * pheightsLineFull (IN): height of the line including SpaceBefore & SpaceAfter
  238. * pheightsLineWithoutAddedSpace (IN): height of the line without SpaceBefore & SpaceAfter
  239. * pheightsSubline (IN): height of subline
  240. * pheightsRuns (IN): height of collected runs to be bordered
  241. * dupBorder (IN): width of one border
  242. * dupRunsInclBorders (IN): width of collected runs
  243. * kTFlow (IN): text direction and orientation
  244. * kDisp (IN) : display mode - opaque, transparent
  245. * prcClip (IN) : clipping rectangle
  246. */
  247. LSERR (WINAPI* pfnDrawUnderlineAsText)(POLS, PLSRUN, const POINT*,
  248. long, LSTFLOW, UINT, const RECT*);
  249. /* DrawUnderlineAsText:
  250. * pols (IN):
  251. * plsrun (IN): run to use for the underlining
  252. * pptStart (IN): starting pen position
  253. * dupLine (IN): length of UL
  254. * kTFlow (IN): text direction and orientation
  255. * kDisp (IN) : display mode - opaque, transparent
  256. * prcClip (IN) : clipping rectangle
  257. */
  258. LSERR (WINAPI* pfnFInterruptUnderline)(POLS, PLSRUN, LSCP, PLSRUN, LSCP,BOOL*);
  259. /* FInterruptUnderline:
  260. * pols (IN):
  261. * plsrunFirst (IN): run pointer for the previous run
  262. * cpLastFirst (IN): cp of the last character of the previous run
  263. * plsrunSecond (IN): run pointer for the current run
  264. * cpStartSecond (IN): cp of the first character of the current run
  265. * &fInterruptUnderline (OUT): do you want to interrupt drawing of the underline between these runs
  266. */
  267. LSERR (WINAPI* pfnFInterruptShade)(POLS, PLSRUN, PLSRUN, BOOL*);
  268. /* FInterruptShade:
  269. * pols (IN):
  270. * plsrunFirst (IN): run pointer for the previous run
  271. * plsrunSecond (IN): run pointer for the current run
  272. * &fInterruptShade (OUT): do you want to interrupt shading between these runs
  273. */
  274. LSERR (WINAPI* pfnFInterruptBorder)(POLS, PLSRUN, PLSRUN, BOOL*);
  275. /* FInterruptBorder:
  276. * pols (IN):
  277. * plsrunFirst (IN): run pointer for the previous run
  278. * plsrunSecond (IN): run pointer for the current run
  279. * &fInterruptBorder (OUT): do you want to interrupt border between these runs
  280. */
  281. LSERR (WINAPI* pfnShadeRectangle)(POLS, PLSRUN, const POINT*, PCHEIGHTS, PCHEIGHTS,
  282. PCHEIGHTS, PCHEIGHTS, PCHEIGHTS, long, long, LSTFLOW, UINT, const RECT*);
  283. /* ShadeRectangle:
  284. * pols (IN):
  285. * plsrun (IN): plsrun of the first shaded run
  286. * pptStart (IN): starting point for the shading rectangle
  287. * pheightsLineWithAddSpace(IN): height of the line including SpaceBefore & SpaceAfter (main baseline,
  288. * lstflow of main line)
  289. * pheightsLineWithoutAddedSpace (IN): height of the line without SpaceBefore & SpaceAfter
  290. * pheightsSubline (IN): height of subline (local baseline, lstflow of subline)
  291. * pheightsRunsExclTrail (IN): height of collected runs to be shaded excluding
  292. * trailing spaces area (local baseline, lstflow of subline)
  293. * pheightsRunsInclTrail (IN): height of collected runs to be shaded including
  294. * trailing spaces area (local baseline, lstflow of subline)
  295. * dupRunsExclTrail (IN): width of collected runs excluding trailing spaces area
  296. * dupRunsInclTrail (IN): width of collected runs including trailing spaces area
  297. * kTFlow (IN): text direction and orientation of subline
  298. * kDisp (IN) : display mode - opaque, transparent
  299. * prcClip (IN) : clipping rectangle
  300. */
  301. LSERR (WINAPI* pfnDrawTextRun)(POLS, PLSRUN, BOOL, BOOL,
  302. const POINT*, LPCWSTR, const int*, DWORD,
  303. LSTFLOW, UINT, const POINT*, PCHEIGHTS, long, long, const RECT*);
  304. /* DrawTextRun:
  305. * pols (IN):
  306. * plsrun (IN):
  307. * fStrikeout (IN) :
  308. * fUnderline (IN) :
  309. * pptText (IN): starting point for the text output
  310. * lpwchRun (IN): run of characters
  311. * rgDupRun (IN): widths of characters
  312. * cwchRun (IN): number of characters in run
  313. * kTFlow (IN): text direction and orientation
  314. * kDisp (IN): display mode - opaque, transparent
  315. * pptRun (IN): starting point of the run
  316. * heightsPres (IN): presentation heights for this run
  317. * dupRun (IN): presentation width for this run
  318. * dupLimUnderline (IN): underlining limit
  319. * pRectClip (IN): clipping rectangle
  320. */
  321. LSERR (WINAPI* pfnDrawSplatLine)(POLS, enum lsksplat, LSCP, const POINT*,
  322. PCHEIGHTS, PCHEIGHTS, PCHEIGHTS, long, LSTFLOW,
  323. UINT, const RECT*);
  324. /* DrawSplatLine:
  325. * pols (IN):
  326. * ksplat (IN): See definitions in lsksplat.h
  327. * cpSplat (IN): location of the break character which caused the splat.
  328. * pptSplatLine (IN) : starting position of the splat line
  329. * pheightsLineFull (IN): height of the line including SpaceBefore & SpaceAfter
  330. * pheightsLineWithoutAddedSpace (IN): height of the line without SpaceBefore & SpaceAfter
  331. * pheightsSubline (IN): height of subline
  332. * dup (IN): distance to right margin
  333. * kTFlow (IN): text direction and orientation
  334. * kDisp (IN): display mode - opaque, transparent
  335. * &rcClip (IN) : clipping rectangle
  336. */
  337. /* Advanced typography enabling API's */
  338. /* Glyph enabling */
  339. LSERR (WINAPI* pfnFInterruptShaping)(POLS, LSTFLOW, PLSRUN, PLSRUN, BOOL*);
  340. /* FInterruptShaping:
  341. * pols (IN):
  342. * kTFlow (IN): text direction and orientation
  343. * plsrunFirst (IN): run pointer for the previous run
  344. * plsrunSecond (IN): run pointer for the current run
  345. * &fInterruptShaping (OUT): do you want to interrupt character shaping between these runs
  346. */
  347. LSERR (WINAPI* pfnGetGlyphs)(POLS, PLSRUN, LPCWSTR, DWORD, LSTFLOW, PGMAP, PGINDEX*, PGPROP*, DWORD*);
  348. /* GetGlyphs:
  349. * pols (IN):
  350. * plsrun (IN): run pointer of the first run
  351. * pwch (IN): pointer to the string of character codes
  352. * cwch (IN): number of characters to be shaped
  353. * kTFlow (IN): text direction and orientation
  354. * rgGmap (OUT): parallel to the char codes mapping wch->glyph info
  355. * &rgGindex (OUT): array of output glyph indices
  356. * &rgGprop (OUT): array of output glyph properties
  357. * &cgindex (OUT): number of output glyph indices
  358. */
  359. LSERR (WINAPI* pfnGetGlyphPositions)(POLS, PLSRUN, LSDEVICE, LPWSTR, PCGMAP, DWORD,
  360. PCGINDEX, PCGPROP, DWORD, LSTFLOW, int*, PGOFFSET);
  361. /* GetGlyphPositions:
  362. * pols (IN):
  363. * plsrun (IN): run pointer of the first run
  364. * lsDeviceID (IN): presentation or reference
  365. * pwch (IN): pointer to the string of character codes
  366. * pgmap (IN): array of wch->glyph mapping
  367. * cwch (IN): number of characters to be shaped
  368. * rgGindex (IN): array of glyph indices
  369. * rgGprop (IN): array of glyph properties
  370. * cgindex (IN): number glyph indices
  371. * kTFlow (IN): text direction and orientation
  372. * rgDu (OUT): array of widths of glyphs
  373. * rgGoffset (OUT): array of offsets of glyphs
  374. */
  375. LSERR (WINAPI* pfnResetRunContents)(POLS, PLSRUN, LSCP, LSDCP, LSCP, LSDCP);
  376. /* ResetRunContents:
  377. * pols (IN):
  378. * plsrun (IN): run pointer as returned from FetchRun
  379. * cpFirstOld (IN): cpFirst before shaping
  380. * dcpOld (IN): dcp before shaping
  381. * cpFirstNew (IN): cpFirst after shaping
  382. * dcpNew (IN): dcp after shaping
  383. */
  384. LSERR (WINAPI* pfnDrawGlyphs)(POLS, PLSRUN, BOOL, BOOL, PCGINDEX, const int*, const int*,
  385. PGOFFSET, PGPROP, PCEXPTYPE, DWORD,
  386. LSTFLOW, UINT, const POINT*, PCHEIGHTS, long, long, const RECT*);
  387. /* DrawGlyphs:
  388. * pols (IN):
  389. * plsrun (IN): run pointer of the first run
  390. * fStrikeout (IN) :
  391. * fUnderline (IN) :
  392. * pglyph (IN): array of glyph indices
  393. * rgDu (IN): array of widths of glyphs
  394. * rgDuBeforeJust (IN): array of widths of glyphs before justification
  395. * rgGoffset (IN): array of offsets of glyphs
  396. * rgGprop (IN): array of glyph properties
  397. * rgExpType (IN): array of glyph expansion types
  398. * cglyph (IN): number glyph indices
  399. * kTFlow (IN): text direction and orientation
  400. * kDisp (IN): display mode - opaque, transparent
  401. * pptRun (IN): starting point of the run
  402. * heightsPres (IN): presentation heights for this run
  403. * dupRun (IN): presentation width for this run
  404. * dupLimUnderline (IN): underlining limit
  405. * pRectClip (IN): clipping rectangle
  406. */
  407. /* Glyph justification */
  408. LSERR (WINAPI* pfnGetGlyphExpansionInfo)(POLS, PLSRUN, LSDEVICE, LPCWSTR, PCGMAP, DWORD,
  409. PCGINDEX, PCGPROP, DWORD, LSTFLOW, BOOL, PEXPTYPE, LSEXPINFO*);
  410. /* GetGlyphExpansionInfo:
  411. * pols (IN):
  412. * plsrun (IN): run pointer of the first run
  413. * lsDeviceID (IN): presentation or reference
  414. * pwch (IN): pointer to the string of character codes
  415. * rggmap (IN): array of wchar->glyph mapping
  416. * cwch (IN): number of characters to be shaped
  417. * rgglyph (IN): array of glyph indices
  418. * rgProp (IN): array of glyph properties
  419. * cglyph (IN): number glyph indices
  420. * kTFlow (IN): text direction and orientation
  421. * fLastTextChunkOnLine (IN): Last text chunk on line?
  422. * rgExpType (OUT): array of glyph expansion types
  423. * rgexpinfo (OUT): array of glyph expansion info
  424. */
  425. LSERR (WINAPI* pfnGetGlyphExpansionInkInfo)(POLS, PLSRUN, LSDEVICE, GINDEX, GPROP, LSTFLOW, DWORD, long*);
  426. /* GetGlyphExpansionInkInfo:
  427. * pols (IN):
  428. * plsrun (IN): run pointer of the first run
  429. * lsDeviceID (IN): presentation or reference
  430. * gindex (IN): glyph index
  431. * gprop (IN): glyph properties
  432. * kTFlow (IN): text direction and orientation
  433. * cAddInkDiscrete (IN): number of discrete values (minus 1, because maximum is already known)
  434. * rgDu (OUT): array of discrete values
  435. */
  436. /* FarEast realted typograpy issues */
  437. LSERR (WINAPI* pfnGetEms)(POLS, PLSRUN, LSTFLOW, PLSEMS);
  438. /* GetEms:
  439. * pols (IN):
  440. * plsrun (IN): run pointer as returned from FetchRun
  441. * kTFlow (IN): text direction and orientation
  442. * &lsems (OUT): different fractions of EM in appropriate pixels
  443. */
  444. LSERR (WINAPI* pfnPunctStartLine)(POLS, PLSRUN, MWCLS, WCHAR, LSACT*);
  445. /* PunctStartLine:
  446. * pols (IN):
  447. * plsrun (IN): run pointer for the char
  448. * mwcls (IN): mod width class for the char
  449. * wch (IN): char
  450. * &lsact (OUT): action on the first char on the line
  451. */
  452. LSERR (WINAPI* pfnModWidthOnRun)(POLS, PLSRUN, WCHAR, PLSRUN, WCHAR,
  453. LSACT*);
  454. /* ModWidthOnRun:
  455. * pols (IN):
  456. * plsrunFirst (IN): run pointer for the first char
  457. * wchFirst (IN): first char
  458. * plsrunSecond (IN): run pointer for the second char
  459. * wchSecond (IN): second char
  460. * &lsact (OUT): action on the last char in 1st run
  461. */
  462. LSERR (WINAPI* pfnModWidthSpace)(POLS, PLSRUN, PLSRUN, WCHAR, PLSRUN, WCHAR,
  463. LSACT*);
  464. /* ModWidthSpace:
  465. * pols (IN):
  466. * plsrunCur (IN): run pointer for the current run
  467. * plsrunPrev (IN): run pointer for the previous char
  468. * wchPrev (IN): previous char
  469. * plsrunNext (IN): run pointer for the next char
  470. * wchNext (IN): next char
  471. * &lsact (OUT): action on space's width
  472. */
  473. LSERR (WINAPI* pfnCompOnRun)(POLS, PLSRUN, WCHAR, PLSRUN, WCHAR,
  474. LSPRACT*);
  475. /* CompOnRun:
  476. * pols (IN):
  477. * plsrunFirst (IN): run pointer for the first char
  478. * wchFirst (IN): first char
  479. * plsrunSecond (IN): run pointer for the second char
  480. * wchSecond (IN): second char
  481. * &lspract (OUT): prioritized action on the last char in 1st run
  482. */
  483. LSERR (WINAPI* pfnCompWidthSpace)(POLS, PLSRUN, PLSRUN, WCHAR, PLSRUN, WCHAR,
  484. LSPRACT*);
  485. /* CompWidthSpace:
  486. * pols (IN):
  487. * plsrunCur (IN): run pointer for the current run
  488. * plsrunPrev (IN): run pointer for the previous char
  489. * wchPrev (IN): previous char
  490. * plsrunNext (IN): run pointer for the next char
  491. * wchNext (IN): next char
  492. * &lspract (OUT): prioritized action on space's width
  493. */
  494. LSERR (WINAPI* pfnExpOnRun)(POLS, PLSRUN, WCHAR, PLSRUN, WCHAR,
  495. LSACT*);
  496. /* ExpOnRun:
  497. * pols (IN):
  498. * plsrunFirst (IN): run pointer for the first char
  499. * wchFirst (IN): first char
  500. * plsrunSecond (IN): run pointer for the second char
  501. * wchSecond (IN): second char
  502. * &lsact (OUT): action on the last run char from 1st run
  503. */
  504. LSERR (WINAPI* pfnExpWidthSpace)(POLS, PLSRUN, PLSRUN, WCHAR, PLSRUN,
  505. WCHAR, LSACT*);
  506. /* ExpWidthSpace:
  507. * pols (IN):
  508. * plsrunCur (IN): run pointer for the current run
  509. * plsrunPrev (IN): run pointer for the previous char
  510. * wchPrev (IN): previous char
  511. * plsrunNext (IN): run pointer for the next char
  512. * wchNext (IN): next char
  513. * &lsact (OUT): action on space's width
  514. */
  515. LSERR (WINAPI* pfnGetModWidthClasses)(POLS, PLSRUN, const WCHAR*, DWORD, MWCLS*);
  516. /* GetModWidthClasses:
  517. * pols (IN):
  518. * plsrun (IN): run pointer for the characters
  519. * rgwch (IN): array of characters
  520. * cwch (IN): number of characters in the rgwch array
  521. * rgmwcls(OUT): array of ModWidthClass's for chars from the rgwch array
  522. */
  523. LSERR (WINAPI* pfnGetBreakingClasses)(POLS, PLSRUN, LSCP, WCHAR, BRKCLS*, BRKCLS*);
  524. /* GetBreakingClasses:
  525. * pols (IN):
  526. * plsrun (IN): run pointer for the char
  527. * cp (IN): cp of the character
  528. * wch (IN): character
  529. * &brkclsFirst (OUT): breaking class for this char as the leading one in a pair
  530. * &brkclsSecond (OUT): breaking class for this char as the following one in a pair
  531. */
  532. LSERR (WINAPI* pfnFTruncateBefore)(POLS, PLSRUN, LSCP, WCHAR, long, PLSRUN, LSCP, WCHAR, long, long, BOOL*);
  533. /* FTruncateBefore:
  534. * pols (IN):
  535. * plsrunCur (IN): plsrun of the current character
  536. * cpCur (IN): cp of truncation char
  537. * wchCur (IN): truncation character
  538. * durCur (IN): width of truncation character
  539. * plsrunPrev (IN): plsrun of the previous character
  540. * cpPrev (IN): cp of the previous character
  541. * wchPrev (IN): previous character
  542. * durPrev (IN): width of truncation character
  543. * durCut (IN): width from the RM until the end of the current character
  544. * &fTruncateBefore (OUT): truncation point is before this character
  545. * (if it exceeds RM)
  546. */
  547. LSERR (WINAPI* pfnCanBreakBeforeChar)(POLS, BRKCLS, BRKCOND*);
  548. /* CanBreakBeforeChar:
  549. * pols (IN):
  550. * brkcls (IN): breaking class for the char as the following one in a pair
  551. * &brktxtBefore (OUT): break condition before the character
  552. */
  553. LSERR (WINAPI* pfnCanBreakAfterChar)(POLS, BRKCLS, BRKCOND*);
  554. /* CanBreakAfterChar:
  555. * pols (IN):
  556. * brkcls (IN): breaking class for the char as the leading one in a pair
  557. * &brktxtAfter (OUT): break text condition after the character
  558. */
  559. LSERR (WINAPI* pfnFHangingPunct)(POLS, PLSRUN, MWCLS, WCHAR, BOOL*);
  560. /* FHangingPunct:
  561. * pols (IN):
  562. * plsrun (IN): run pointer for the char
  563. * mwcls (IN): mod width class of this char
  564. * wch (IN): character
  565. * &fHangingPunct (OUT): can be pushed to the right margin?
  566. */
  567. LSERR (WINAPI* pfnGetSnapGrid)(POLS, WCHAR*, PLSRUN*, LSCP*, DWORD, BOOL*, DWORD*);
  568. /* GetGridInfo:
  569. * pols (IN):
  570. * rgwch (IN): array of characters
  571. * rgplsrun (IN): array of corresponding plsrun's
  572. * rgcp (IN): array of corresponding cp's
  573. * iwch (IN): number of characters
  574. * rgfSnap (OUT): array of fSnap flags for all characters
  575. * pwGridNumber (OUT): number of grid points on the line
  576. */
  577. LSERR (WINAPI* pfnDrawEffects)(POLS, PLSRUN, UINT,
  578. const POINT*, LPCWSTR, const int*, const int*, DWORD,
  579. LSTFLOW, UINT, PCHEIGHTS, long, long, const RECT*);
  580. /* DrawTextRun:
  581. * pols (IN):
  582. * plsrun (IN):
  583. * EffectsFlags (IN): set of client defined special effects bits
  584. * ppt (IN): output location
  585. * lpwchRun (IN): run of characters
  586. * rgDupRun (IN): widths of characters
  587. * rgDupLeftCut (IN): dup cut from the left side of the char
  588. * cwchRun (IN): number of characters in run
  589. * kTFlow (IN): text direction and orientation
  590. * kDisp (IN): display mode - opaque, transparent
  591. * heightsPres (IN): presentation heights for this run
  592. * dupRun (IN): presentation width for this run
  593. * dupLimUnderline (IN): underlining limit
  594. * pRectClip (IN): clipping rectangle
  595. */
  596. LSERR (WINAPI* pfnFCancelHangingPunct)(POLS, LSCP, LSCP, WCHAR, MWCLS, BOOL*);
  597. /* FCancelHangingPunct:
  598. * pols (IN):
  599. * cpLim (IN): cpLim of the line
  600. * cpLastAdjustable (IN): cp of the last adjustable character on the line
  601. * wch (IN): last character
  602. * mwcls (IN): mod width class of this char
  603. * pfCancelHangingPunct (OUT): cancel hanging punctuation?
  604. */
  605. LSERR (WINAPI* pfnModifyCompAtLastChar)(POLS, LSCP, LSCP, WCHAR, MWCLS, long, long, long*);
  606. /* ModifyCompAtLastChar:
  607. * pols (IN):
  608. * cpLim (IN): cpLim of the line
  609. * cpLastAdjustable (IN): cp of the last adjustable character on the line
  610. * wch (IN): last character
  611. * mwcls (IN): mod width class of this char
  612. * durCompLastRight (IN): suggested compression on the right side
  613. * durCompLastLeft (IN): suggested compression on the left side
  614. * pdurCahngeComp (OUT): change compression amount on the last char
  615. */
  616. /* Enumeration callbacks */
  617. LSERR (WINAPI* pfnEnumText)(POLS, PLSRUN, LSCP, LSDCP, LPCWSTR, DWORD, LSTFLOW, BOOL,
  618. BOOL, const POINT*, PCHEIGHTS, long, BOOL, long*);
  619. /* EnumText:
  620. * pols (IN):
  621. * plsrun (IN): from DNODE
  622. * cpFirst (IN): from DNODE
  623. * dcp (IN): from DNODE
  624. * rgwch(IN): array of characters
  625. * cwch(IN): number of characters
  626. * lstflow (IN): text flow
  627. * fReverseOrder (IN): enumerate in reverse order
  628. * fGeometryProvided (IN):
  629. * pptStart (IN): starting position, iff fGeometryProvided
  630. * pheightsPres(IN): from DNODE, relevant iff fGeometryProvided
  631. * dupRun(IN): from DNODE, relevant iff fGeometryProvided
  632. * fCharWidthProvided (IN):
  633. * rgdup(IN): array of character widths, iff fCharWidthProvided
  634. */
  635. LSERR (WINAPI* pfnEnumTab)(POLS, PLSRUN, LSCP, LPCWSTR, WCHAR, LSTFLOW, BOOL,
  636. BOOL, const POINT*, PCHEIGHTS, long);
  637. /* EnumTab:
  638. * pols (IN):
  639. * plsrun (IN): from DNODE
  640. * cpFirst (IN): from DNODE
  641. * rgwch(IN): Pointer to one Tab character
  642. * wchTabLeader (IN): tab leader
  643. * lstflow (IN): text flow
  644. * fReverseOrder (IN): enumerate in reverse order
  645. * fGeometryProvided (IN):
  646. * pptStart (IN): starting position, iff fGeometryProvided
  647. * pheightsPres(IN): from DNODE, relevant iff fGeometryProvided
  648. * dupRun(IN): from DNODE, relevant iff fGeometryProvided
  649. */
  650. LSERR (WINAPI* pfnEnumPen)(POLS, BOOL, LSTFLOW, BOOL, BOOL, const POINT*, long, long);
  651. /* EnumPen:
  652. * pols (IN):
  653. * fBorder (IN):
  654. * lstflow (IN): text flow
  655. * fReverseOrder (IN): enumerate in reverse order
  656. * fGeometryProvided (IN):
  657. * pptStart (IN): starting position, iff fGeometryProvided
  658. * dup(IN): from DNODE iff fGeometryProvided
  659. * dvp(IN): from DNODE iff fGeometryProvided
  660. */
  661. /* Objects bundling */
  662. LSERR (WINAPI* pfnGetObjectHandlerInfo)(POLS, DWORD, void*);
  663. /* GetObjectHandlerInfo:
  664. * pols (IN):
  665. * idObj (IN): id of the object handler
  666. * pObjectInfo (OUT): initialization information of the specified object
  667. */
  668. /* Debugging APIs */
  669. void (WINAPI *pfnAssertFailed)(char*, char*, int);
  670. };
  671. typedef struct lscbk LSCBK;
  672. #endif /* !LSCBK_DEFINED */