| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BASE_IME_WIN_IMM32_MANAGER_H | 5 #ifndef UI_BASE_IME_WIN_IMM32_MANAGER_H |
| 6 #define UI_BASE_IME_WIN_IMM32_MANAGER_H | 6 #define UI_BASE_IME_WIN_IMM32_MANAGER_H |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // only for inputting East-Asian language texts, but also the ones from | 70 // only for inputting East-Asian language texts, but also the ones from |
| 71 // tablets (on Windows XP Tablet PC Edition and Windows Vista), voice | 71 // tablets (on Windows XP Tablet PC Edition and Windows Vista), voice |
| 72 // recognizers (e.g. ViaVoice and Microsoft Office), etc. | 72 // recognizers (e.g. ViaVoice and Microsoft Office), etc. |
| 73 // We can disable TSF and CUAS in Windows XP Tablet PC Edition. On the other | 73 // We can disable TSF and CUAS in Windows XP Tablet PC Edition. On the other |
| 74 // hand, we can NEVER disable either TSF or CUAS in Windows Vista, i.e. | 74 // hand, we can NEVER disable either TSF or CUAS in Windows Vista, i.e. |
| 75 // THIS CLASS IS NOT ONLY USED ON THE INPUT CONTEXTS OF EAST-ASIAN | 75 // THIS CLASS IS NOT ONLY USED ON THE INPUT CONTEXTS OF EAST-ASIAN |
| 76 // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES. | 76 // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES. |
| 77 class UI_EXPORT IMM32Manager { | 77 class UI_EXPORT IMM32Manager { |
| 78 public: | 78 public: |
| 79 IMM32Manager(); | 79 IMM32Manager(); |
| 80 ~IMM32Manager(); | 80 virtual ~IMM32Manager(); |
| 81 | 81 |
| 82 // Retrieves whether or not there is an ongoing composition. | 82 // Retrieves whether or not there is an ongoing composition. |
| 83 bool is_composing() const { return is_composing_; } | 83 bool is_composing() const { return is_composing_; } |
| 84 | 84 |
| 85 // Retrieves the input language from Windows and update it. | 85 // Retrieves the input language from Windows and update it. |
| 86 // Return values | 86 // Return values |
| 87 // * true | 87 // * true |
| 88 // The given input language has IMEs. | 88 // The given input language has IMEs. |
| 89 // * false | 89 // * false |
| 90 // The given input language does not have IMEs. | 90 // The given input language does not have IMEs. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // Returns the current input language id. | 234 // Returns the current input language id. |
| 235 LANGID input_language_id() const { return input_language_id_; } | 235 LANGID input_language_id() const { return input_language_id_; } |
| 236 | 236 |
| 237 // Returns BCP-47 tag name of the current input language. | 237 // Returns BCP-47 tag name of the current input language. |
| 238 std::string GetInputLanguageName() const; | 238 std::string GetInputLanguageName() const; |
| 239 | 239 |
| 240 // Returns the text direction of the current input language. | 240 // Returns the text direction of the current input language. |
| 241 base::i18n::TextDirection GetTextDirection() const; | 241 base::i18n::TextDirection GetTextDirection() const; |
| 242 | 242 |
| 243 // Sets conversion status corresponding to |input_mode|. | 243 // Sets conversion status corresponding to |input_mode|. |
| 244 void SetTextInputMode(HWND window_handle, TextInputMode input_mode); | 244 virtual void SetTextInputMode(HWND window_handle, TextInputMode input_mode); |
| 245 | 245 |
| 246 // Helper functions ---------------------------------------------------------- | 246 // Helper functions ---------------------------------------------------------- |
| 247 | 247 |
| 248 // Checks if there is any RTL keyboard layout installed in the system. | 248 // Checks if there is any RTL keyboard layout installed in the system. |
| 249 static bool IsRTLKeyboardLayoutInstalled(); | 249 static bool IsRTLKeyboardLayoutInstalled(); |
| 250 | 250 |
| 251 // Checks if the user pressed both Ctrl and right or left Shift keys to | 251 // Checks if the user pressed both Ctrl and right or left Shift keys to |
| 252 // requrest to change the text direction and layout alignment explicitly. | 252 // requrest to change the text direction and layout alignment explicitly. |
| 253 // Returns true if only a Ctrl key and a Shift key are down. The desired text | 253 // Returns true if only a Ctrl key and a Shift key are down. The desired text |
| 254 // direction will be stored in |*direction|. | 254 // direction will be stored in |*direction|. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 // Indicates whether or not we want IME to render composition text. | 322 // Indicates whether or not we want IME to render composition text. |
| 323 bool use_composition_window_; | 323 bool use_composition_window_; |
| 324 | 324 |
| 325 DISALLOW_COPY_AND_ASSIGN(IMM32Manager); | 325 DISALLOW_COPY_AND_ASSIGN(IMM32Manager); |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 } // namespace ui | 328 } // namespace ui |
| 329 | 329 |
| 330 #endif // UI_BASE_IME_WIN_IMM32_MANAGER_H | 330 #endif // UI_BASE_IME_WIN_IMM32_MANAGER_H |
| OLD | NEW |