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.

206 lines
7.5 KiB

  1. /* Common definitions for line services
  2. */
  3. #ifndef LSDEFS_DEFINED
  4. #define LSDEFS_DEFINED
  5. #ifdef UNIX
  6. #include <wchar.h>
  7. #endif
  8. #if defined(_NO_WINDOWS)
  9. /* <windows.h> must be included FIRST, if at all. */
  10. /* We define basic types if <windows.h> is not included. */
  11. #ifndef NULL
  12. #define NULL ((void *)0)
  13. #endif /* NULL */
  14. #define WINAPI __stdcall
  15. #define FALSE 0
  16. #define TRUE 1
  17. typedef int BOOL;
  18. typedef long LONG;
  19. typedef unsigned long DWORD;
  20. typedef unsigned short WORD;
  21. typedef unsigned int UINT;
  22. typedef unsigned char BYTE;
  23. typedef int INT;
  24. #ifdef UNIX
  25. typedef wchar_t WCHAR;
  26. #else
  27. typedef WORD WCHAR;
  28. #endif
  29. typedef const WCHAR* LPCWSTR;
  30. typedef WCHAR* LPWSTR;
  31. typedef struct tagRECT
  32. {
  33. LONG left;
  34. LONG top;
  35. LONG right;
  36. LONG bottom;
  37. } RECT;
  38. typedef struct tagPOINT
  39. {
  40. LONG x;
  41. LONG y;
  42. } POINT;
  43. #endif /* WINVER */
  44. /* Line services definitions */
  45. struct lscontext; /* Opaque to clients */
  46. typedef struct lscontext* PLSC;
  47. typedef const struct lscontext* PCLSC;
  48. struct ols; /* Owner of LineServices */
  49. typedef struct ols* POLS; /* (Opaque to LineService) */
  50. typedef long LSCP;
  51. typedef DWORD LSDCP;
  52. typedef WORD GINDEX;
  53. typedef GINDEX* PGINDEX;
  54. typedef const GINDEX* PCGINDEX;
  55. typedef struct tagPOINTUV
  56. {
  57. LONG u;
  58. LONG v;
  59. } POINTUV;
  60. typedef POINTUV* PPOINTUV;
  61. typedef const POINTUV* PCPOINTUV;
  62. typedef struct tagGOFFSET
  63. {
  64. LONG du;
  65. LONG dv;
  66. } GOFFSET;
  67. typedef GOFFSET* PGOFFSET;
  68. typedef const GOFFSET* PCGOFFSET;
  69. /* Line services error codes */
  70. typedef long LSERR;
  71. #define lserrNone ( 0L)
  72. #ifdef LSERRSTOP /* stop immediately, don't return error */
  73. #define lserrInvalidParameter AssertErr("lserrInvalidParameter")
  74. #define lserrOutOfMemory AssertErr("lserrOutOfMemory")
  75. #define lserrNullOutputParameter AssertErr("lserrNullOutputParameter")
  76. #define lserrInvalidContext AssertErr("lserrInvalidContext")
  77. #define lserrInvalidLine AssertErr("lserrInvalidLine")
  78. #define lserrInvalidDnode AssertErr("lserrInvalidDnode")
  79. #define lserrInvalidDeviceResolution AssertErr("lserrInvalidDeviceResolution")
  80. #define lserrInvalidRun AssertErr("lserrInvalidRun")
  81. #define lserrMismatchLineContext AssertErr("lserrMismatchLineContext")
  82. #define lserrContextInUse AssertErr("lserrContextInUse")
  83. #define lserrDuplicateSpecialCharacter AssertErr("lserrDuplicateSpecialCharacter")
  84. #define lserrInvalidAutonumRun AssertErr("lserrInvalidAutonumRun")
  85. #define lserrFormattingFunctionDisabled AssertErr("lserrFormattingFunctionDisabled")
  86. #define lserrUnfinishedDnode AssertErr("lserrUnfinishedDnode")
  87. #define lserrInvalidDnodeType AssertErr("lserrInvalidDnodeType")
  88. #define lserrInvalidPenDnode AssertErr("lserrInvalidPenDnode")
  89. #define lserrInvalidNonPenDnode AssertErr("lserrInvalidNonPenDnode")
  90. #define lserrInvalidBaselinePenDnode AssertErr("lserrInvalidBaselinePenDnode")
  91. #define lserrInvalidFormatterResult AssertErr("lserrInvalidFormatterResult")
  92. #define lserrInvalidObjectIdFetched AssertErr("lserrInvalidObjectIdFetched")
  93. #define lserrInvalidDcpFetched AssertErr("lserrInvalidDcpFetched")
  94. #define lserrInvalidCpContentFetched AssertErr("lserrInvalidCpContentFetched")
  95. #define lserrInvalidBookmarkType AssertErr("lserrInvalidBookmarkType")
  96. #define lserrSetDocDisabled AssertErr("lserrSetDocDisabled")
  97. #define lserrFiniFunctionDisabled AssertErr("lserrFiniFunctionDisabled")
  98. #define lserrCurrentDnodeIsNotTab AssertErr("lserrCurrentDnodeIsNotTab")
  99. #define lserrPendingTabIsNotResolved AssertErr("lserrPendingTabIsNotResolved")
  100. #define lserrWrongFiniFunction AssertErr("lserrWrongFiniFunction")
  101. #define lserrInvalidBreakingClass AssertErr("lserrInvalidBreakingClass")
  102. #define lserrBreakingTableNotSet AssertErr("lserrBreakingTableNotSet")
  103. #define lserrInvalidModWidthClass AssertErr("lserrInvalidModWidthClass")
  104. #define lserrModWidthPairsNotSet AssertErr("lserrModWidthPairsNotSet")
  105. #define lserrWrongTruncationPoint AssertErr("lserrWrongTruncationPoint")
  106. #define lserrWrongBreak AssertErr("lserrWrongBreak")
  107. #define lserrDupInvalid AssertErr("lserrDupInvalid")
  108. #define lserrRubyInvalidVersion AssertErr("lserrRubyVersionInvalid")
  109. #define lserrTatenakayokoInvalidVersion AssertErr("lserrTatenakayokoInvalidVersion")
  110. #define lserrWarichuInvalidVersion AssertErr("lserrWarichuInvalidVersion")
  111. #define lserrWarichuInvalidData AssertErr("lserrWarichuInvalidData")
  112. #define lserrCreateSublineDisabled AssertErr("lserrCreateSublineDisabled")
  113. #define lserrCurrentSublineDoesNotExist AssertErr("lserrCurrentSublineDoesNotExist")
  114. #define lserrCpOutsideSubline AssertErr("lserrCpOutsideSubline")
  115. #define lserrHihInvalidVersion AssertErr("lserrHihInvalidVersion")
  116. #define lserrInsufficientQueryDepth AssertErr("lserrInsufficientQueryDepth")
  117. #define lserrInsufficientBreakRecBuffer AssertErr("lserrInsufficientBreakRecBuffer")
  118. #define lserrInvalidBreakRecord AssertErr("lserrInvalidBreakRecord")
  119. #define lserrInvalidPap AssertErr("lserrInvalidPap")
  120. #define lserrContradictoryQueryInput AssertErr("lserrContradictoryQueryInput")
  121. #define lserrLineIsNotActive AssertErr("lserrLineIsNotActive")
  122. #define lserrTooLongParagraph AssertErr("lserrTooLongParagraph")
  123. #else
  124. #define lserrInvalidParameter (-1L)
  125. #define lserrOutOfMemory (-2L)
  126. #define lserrNullOutputParameter (-3L)
  127. #define lserrInvalidContext (-4L)
  128. #define lserrInvalidLine (-5L)
  129. #define lserrInvalidDnode (-6L)
  130. #define lserrInvalidDeviceResolution (-7L)
  131. #define lserrInvalidRun (-8L)
  132. #define lserrMismatchLineContext (-9L)
  133. #define lserrContextInUse (-10L)
  134. #define lserrDuplicateSpecialCharacter (-11L)
  135. #define lserrInvalidAutonumRun (-12L)
  136. #define lserrFormattingFunctionDisabled (-13L)
  137. #define lserrUnfinishedDnode (-14L)
  138. #define lserrInvalidDnodeType (-15L)
  139. #define lserrInvalidPenDnode (-16L)
  140. #define lserrInvalidNonPenDnode (-17L)
  141. #define lserrInvalidBaselinePenDnode (-18L)
  142. #define lserrInvalidFormatterResult (-19L)
  143. #define lserrInvalidObjectIdFetched (-20L)
  144. #define lserrInvalidDcpFetched (-21L)
  145. #define lserrInvalidCpContentFetched (-22L)
  146. #define lserrInvalidBookmarkType (-23L)
  147. #define lserrSetDocDisabled (-24L)
  148. #define lserrFiniFunctionDisabled (-25L)
  149. #define lserrCurrentDnodeIsNotTab (-26L)
  150. #define lserrPendingTabIsNotResolved (-27L)
  151. #define lserrWrongFiniFunction (-28L)
  152. #define lserrInvalidBreakingClass (-29L)
  153. #define lserrBreakingTableNotSet (-30L)
  154. #define lserrInvalidModWidthClass (-31L)
  155. #define lserrModWidthPairsNotSet (-32L)
  156. #define lserrWrongTruncationPoint (-33L)
  157. #define lserrWrongBreak (-34L)
  158. #define lserrDupInvalid (-35L)
  159. #define lserrRubyInvalidVersion (-36L)
  160. #define lserrTatenakayokoInvalidVersion (-37L)
  161. #define lserrWarichuInvalidVersion (-38L)
  162. #define lserrWarichuInvalidData (-39L)
  163. #define lserrCreateSublineDisabled (-40L)
  164. #define lserrCurrentSublineDoesNotExist (-41L)
  165. #define lserrCpOutsideSubline (-42L)
  166. #define lserrHihInvalidVersion (-43L)
  167. #define lserrInsufficientQueryDepth (-44L)
  168. #define lserrInsufficientBreakRecBuffer (-45L)
  169. #define lserrInvalidBreakRecord (-46L)
  170. #define lserrInvalidPap (-47L)
  171. #define lserrContradictoryQueryInput (-48L)
  172. #define lserrLineIsNotActive (-49L)
  173. #define lserrTooLongParagraph (-50L)
  174. #endif /* LSERRORSTOP */
  175. #ifndef fTrue
  176. #define fTrue 1
  177. #define fFalse 0
  178. #endif
  179. #define uLsInfiniteRM 0x3FFFFFFF
  180. #define czaUnitInch (1440L) /* 1440 absolute units per inch */
  181. #endif /* LSDEFS_DEFINED */