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.

283 lines
4.9 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. conv.h
  5. Abstract:
  6. This module contains the internal structures and definitions used
  7. by the conversion area.
  8. Author:
  9. KazuM Mar.8,1993
  10. Revision History:
  11. --*/
  12. #ifndef _CONV_H_
  13. #define _CONV_H_
  14. #if defined(FE_IME)
  15. //
  16. // Externs
  17. //
  18. //
  19. // Attributes flags:
  20. //
  21. #define COMMON_LVB_GRID_SINGLEFLAG 0x2000 // DBCS: Grid attribute: use for ime cursor.
  22. /*
  23. * Exported function
  24. */
  25. /*
  26. * Internal function
  27. */
  28. DWORD
  29. NtUserCheckImeHotKey(
  30. UINT uVKey,
  31. LPARAM lParam
  32. );
  33. BOOL
  34. NtUserGetImeHotKey(
  35. IN DWORD dwID,
  36. OUT PUINT puModifiers,
  37. OUT PUINT puVKey,
  38. OUT HKL *phkl);
  39. /*
  40. * Prototype definition
  41. */
  42. VOID
  43. LinkConversionArea(
  44. IN PCONSOLE_INFORMATION Console,
  45. IN PCONVERSIONAREA_INFORMATION ConvAreaInfo
  46. );
  47. NTSTATUS
  48. FreeConvAreaScreenBuffer(
  49. IN PSCREEN_INFORMATION ScreenInfo
  50. );
  51. NTSTATUS
  52. AllocateConversionArea(
  53. IN PCONSOLE_INFORMATION Console,
  54. IN COORD dwScreenBufferSize,
  55. OUT PCONVERSIONAREA_INFORMATION *ConvAreaInfo
  56. );
  57. NTSTATUS
  58. SetUpConversionArea(
  59. IN PCONSOLE_INFORMATION Console,
  60. IN COORD coordCaBuffer,
  61. IN SMALL_RECT rcViewCaWindow,
  62. IN COORD coordConView,
  63. IN DWORD dwOption,
  64. OUT PCONVERSIONAREA_INFORMATION *ConvAreaInfo
  65. );
  66. VOID
  67. WriteConvRegionToScreen(
  68. IN PSCREEN_INFORMATION ScreenInfo,
  69. IN PCONVERSIONAREA_INFORMATION ConvAreaInfo,
  70. IN PSMALL_RECT ClippedRegion
  71. );
  72. BOOL
  73. ConsoleImeBottomLineUse(
  74. IN PSCREEN_INFORMATION ScreenInfo,
  75. IN SHORT ScrollOffset
  76. );
  77. VOID
  78. ConsoleImeBottomLineInUse(
  79. IN PSCREEN_INFORMATION ScreenInfo
  80. );
  81. NTSTATUS
  82. CreateConvAreaUndetermine(
  83. PCONSOLE_INFORMATION Console
  84. );
  85. NTSTATUS
  86. CreateConvAreaModeSystem(
  87. PCONSOLE_INFORMATION Console
  88. );
  89. NTSTATUS
  90. WriteUndetermineChars(
  91. PCONSOLE_INFORMATION Console,
  92. LPWSTR lpString,
  93. PBYTE lpAtr,
  94. PWORD lpAtrIdx,
  95. DWORD NumChars
  96. );
  97. NTSTATUS
  98. FillUndetermineChars(
  99. PCONSOLE_INFORMATION Console,
  100. PCONVERSIONAREA_INFORMATION ConvAreaInfo
  101. );
  102. NTSTATUS
  103. ConsoleImeCompStr(
  104. IN PCONSOLE_INFORMATION Console,
  105. IN LPCONIME_UICOMPMESSAGE CompStr
  106. );
  107. NTSTATUS
  108. ConsoleImeResizeModeSystemView(
  109. PCONSOLE_INFORMATION Console,
  110. SMALL_RECT WindowRect
  111. );
  112. NTSTATUS
  113. ConsoleImeResizeCompStrView(
  114. PCONSOLE_INFORMATION Console,
  115. SMALL_RECT WindowRect
  116. );
  117. NTSTATUS
  118. ConsoleImeResizeModeSystemScreenBuffer(
  119. PCONSOLE_INFORMATION Console,
  120. COORD NewScreenSize
  121. );
  122. NTSTATUS
  123. ConsoleImeResizeCompStrScreenBuffer(
  124. PCONSOLE_INFORMATION Console,
  125. COORD NewScreenSize
  126. );
  127. SHORT
  128. CalcWideCharToColumn(
  129. IN PCONSOLE_INFORMATION Console,
  130. IN PCHAR_INFO Buffer,
  131. IN DWORD NumberOfChars
  132. );
  133. LONG
  134. ConsoleImePaint(
  135. IN PCONSOLE_INFORMATION Console,
  136. IN PCONVERSIONAREA_INFORMATION ConvAreaInfo
  137. );
  138. VOID
  139. ConsoleImeViewInfo(
  140. IN PCONSOLE_INFORMATION Console,
  141. IN PCONVERSIONAREA_INFORMATION ConvAreaInfo,
  142. IN COORD coordConView
  143. );
  144. VOID
  145. ConsoleImeWindowInfo(
  146. IN PCONSOLE_INFORMATION Console,
  147. IN PCONVERSIONAREA_INFORMATION ConvAreaInfo,
  148. IN SMALL_RECT rcViewCaWindow
  149. );
  150. NTSTATUS
  151. ConsoleImeResizeScreenBuffer(
  152. IN PSCREEN_INFORMATION ScreenInfo,
  153. IN COORD NewScreenSize,
  154. PCONVERSIONAREA_INFORMATION ConvAreaInfo
  155. );
  156. NTSTATUS
  157. ConsoleImeWriteOutput(
  158. IN PCONSOLE_INFORMATION Console,
  159. IN PCONVERSIONAREA_INFORMATION ConvAreaInfo,
  160. IN PCHAR_INFO Buffer,
  161. IN SMALL_RECT CharRegion,
  162. IN BOOL fUnicode
  163. );
  164. NTSTATUS
  165. ImeControl(
  166. IN PCONSOLE_INFORMATION Console,
  167. IN HWND hWndConsoleIME,
  168. IN PCOPYDATASTRUCT lParam
  169. ) ;
  170. BOOL
  171. InsertConverTedString(
  172. IN PCONSOLE_INFORMATION Console,
  173. LPWSTR lpStr
  174. ) ;
  175. VOID
  176. SetUndetermineAttribute(
  177. IN PCONSOLE_INFORMATION Console
  178. ) ;
  179. VOID
  180. StreamWriteToScreenBufferIME(
  181. IN PWCHAR String,
  182. IN SHORT StringLength,
  183. IN PSCREEN_INFORMATION ScreenInfo,
  184. IN PCHAR StringA
  185. ) ;
  186. //
  187. // windows\imm\server\hotkey.c
  188. //
  189. DWORD
  190. CheckImeHotKey(
  191. UINT uVKey, // virtual key
  192. LPARAM lParam // lparam of WM_KEYxxx message
  193. ) ;
  194. //
  195. // output.c (for use convarea.c\StreamWriteToScreenBufferIME() )
  196. //
  197. NTSTATUS
  198. MergeAttrStrings(
  199. IN PATTR_PAIR Source,
  200. IN WORD SourceLength,
  201. IN PATTR_PAIR Merge,
  202. IN WORD MergeLength,
  203. OUT PATTR_PAIR *Target,
  204. OUT LPWORD TargetLength,
  205. IN SHORT StartIndex,
  206. IN SHORT EndIndex,
  207. IN PROW Row,
  208. IN PSCREEN_INFORMATION ScreenInfo
  209. ) ;
  210. VOID
  211. ResetTextFlags(
  212. IN PSCREEN_INFORMATION ScreenInfo,
  213. IN SHORT StartX,
  214. IN SHORT StartY,
  215. IN SHORT EndX,
  216. IN SHORT EndY
  217. ) ;
  218. #endif // FE_IME
  219. #endif // _CONV_H_