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.

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