OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_IME_INPUT_METHOD_WIN_H_ | 5 #ifndef VIEWS_IME_INPUT_METHOD_WIN_H_ |
6 #define VIEWS_IME_INPUT_METHOD_WIN_H_ | 6 #define VIEWS_IME_INPUT_METHOD_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "ui/base/win/ime_input.h" | 15 #include "ui/base/win/ime_input.h" |
16 #include "views/ime/input_method_base.h" | 16 #include "views/ime/input_method_base.h" |
17 #include "views/view.h" | 17 #include "views/view.h" |
18 #include "views/widget/widget.h" | 18 #include "views/widget/widget.h" |
19 | 19 |
| 20 namespace ui { |
| 21 class Range; |
| 22 }; |
| 23 |
20 namespace views { | 24 namespace views { |
21 | 25 |
22 // An InputMethod implementation based on Windows IMM32 API. | 26 // An InputMethod implementation based on Windows IMM32 API. |
23 class InputMethodWin : public InputMethodBase { | 27 class InputMethodWin : public InputMethodBase { |
24 public: | 28 public: |
25 explicit InputMethodWin(internal::InputMethodDelegate* delegate); | 29 explicit InputMethodWin(internal::InputMethodDelegate* delegate); |
26 virtual ~InputMethodWin(); | 30 virtual ~InputMethodWin(); |
27 | 31 |
28 // Overridden from InputMethod: | 32 // Overridden from InputMethod: |
29 virtual void Init(Widget* widget) OVERRIDE; | 33 virtual void Init(Widget* widget) OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... |
47 | 51 |
48 private: | 52 private: |
49 LRESULT OnImeSetContext( | 53 LRESULT OnImeSetContext( |
50 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); | 54 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
51 LRESULT OnImeStartComposition( | 55 LRESULT OnImeStartComposition( |
52 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); | 56 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
53 LRESULT OnImeComposition( | 57 LRESULT OnImeComposition( |
54 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); | 58 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
55 LRESULT OnImeEndComposition( | 59 LRESULT OnImeEndComposition( |
56 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); | 60 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
| 61 LRESULT OnImeRequest( |
| 62 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
57 // For both WM_CHAR and WM_SYSCHAR | 63 // For both WM_CHAR and WM_SYSCHAR |
58 LRESULT OnChar( | 64 LRESULT OnChar( |
59 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); | 65 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
60 // For both WM_DEADCHAR and WM_SYSDEADCHAR | 66 // For both WM_DEADCHAR and WM_SYSDEADCHAR |
61 LRESULT OnDeadChar( | 67 LRESULT OnDeadChar( |
62 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); | 68 UINT message, WPARAM wparam, LPARAM lparam, BOOL* handled); |
63 | 69 |
| 70 LRESULT OnReconvertString(RECONVERTSTRING *reconv); |
| 71 LRESULT OnDocumentFeed(RECONVERTSTRING *reconv); |
64 | 72 |
65 // Overridden from InputMethodBase. | 73 // Overridden from InputMethodBase. |
66 virtual void FocusedViewWillChange() OVERRIDE; | 74 virtual void FocusedViewWillChange() OVERRIDE; |
67 virtual void FocusedViewDidChange() OVERRIDE; | 75 virtual void FocusedViewDidChange() OVERRIDE; |
68 | 76 |
69 // A helper function to return the Widget's native window. | 77 // A helper function to return the Widget's native window. |
70 HWND hwnd() const { return widget()->GetNativeView(); } | 78 HWND hwnd() const { return widget()->GetNativeView(); } |
71 | 79 |
72 // Asks the client to confirm current composition text. | 80 // Asks the client to confirm current composition text. |
73 void ConfirmCompositionText(); | 81 void ConfirmCompositionText(); |
(...skipping 18 matching lines...) Expand all Loading... |
92 // Windows IMM32 wrapper. | 100 // Windows IMM32 wrapper. |
93 // (See "ui/base/win/ime_input.h" for its details.) | 101 // (See "ui/base/win/ime_input.h" for its details.) |
94 ui::ImeInput ime_input_; | 102 ui::ImeInput ime_input_; |
95 | 103 |
96 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); | 104 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); |
97 }; | 105 }; |
98 | 106 |
99 } // namespace views | 107 } // namespace views |
100 | 108 |
101 #endif // VIEWS_IME_INPUT_METHOD_WIN_H_ | 109 #endif // VIEWS_IME_INPUT_METHOD_WIN_H_ |
OLD | NEW |