OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEXT_INPUT_CLIENT_H_ | 5 #ifndef UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 6 #define UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // key states when the character is generated. This method should only be | 50 // key states when the character is generated. This method should only be |
51 // called when a key press is not handled by the input method but still | 51 // called when a key press is not handled by the input method but still |
52 // generates a character (eg. by the keyboard driver). In another word, the | 52 // generates a character (eg. by the keyboard driver). In another word, the |
53 // preceding key press event should not be a VKEY_PROCESSKEY. | 53 // preceding key press event should not be a VKEY_PROCESSKEY. |
54 // This method will be called whenever a char is generated by the keyboard, | 54 // This method will be called whenever a char is generated by the keyboard, |
55 // even if the current text input type is TEXT_INPUT_TYPE_NONE. | 55 // even if the current text input type is TEXT_INPUT_TYPE_NONE. |
56 virtual void InsertChar(base::char16 ch, int flags) = 0; | 56 virtual void InsertChar(base::char16 ch, int flags) = 0; |
57 | 57 |
58 // Input context information ------------------------------------------------- | 58 // Input context information ------------------------------------------------- |
59 | 59 |
60 // Returns native window to which input context is bound. | |
61 virtual gfx::NativeWindow GetAttachedWindow() const = 0; | |
62 | |
63 // Returns current text input type. It could be changed and even becomes | 60 // Returns current text input type. It could be changed and even becomes |
64 // TEXT_INPUT_TYPE_NONE at runtime. | 61 // TEXT_INPUT_TYPE_NONE at runtime. |
65 virtual ui::TextInputType GetTextInputType() const = 0; | 62 virtual ui::TextInputType GetTextInputType() const = 0; |
66 | 63 |
67 // Returns current text input mode. It could be changed and even becomes | 64 // Returns current text input mode. It could be changed and even becomes |
68 // TEXT_INPUT_MODE_DEFAULT at runtime. | 65 // TEXT_INPUT_MODE_DEFAULT at runtime. |
69 virtual ui::TextInputMode GetTextInputMode() const = 0; | 66 virtual ui::TextInputMode GetTextInputMode() const = 0; |
70 | 67 |
71 // Returns if the client supports inline composition currently. | 68 // Returns if the client supports inline composition currently. |
72 virtual bool CanComposeInline() const = 0; | 69 virtual bool CanComposeInline() const = 0; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 virtual void OnCandidateWindowShown() = 0; | 149 virtual void OnCandidateWindowShown() = 0; |
153 // Called when IME updates any appearance of the current candidate window. | 150 // Called when IME updates any appearance of the current candidate window. |
154 virtual void OnCandidateWindowUpdated() = 0; | 151 virtual void OnCandidateWindowUpdated() = 0; |
155 // Called when IME hides the candidate window. | 152 // Called when IME hides the candidate window. |
156 virtual void OnCandidateWindowHidden() = 0; | 153 virtual void OnCandidateWindowHidden() = 0; |
157 }; | 154 }; |
158 | 155 |
159 } // namespace ui | 156 } // namespace ui |
160 | 157 |
161 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ | 158 #endif // UI_BASE_IME_TEXT_INPUT_CLIENT_H_ |
OLD | NEW |