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.

99 lines
3.1 KiB

  1. /****************************************************************************
  2. IMEDEFS.CPP
  3. Owner: cslim
  4. Copyright (c) 1997-1999 Microsoft Corporation
  5. Structure and const Definition for various functions
  6. History:
  7. 14-JUL-1999 cslim Copied from IME98 source tree
  8. *****************************************************************************/
  9. #if !defined (_IMEDEFS_H__INCLUDED_)
  10. #define _IMEDEFS_H__INCLUDED_
  11. #include "hauto.h"
  12. #include "debug.h"
  13. #include "ui.h"
  14. ///////////////////////////////////////////////////////////////////////////////
  15. #define IME_AUTOMATA 0x30
  16. #define IME_HANJAMODE 0x31
  17. ///////////////////////////////////////////////////////////////////////////////
  18. // Configuration const related to registry values
  19. //
  20. #define MAX_NAME_LENGTH 32
  21. #define CAND_PER_PAGE 9 // Candidate per page
  22. ///////////////////////////////////////////////////////////////////////////////
  23. // Max number of hangul composition chars
  24. const WORD nMaxCompStrLen = 1;
  25. const WORD nMaxResultStrLen = 2; // #59, #78 Max result str can be 2 char
  26. // Hangul+Alphanumeric
  27. ///////////////////////////////////////////////////////////////////////////////
  28. // window extra for UI windows
  29. #define UI_MOVE_OFFSET 0
  30. #define UI_MOVE_XY 4
  31. // if UI_MOVE_OFFSET == WINDOW_NOT_DRAG, not in drag operation
  32. #define WINDOW_NOT_DRAG -1
  33. ///////////////////////////////////////////////////////////////////////////////
  34. // IME Message processing status bits
  35. ///////////////////////////////////////////////////////////////////////////////
  36. #define ISC_OPEN_STATUS_WINDOW 0x04000000
  37. #define ISC_SHOW_UI_ALL (ISC_SHOWUIALL| /*ISC_SHOW_SOFTKBD|*/ISC_OPEN_STATUS_WINDOW)
  38. #define ISC_SETCONTEXT_UI (ISC_SHOWUIALL /*|ISC_SHOW_SOFTKBD*/)
  39. #if !defined(_WIN64)
  40. #define MAX_NUM_OF_STATUS_BUTTONS 4
  41. #else
  42. #define MAX_NUM_OF_STATUS_BUTTONS 3
  43. #endif
  44. #define NUM_OF_BUTTON_SIZE 3
  45. class CToolBar;
  46. // IME private UI data
  47. typedef struct tagUIPRIV
  48. {
  49. HWND hCompWnd; // composition window
  50. INT nShowCompCmd;
  51. // Status Window
  52. HWND hStatusWnd;
  53. INT nShowStatusCmd;
  54. HWND hStatusTTWnd;
  55. LPARAM uiShowParam;
  56. // Candidate window
  57. HWND hCandWnd;
  58. INT nShowCandCmd;
  59. HWND hCandTTWnd;
  60. // Cicero Toolbar object
  61. CToolBar *m_pCicToolbar;
  62. } UIPRIV;
  63. typedef UIPRIV *PUIPRIV;
  64. typedef UIPRIV *LPUIPRIV;
  65. ///////////////////////////////////////////////////////////////////////////////
  66. #if 1 // MultiMonitor support
  67. typedef HMONITOR (WINAPI *LPFNMONITORFROMWINDOW)(HWND, DWORD);
  68. typedef HMONITOR (WINAPI *LPFNMONITORFROMPOINT)(POINT, DWORD);
  69. typedef HMONITOR (WINAPI *LPFNMONITORFROMRECT)(LPRECT, DWORD);
  70. typedef BOOL (WINAPI *LPFNGETMONITORINFO)(HMONITOR, LPMONITORINFO);
  71. // definition in init.cpp
  72. extern LPFNMONITORFROMWINDOW g_pfnMonitorFromWindow;
  73. extern LPFNMONITORFROMPOINT g_pfnMonitorFromPoint;
  74. extern LPFNMONITORFROMRECT g_pfnMonitorFromRect;
  75. extern LPFNGETMONITORINFO g_pfnGetMonitorInfo;
  76. #endif
  77. #endif // !defined (_IMEDEFS_H__INCLUDED_)