| 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 UI_VIEWS_IME_INPUT_METHOD_WIN_H_ | 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_WIN_H_ |
| 6 #define UI_VIEWS_IME_INPUT_METHOD_WIN_H_ | 6 #define UI_VIEWS_IME_INPUT_METHOD_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 LRESULT OnReconvertString(RECONVERTSTRING *reconv); | 75 LRESULT OnReconvertString(RECONVERTSTRING *reconv); |
| 76 LRESULT OnQueryCharPosition(IMECHARPOSITION *char_positon); | 76 LRESULT OnQueryCharPosition(IMECHARPOSITION *char_positon); |
| 77 | 77 |
| 78 // Overridden from InputMethodBase. | 78 // Overridden from InputMethodBase. |
| 79 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; | 79 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 80 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; | 80 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 81 | 81 |
| 82 // Asks the client to confirm current composition text. | 82 // Asks the client to confirm current composition text. |
| 83 void ConfirmCompositionText(); | 83 void ConfirmCompositionText(); |
| 84 | 84 |
| 85 // Enables or disables the IME according to the current text input type. |
| 86 void UpdateIMEState(); |
| 87 |
| 85 // The HWND this InputMethod is bound to. | 88 // The HWND this InputMethod is bound to. |
| 86 HWND hwnd_; | 89 HWND hwnd_; |
| 87 | 90 |
| 88 // Indicates if the current input locale has an IME. | 91 // Indicates if the current input locale has an IME. |
| 89 bool active_; | 92 bool active_; |
| 90 | 93 |
| 91 // Name of the current input locale. | 94 // Name of the current input locale. |
| 92 std::string locale_; | 95 std::string locale_; |
| 93 | 96 |
| 94 // The current input text direction. | 97 // The current input text direction. |
| 95 base::i18n::TextDirection direction_; | 98 base::i18n::TextDirection direction_; |
| 96 | 99 |
| 97 // The new text direction and layout alignment requested by the user by | 100 // The new text direction and layout alignment requested by the user by |
| 98 // pressing ctrl-shift. It'll be sent to the text input client when the key | 101 // pressing ctrl-shift. It'll be sent to the text input client when the key |
| 99 // is released. | 102 // is released. |
| 100 base::i18n::TextDirection pending_requested_direction_; | 103 base::i18n::TextDirection pending_requested_direction_; |
| 101 | 104 |
| 102 // Windows IMM32 wrapper. | 105 // Windows IMM32 wrapper. |
| 103 // (See "ui/base/win/ime_input.h" for its details.) | 106 // (See "ui/base/win/ime_input.h" for its details.) |
| 104 ui::ImeInput ime_input_; | 107 ui::ImeInput ime_input_; |
| 105 | 108 |
| 106 ui::InputMethod* const host_; | 109 ui::InputMethod* const host_; |
| 107 | 110 |
| 108 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); | 111 DISALLOW_COPY_AND_ASSIGN(InputMethodWin); |
| 109 }; | 112 }; |
| 110 | 113 |
| 111 } // namespace views | 114 } // namespace views |
| 112 | 115 |
| 113 #endif // UI_VIEWS_IME_INPUT_METHOD_WIN_H_ | 116 #endif // UI_VIEWS_IME_INPUT_METHOD_WIN_H_ |
| OLD | NEW |