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.

90 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. langchx.h
  5. Abstract:
  6. This file defines the Language for Chinese Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _LANG_CHX_H_
  12. #define _LANG_CHX_H_
  13. #include "language.h"
  14. #include "idebug.h"
  15. class CLanguageChinese : public CLanguage
  16. {
  17. public:
  18. /*
  19. * IActiveIME methods.
  20. */
  21. public:
  22. HRESULT Escape(UINT cp, HIMC hIMC, UINT uEscape, LPVOID lpData, LRESULT *plResult)
  23. {
  24. TRACE0("CLanguageChinese::Escape");
  25. return E_NOTIMPL;
  26. }
  27. /*
  28. * Local
  29. */
  30. public:
  31. HRESULT GetProperty(DWORD* property, DWORD* conversion_caps, DWORD* sentence_caps, DWORD* SCSCaps, DWORD* UICaps)
  32. {
  33. *property =
  34. IME_PROP_KBD_CHAR_FIRST | // This bit on indicates the system translates the character
  35. // by keyboard first. This character is passed to IME as aid
  36. // information. No aid information is provided when this bit
  37. // is off.
  38. IME_PROP_UNICODE | // If set, the IME is viewed as a Unicode IME. The system and
  39. // the IME will communicate through the Unicode IME interface.
  40. // If clear, IME will use the ANSI interface to communicate
  41. // with the system.
  42. IME_PROP_AT_CARET | // If set, conversion window is at the caret position.
  43. // If clear, the window is near caret position.
  44. IME_PROP_CANDLIST_START_FROM_1 | // If set, strings in the candidate list are numbered
  45. // starting at 1. If clear, strings start at 0.
  46. IME_PROP_NEED_ALTKEY; // This IME needs the ALT key to be passed to ImmProcessKey.
  47. *conversion_caps =
  48. IME_CMODE_CHINESE | // This bit on indicates IME is in CHINESE(NATIVE) mode. Otherwise, the
  49. // IME is in ALPHANUMERIC mode.
  50. IME_CMODE_FULLSHAPE;
  51. *sentence_caps =
  52. IME_SMODE_PLAURALCLAUSE;
  53. *SCSCaps =
  54. SCS_CAP_COMPSTR | // This IME can generate the composition string by SCS_SETSTR.
  55. SCS_CAP_MAKEREAD | // When calling ImmSetCompositionString with SCS_SETSTR, the IME can
  56. // create the reading of composition string without lpRead. Under IME
  57. // that has this capability, the application does not need to set
  58. // lpRead for SCS_SETSTR.
  59. SCS_CAP_SETRECONVERTSTRING; // This IME can support reconversion. Use ImmSetComposition
  60. // to do reconversion.
  61. *UICaps = UI_CAP_ROT90;
  62. return S_OK;
  63. }
  64. private:
  65. };
  66. #endif // _LANG_CHX_H_