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.

96 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. uiwndhd.h
  5. Abstract:
  6. This file defines the IME UI window handler Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _UIWNDHD_H_
  12. #define _UIWNDHD_H_
  13. #include "globals.h"
  14. #include "imtls.h"
  15. extern LPCTSTR IMEUIWndHandlerName;
  16. class CIMEUIWindowHandler
  17. {
  18. public:
  19. CIMEUIWindowHandler(HWND hwnd = NULL);
  20. LRESULT ImeUIWndProcWorker(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL fUnicode = TRUE);
  21. private:
  22. LRESULT UIWndCreateHandler(LPCREATESTRUCT lpcs);
  23. VOID UIWndDestroyHandler();
  24. VOID UIWndFinalDestroyHandler();
  25. LRESULT ImeUINotifyHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
  26. LRESULT ImeUISelectHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
  27. LRESULT ImeUIMsImeHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
  28. LRESULT ImeUIMsImeMouseHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
  29. LRESULT ImeUIMsImeModeBiasHandler(WPARAM wParam, LPARAM lParam);
  30. BOOL IsMsImeMessage(UINT uMsg)
  31. {
  32. if (uMsg == WM_MSIME_SERVICE ||
  33. uMsg == WM_MSIME_UIREADY ||
  34. uMsg == WM_MSIME_RECONVERTREQUEST ||
  35. uMsg == WM_MSIME_RECONVERT ||
  36. uMsg == WM_MSIME_DOCUMENTFEED ||
  37. uMsg == WM_MSIME_QUERYPOSITION ||
  38. uMsg == WM_MSIME_MODEBIAS ||
  39. uMsg == WM_MSIME_SHOWIMEPAD ||
  40. uMsg == WM_MSIME_MOUSE ||
  41. uMsg == WM_MSIME_KEYMAP)
  42. return TRUE;
  43. else
  44. return FALSE;
  45. }
  46. LRESULT ImeUIPrivateHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
  47. BOOL IsPrivateMessage(UINT uMsg)
  48. {
  49. IMTLS *ptls = IMTLS_GetOrAlloc();
  50. if (ptls == NULL)
  51. return FALSE;
  52. if (uMsg == ptls->prvUIWndMsg.uMsgOnLayoutChange ||
  53. uMsg == ptls->prvUIWndMsg.uMsgOnClearDocFeedBuffer)
  54. return TRUE;
  55. else
  56. return FALSE;
  57. }
  58. private:
  59. static BOOL EnumUnSelectCallback(HIMC hIMC, LPARAM lParam);
  60. private:
  61. typedef struct tagUIEXTRA {
  62. HWND hImeUIWnd;
  63. } UIEXTRA;
  64. UIEXTRA m_imeuiextra;
  65. };
  66. CIMEUIWindowHandler* GetImeUIWndHandler(HWND hwnd);
  67. #endif // _UIWNDHD_H_