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.

212 lines
6.8 KiB

  1. /* LSSUBSET.C */
  2. #include "lssubset.h"
  3. #include "lsidefs.h"
  4. #include "lssubl.h"
  5. #include "sublutil.h"
  6. /* L S S B G E T O B J D I M S U B L I N E*/
  7. /*----------------------------------------------------------------------------
  8. %%Function: LssbGetObjDimSubline
  9. %%Contact: igorzv
  10. Parameters:
  11. plssubl - (IN) ptr to subline context
  12. plstflow - (OUT) subline's lstflow
  13. pobjdim - (OUT) dimensions of subline
  14. ----------------------------------------------------------------------------*/
  15. LSERR WINAPI LssbGetObjDimSubline(PLSSUBL plssubl, LSTFLOW* plstflow, POBJDIM pobjdim)
  16. {
  17. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  18. if (plstflow == NULL) return lserrInvalidParameter;
  19. if (pobjdim == NULL) return lserrInvalidParameter;
  20. *plstflow = plssubl->lstflow;
  21. return GetObjDimSublineCore(plssubl, pobjdim);
  22. }
  23. /* L S S B G E T D U P S U B L I N E*/
  24. /*----------------------------------------------------------------------------
  25. %%Function: LssbGetDupSubline
  26. %%Contact: igorzv
  27. Parameters:
  28. plssubl - (IN) ptr to subline context
  29. plstflow - (OUT) subline's lstflow
  30. pdup - (OUT) width of subline
  31. ----------------------------------------------------------------------------*/
  32. LSERR WINAPI LssbGetDupSubline(PLSSUBL plssubl, LSTFLOW* plstflow, long* pdup)
  33. {
  34. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  35. if (plstflow == NULL) return lserrInvalidParameter;
  36. if (pdup == NULL) return lserrInvalidParameter;
  37. *plstflow = plssubl->lstflow;
  38. return GetDupSublineCore(plssubl, pdup);
  39. }
  40. /* L S S B F D O N E P R E S S U B L I N E*/
  41. /*----------------------------------------------------------------------------
  42. %%Function: LssbFDonePresSubline
  43. %%Contact: igorzv
  44. Parameters:
  45. plssubl - (IN) ptr to subline context
  46. pfDonePresSubline - (OUT) is presentation coordinates are already calculated
  47. ----------------------------------------------------------------------------*/
  48. LSERR WINAPI LssbFDonePresSubline(PLSSUBL plssubl, BOOL* pfDonePresSubline)
  49. {
  50. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  51. if (pfDonePresSubline == NULL) return lserrInvalidParameter;
  52. *pfDonePresSubline = !plssubl->fDupInvalid;
  53. return lserrNone;
  54. }
  55. /* L S S B F D O N E D I S P L A Y*/
  56. /*----------------------------------------------------------------------------
  57. %%Function: LssbFDoneDisplay
  58. %%Contact: igorzv
  59. Parameters:
  60. plssubl - (IN) ptr to subline context
  61. pfDonePresSubline - (OUT) is subline has been accepted for display with
  62. upper subline
  63. ----------------------------------------------------------------------------*/
  64. LSERR WINAPI LssbFDoneDisplay(PLSSUBL plssubl, BOOL* pfDoneDisplay)
  65. {
  66. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  67. if (pfDoneDisplay == NULL) return lserrInvalidParameter;
  68. *pfDoneDisplay = plssubl->fAcceptedForDisplay;
  69. return lserrNone;
  70. }
  71. /* L S S B G E T P L S R U N S F R O M S U B L I N E*/
  72. /*----------------------------------------------------------------------------
  73. %%Function: LssbGetPlsrunsFromSubline
  74. %%Contact: igorzv
  75. Parameters:
  76. plssubl - (IN) ptr to subline context
  77. cDnodes - (IN) number of dnodes in subline
  78. rgplsrun - (OUT) array of plsrun's
  79. ----------------------------------------------------------------------------*/
  80. LSERR WINAPI LssbGetPlsrunsFromSubline(PLSSUBL plssubl, DWORD cDnodes, PLSRUN* rgplsrun)
  81. {
  82. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  83. if (rgplsrun == NULL) return lserrInvalidParameter;
  84. return GetPlsrunFromSublineCore(plssubl, cDnodes, rgplsrun);
  85. }
  86. /* L S S B G E T N U M B E R D N O D E S I N S U B L I N E*/
  87. /*----------------------------------------------------------------------------
  88. %%Function: LssbGetNumberDnodesInSubline
  89. %%Contact: igorzv
  90. Parameters:
  91. plssubl - (IN) ptr to subline context
  92. pcDnodes - (OUT) number of dnodes in subline
  93. ----------------------------------------------------------------------------*/
  94. LSERR WINAPI LssbGetNumberDnodesInSubline(PLSSUBL plssubl, DWORD* pcDnodes)
  95. {
  96. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  97. if (pcDnodes == NULL) return lserrInvalidParameter;
  98. return GetNumberDnodesCore(plssubl, pcDnodes);
  99. }
  100. /* L S S B G E T V I S I B L E D C P I N S U B L I N E*/
  101. /*----------------------------------------------------------------------------
  102. %%Function: LssbGetVisibleDcpInSubline
  103. %%Contact: igorzv
  104. Parameters:
  105. plssubl - (IN) ptr to subline context
  106. pdcp - (OUT) number of characters
  107. ----------------------------------------------------------------------------*/
  108. LSERR WINAPI LssbGetVisibleDcpInSubline(PLSSUBL plssubl, LSDCP* pdcp)
  109. {
  110. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  111. if (pdcp == NULL) return lserrInvalidParameter;
  112. return GetVisibleDcpInSublineCore(plssubl, pdcp);
  113. }
  114. /* L S S B G E T G E T D U R T R A I L I N S U B L I N E*/
  115. /*----------------------------------------------------------------------------
  116. %%Function: LssbGetDurTrailInSubline
  117. %%Contact: igorzv
  118. Parameters:
  119. plssubl - (IN) ptr to subline context
  120. pdurTrail - (OUT) width of trailing area in subline
  121. ----------------------------------------------------------------------------*/
  122. LSERR WINAPI LssbGetDurTrailInSubline(PLSSUBL plssubl, long* pdurTrail)
  123. {
  124. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  125. if (pdurTrail == NULL) return lserrInvalidParameter;
  126. return GetDurTrailInSubline(plssubl, pdurTrail);
  127. }
  128. /* L S S B G E T G E T D U R T R A I L W I T H P E N S I N S U B L I N E*/
  129. /*----------------------------------------------------------------------------
  130. %%Function: LssbGetDurTrailWithPensInSubline
  131. %%Contact: igorzv
  132. Parameters:
  133. plssubl - (IN) ptr to subline context
  134. pdurTrail - (OUT) width of trailing area in subline
  135. ----------------------------------------------------------------------------*/
  136. LSERR WINAPI LssbGetDurTrailWithPensInSubline(PLSSUBL plssubl, long* pdurTrail)
  137. {
  138. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  139. if (pdurTrail == NULL) return lserrInvalidParameter;
  140. return GetDurTrailWithPensInSubline(plssubl, pdurTrail);
  141. }
  142. /* L S S B F I S S U B L I N E E M P T Y*/
  143. /*----------------------------------------------------------------------------
  144. %%Function: LssbFIsSublineEmpty
  145. %%Contact: igorzv
  146. Parameters:
  147. plssubl - (IN) ptr to subline context
  148. pfEmpty - (OUT) is this subline empty
  149. ----------------------------------------------------------------------------*/
  150. LSERR WINAPI LssbFIsSublineEmpty(PLSSUBL plssubl, BOOL* pfEmpty)
  151. {
  152. if (!FIsLSSUBL(plssubl)) return lserrInvalidParameter;
  153. if (pfEmpty == NULL) return lserrInvalidParameter;
  154. return FIsSublineEmpty(plssubl, pfEmpty);
  155. }