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.6 KiB

  1. /****************************************************************************
  2. IMMSYS.H
  3. Owner: cslim
  4. Copyright (c) 1997-1999 Microsoft Corporation
  5. Load/Unload IMM Apis dynamically not link with imm32.lib
  6. Inlcude Immdev.h and Indicml.h
  7. History:
  8. 14-JUL-1999 cslim Copied from IME98 source tree
  9. *****************************************************************************/
  10. #if !defined (_IMMSYS_H__INCLUDED_)
  11. #define _IMMSYS_H__INCLUDED_
  12. #ifndef UNDER_CE
  13. // include Win32 immdev.h (copied from nt\public\oak\inc\immdev.h)
  14. #include "immdev.h"
  15. // include indicator Service Manager definitions
  16. #include "indicml.h"
  17. // IMM.DLL Load/Unload functions
  18. BOOL StartIMM();
  19. VOID EndIMM();
  20. // Internal IMM functions
  21. BOOL OurImmSetOpenStatus(HIMC hIMC, BOOL fOpen);
  22. BOOL OurImmGetOpenStatus(HIMC hIMC);
  23. HIMC OurImmGetContext(HWND hWnd);
  24. BOOL OurImmGetConversionStatus(HIMC hIMC, LPDWORD pdwConv, LPDWORD pdwSent);
  25. BOOL OurImmSetConversionStatus(HIMC hIMC, DWORD dwConv, DWORD dwSent);
  26. BOOL OurImmSetStatusWindowPos(HIMC hIMC, LPPOINT pPt);
  27. BOOL OurImmConfigureIME(HKL hKL, HWND hWnd, DWORD dw, LPVOID pv);
  28. LRESULT OurImmEscapeA(HKL hKL, HIMC hIMC, UINT ui, LPVOID pv);
  29. BOOL OurImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue);
  30. LPVOID OurImmLockIMCC(HIMCC hIMCC);
  31. HIMCC OurImmReSizeIMCC(HIMCC hIMCC, DWORD dw);
  32. BOOL OurImmUnlockIMCC(HIMCC hIMCC);
  33. DWORD OurImmGetIMCCSize(HIMCC hIMCC);
  34. BOOL OurImmGenerateMessage(HIMC hIMC);
  35. LPINPUTCONTEXT OurImmLockIMC(HIMC hIMC);
  36. BOOL OurImmUnlockIMC(HIMC hIMC);
  37. //LRESULT OurImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM lParam);
  38. HWND OurImmGetDefaultIMEWnd(HWND);
  39. UINT OurImmGetIMEFileNameA(HKL, LPSTR, UINT uBufLen);
  40. BOOL OurImmIsIME(HKL hKL);
  41. #else
  42. ///////////////////////////////////////////////////////////////////////////////
  43. // !!! START OF WINCE !!!
  44. #ifndef _IMM_CE
  45. #define _IMM_CE
  46. #include <imm.h>
  47. #include <stub_ce.h> // Windows CE Stub for unsupported APIs / kill other define
  48. // the data structure used for WM_SYSCOPYDATA message
  49. typedef struct tagLMDATA
  50. {
  51. DWORD dwVersion;
  52. DWORD flags;
  53. DWORD cnt;
  54. DWORD dwOffsetSymbols;
  55. DWORD dwOffsetSkip;
  56. DWORD dwOffsetScore;
  57. BYTE ab[1];
  58. } LMDATA, *PLMDATA;
  59. // flags in LMDATA
  60. #define LMDATA_SYMBOL_BYTE 0x00000001
  61. #define LMDATA_SYMBOL_WORD 0x00000002
  62. #define LMDATA_SYMBOL_DWORD 0x00000004
  63. #define LMDATA_SYMBOL_QWORD 0x00000008
  64. #define LMDATA_SKIP_BYTE 0x00000010
  65. #define LMDATA_SKIP_WORD 0x00000020
  66. #define LMDATA_SCORE_BYTE 0x00000040
  67. #define LMDATA_SCORE_WORD 0x00000080
  68. #define LMDATA_SCORE_DWORD 0x00000100
  69. #define LMDATA_SCORE_QWORD 0x00000200
  70. #define LMDATA_SCORE_FLOAT 0x00000400
  71. #define LMDATA_SCORE_DOUBLE 0x00000800
  72. // wParam of report message WM_IME_REQUEST
  73. #define IMR_COMPOSITIONWINDOW 0x0001
  74. #define IMR_CANDIDATEWINDOW 0x0002
  75. #define IMR_COMPOSITIONFONT 0x0003
  76. #define IMR_RECONVERTSTRING 0x0004
  77. #define IMR_CONFIRMRECONVERTSTRING 0x0005
  78. #define IMR_QUERYPOSITION 0x0006
  79. #define IMR_DOCUMENTFEED 0x0007
  80. typedef struct tagIMEPOSITION {
  81. DWORD dwSize;
  82. DWORD dwCharPos;
  83. POINT pt;
  84. UINT cLineHeight;
  85. RECT rcDocument;
  86. } IMEPOSITION, *PIMEPOSITION, NEAR *NPIMEPOSITION, FAR *LPIMEPOSITION;
  87. #define IME_SMODE_CONVERSATION 0x0010
  88. #define NI_IMEMENUSELECTED 0x0018
  89. #define IME_ESC_GETHELPFILENAME 0x100b
  90. #ifdef IMFS_GRAYED
  91. #undef IMFS_GRAYED
  92. #endif
  93. #define IMFS_GRAYED MF_GRAYED
  94. #define IME_CONFIG_DICTIONARYEDIT 20
  95. // ID for dwIndex of GUIDELINE Structure
  96. #define GL_ID_TOOMANYRECONV 0x00008001
  97. #define IMNPRIVATESIGN (0x98A)
  98. typedef struct tagIMNPRIVATE {
  99. UINT uSign; // magic ID : IME98=98
  100. UINT uId; // private id
  101. LPARAM lParam; // lParam
  102. } IMNPRIVATE, * PIMNPRIVATE;
  103. /**********************************************************************/
  104. /* INDICML.H - Indicator Service Manager definitions */
  105. /* */
  106. /* Copyright (c) 1993-1997 Microsoft Corporation */
  107. /**********************************************************************/
  108. #ifndef _INDICML_
  109. #define _INDICML_ // defined if INDICML.H has been included
  110. #ifdef __cplusplus
  111. extern "C" {
  112. #endif
  113. //---------------------------------------------------------------------
  114. //
  115. // The messages for Indicator Window.
  116. //
  117. //---------------------------------------------------------------------
  118. #define INDICM_SETIMEICON (WM_USER+100)
  119. #define INDICM_SETIMETOOLTIPS (WM_USER+101)
  120. //---------------------------------------------------------------------
  121. //
  122. // INDICATOR_WND will be used by the IME to find indicator window.
  123. // IME should call FindWindow(INDICATOR_WND) to get it.
  124. //
  125. //---------------------------------------------------------------------
  126. #ifdef _WIN32
  127. #define INDICATOR_CLASSW L"Indicator"
  128. #define INDICATOR_CLASSA "Indicator"
  129. #ifdef UNICODE
  130. #define INDICATOR_CLASS INDICATOR_CLASSW
  131. #else
  132. #define INDICATOR_CLASS INDICATOR_CLASSA
  133. #endif
  134. #else
  135. #define INDICATOR_CLASS "Indicator"
  136. #endif
  137. #define INDICM_REMOVEDEFAULTMENUITEMS (WM_USER+102)
  138. #define RDMI_LEFT 0x0001
  139. #define RDMI_RIGHT 0x0002
  140. #ifdef __cplusplus
  141. }
  142. #endif
  143. #endif // _INDICML_
  144. //
  145. // NT5 enhanvce
  146. //
  147. #ifndef VK_PACKET
  148. #define IME_PROP_ACCEPT_WIDE_VKEY 0x20
  149. #define VK_PACKET 0xe7
  150. #endif // VK_PACKET
  151. // Just maps private IMM functions into originals
  152. #define OurImmSetOpenStatus ImmSetOpenStatus
  153. #define OurImmGetOpenStatus ImmGetOpenStatus
  154. #define OurImmGetContext ImmGetContext
  155. #define OurImmGetConversionStatus ImmGetConversionStatus
  156. #define OurImmSetConversionStatus ImmSetConversionStatus
  157. #define OurImmSetStatusWindowPos ImmSetStatusWindowPos
  158. #define OurImmConfigureIME ImmConfigureIMEW
  159. #define OurImmEscapeA ImmEscapeW
  160. #define OurImmNotifyIME ImmNotifyIME
  161. #define OurImmLockIMCC ImmLockIMCC
  162. #define OurImmReSizeIMCC ImmReSizeIMCC
  163. #define OurImmUnlockIMCC ImmUnlockIMCC
  164. #define OurImmGetIMCCSize ImmGetIMCCSize
  165. #define OurImmGenerateMessage ImmGenerateMessage
  166. #define OurImmLockIMC ImmLockIMC
  167. #define OurImmUnlockIMC ImmUnlockIMC
  168. #define OurImmGetDefaultIMEWnd ImmGetDefaultIMEWnd
  169. //#define OurImmRequestMessageW ImmRequestMessageW
  170. #endif // _IMM_CE
  171. // !!! END OF WINCE !!!
  172. ///////////////////////////////////////////////////////////////////////////////
  173. #endif // UNDER_CE
  174. #endif // _IMMSYS_H__INCLUDED_