| 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_INPUT_METHOD_IMM32_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_IMM32_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_IMM32_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_IMM32_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Overridden from InputMethod: | 24 // Overridden from InputMethod: |
| 25 virtual void OnFocus() OVERRIDE; | 25 virtual void OnFocus() OVERRIDE; |
| 26 virtual void OnBlur() OVERRIDE; | 26 virtual void OnBlur() OVERRIDE; |
| 27 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, | 27 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, |
| 28 NativeEventResult* result) OVERRIDE; | 28 NativeEventResult* result) OVERRIDE; |
| 29 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; | 29 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; |
| 30 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; | 30 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; |
| 31 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; | 31 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; |
| 32 virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE; | 32 virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE; |
| 33 virtual bool IsPopupOpen() const OVERRIDE; |
| 33 | 34 |
| 34 protected: | 35 protected: |
| 35 // Overridden from InputMethodBase: | 36 // Overridden from InputMethodBase: |
| 36 virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, | 37 virtual void OnWillChangeFocusedClient(TextInputClient* focused_before, |
| 37 TextInputClient* focused) OVERRIDE; | 38 TextInputClient* focused) OVERRIDE; |
| 38 virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, | 39 virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, |
| 39 TextInputClient* focused) OVERRIDE; | 40 TextInputClient* focused) OVERRIDE; |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 LRESULT OnImeSetContext(UINT message, | 43 LRESULT OnImeSetContext(UINT message, |
| 43 WPARAM wparam, | 44 WPARAM wparam, |
| 44 LPARAM lparam, | 45 LPARAM lparam, |
| 45 BOOL* handled); | 46 BOOL* handled); |
| 46 LRESULT OnImeStartComposition(UINT message, | 47 LRESULT OnImeStartComposition(UINT message, |
| 47 WPARAM wparam, | 48 WPARAM wparam, |
| 48 LPARAM lparam, | 49 LPARAM lparam, |
| 49 BOOL* handled); | 50 BOOL* handled); |
| 50 LRESULT OnImeComposition(UINT message, | 51 LRESULT OnImeComposition(UINT message, |
| 51 WPARAM wparam, | 52 WPARAM wparam, |
| 52 LPARAM lparam, | 53 LPARAM lparam, |
| 53 BOOL* handled); | 54 BOOL* handled); |
| 54 LRESULT OnImeEndComposition(UINT message, | 55 LRESULT OnImeEndComposition(UINT message, |
| 55 WPARAM wparam, | 56 WPARAM wparam, |
| 56 LPARAM lparam, | 57 LPARAM lparam, |
| 57 BOOL* handled); | 58 BOOL* handled); |
| 59 LRESULT OnImeNotify(UINT message, |
| 60 WPARAM wparam, |
| 61 LPARAM lparam, |
| 62 BOOL* handled); |
| 58 | 63 |
| 59 // Asks the client to confirm current composition text. | 64 // Asks the client to confirm current composition text. |
| 60 void ConfirmCompositionText(); | 65 void ConfirmCompositionText(); |
| 61 | 66 |
| 62 // Enables or disables the IME according to the current text input type. | 67 // Enables or disables the IME according to the current text input type. |
| 63 void UpdateIMEState(); | 68 void UpdateIMEState(); |
| 64 | 69 |
| 65 bool enabled_; | 70 bool enabled_; |
| 66 | 71 |
| 72 // True if a candidate window (or IME suggest, etc.) is open. |
| 73 // False if not or unsure. |
| 74 bool is_popup_open_; |
| 75 |
| 67 DISALLOW_COPY_AND_ASSIGN(InputMethodIMM32); | 76 DISALLOW_COPY_AND_ASSIGN(InputMethodIMM32); |
| 68 }; | 77 }; |
| 69 | 78 |
| 70 } // namespace ui | 79 } // namespace ui |
| 71 | 80 |
| 72 #endif // UI_BASE_IME_INPUT_METHOD_IMM32_H_ | 81 #endif // UI_BASE_IME_INPUT_METHOD_IMM32_H_ |
| OLD | NEW |